Skip to content
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

Modernize packaging a bit #38

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

bluetech
Copy link
Contributor

@bluetech bluetech commented Jul 7, 2023

Adding pyproject.toml allows the package to be installed using PEP517 instead of legacy setup.py install method. At least pip says so in a warning when installing without the wheel package available.

Change setup.py to setup.cfg (using a script[0]) because setup.py is out of fashion these days.

Remove MANIFEST.ini since LICENSE is implied[1].

[0] https://github.com/gvalkov/setuptools-py2cfg
[1] https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-license-files

setup.cfg Outdated
@@ -1,2 +1,32 @@
[bdist_wheel]
universal=0
[metadata]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might as well put this config in pyproject.toml?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't have python 3.5 installed, but I suspect it won't work with it. I'll try getting py3.5 and check it though.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can drop 3.5, 3.6 and 3.7 support

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hauntsaninja great, that might help. I'll send a PR to do this first.

Adding pyproject.toml allows the package to be installed using PEP517
instead of legacy `setup.py install` method. At least pip says so in a
warning when installing without the `wheel` package available.

Change setup.py to setup.cfg (using a script[0]) because setup.py is out
of fashion these days.

Remove MANIFEST.ini since LICENSE is implied[1].

[0] https://github.com/gvalkov/setuptools-py2cfg
[1] https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-license-files
Supported since setuptools 61.0.0, more standard.
@bluetech
Copy link
Contributor Author

bluetech commented Jul 7, 2023

Changed from setup.cfg to pyproject.toml, seems to work. Added it in a separate commit just in case.

One final change can be done to eliminate the tool.setuptools py-modules section by moving from a single module mypy_extensions.py to a package, then setuptools can auto-discover it. Actually seems to work with the module as well, so just removed it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants