-
-
Notifications
You must be signed in to change notification settings - Fork 104
Replace setup.py with pyproject.toml #848
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #848 +/- ##
=======================================
Coverage 84.72% 84.72%
=======================================
Files 125 125
Lines 11552 11552
=======================================
Hits 9787 9787
Misses 1765 1765 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| description = "Pure Python COM package" | ||
| readme = "README.md" | ||
| requires-python = ">=3.8" | ||
| license = "MIT" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The clauses in LICENSE.txt are the same as those of the MIT License.
Although starting the file with the line MIT License is the practice generally accepted today, the wording might be consistent, as the MIT License is officially listed as an OSI-approved open source license.
Lines 1 to 2 in 8d40715
| This software is OSI Certified Open Source Software. | |
| OSI Certified is a certification mark of the Open Source Initiative. |
@cfarrow
If you remember, I would like to confirm the intent behind this license wording with you, who committed LICENSE.txt in 8d40715.
Was this common practice when this commit was made?
|
I'm currently trying to investigate why the install-tests CI fails only for Python 3.8 |
cae9b83 to
c5c50fe
Compare
|
I am planning to drop support for Python 3.8 soon. 1.4.12 will likely be the last release to support it. |
|
The migration of However, I believe the legacy |
It is indeed possible to keep setup.py. But, do you have any reason to keep setup.py? The only difference between this setup (with pyproject.toml) and setup.py is that I removed the cmdclass. There are 2 cmdclass:
|
|
I apologize for the delay in my response; I've been quite busy. My initial thought to keep However, I still have some uncertainties about the The |
|
I tried to run |
|
Thank you for your investigation.
I agree. I believe it's fine to remove My main concern is whether we can safely delete If you have the resources to open a separate PR that solely focuses on removing |
|
|
8e97a45 to
161a602
Compare
|
I just rebased because you dropped python 3.8 support in #839 |
161a602 to
a0d6cd6
Compare
It is needed for test_pip_install.py
This is necessary because setuptools added support for ``license`` and ``license-files`` in that version (and we use those in pyproject.toml) Changelog: https://setuptools.pypa.io/en/latest/history.html#v77-0-0
a9773fc to
1a1d9ad
Compare
| def run(self): | ||
| install.run(self) | ||
| # Custom script we run at the end of installing | ||
| if not self.dry_run and not self.root: | ||
| print("Executing post install script...") | ||
| print(f'"{sys.executable}" -m comtypes.clear_cache -y') | ||
| try: | ||
| subprocess.check_call([ | ||
| sys.executable, | ||
| "-m", | ||
| "comtypes.clear_cache", | ||
| '-y', | ||
| ]) | ||
| except subprocess.CalledProcessError: | ||
| print("Failed to run post install script!") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Memo:
This post-install script hook is dead code and no longer runs during pip install comtypes.
And these types of hooks are deprecated in modern packaging, we can safely remove it.
We can achieve the same result as the old setup.py installation by executing the cache clear command after installing via pip.
junkmd
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!

Fix #480 (comment)
Note that when building the dist (with
python -m build --sdist), it won't create a zip file anymore. It will be a tar.gz file.There is an issue about this, see pypa/setuptools#3916, but honestly, I don't think it really matters.