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

Migrate to pyproject. #351

Merged
merged 8 commits into from
Sep 11, 2024
Merged

Migrate to pyproject. #351

merged 8 commits into from
Sep 11, 2024

Conversation

mcmtroffaes
Copy link
Owner

This fixes #350 (and removes setuptools as a dependency for installation).

@mcmtroffaes mcmtroffaes self-assigned this Sep 11, 2024
@mcmtroffaes mcmtroffaes merged commit 81883d4 into develop Sep 11, 2024
13 checks passed
@mcmtroffaes mcmtroffaes deleted the feature/pyproject branch September 11, 2024 16:11
@danielnorberg
Copy link

Nice!👍

@flying-sheep
Copy link
Contributor

you forgot the [build-system] table!

@mcmtroffaes
Copy link
Owner Author

Is it necessary (there are no build dependencies)?

@mcmtroffaes
Copy link
Owner Author

Aw poop, yes it i, from https://packaging.python.org/en/latest/guides/writing-pyproject-toml/

The [build-system] table should always be present, regardless of which build backend you use ([build-system] defines the build tool you use).

I'll add one now.

@mcmtroffaes
Copy link
Owner Author

Added here: 9ca4e0b

@flying-sheep
Copy link
Contributor

Awesome! Yeah, there is a build dependency: setuptools! The idea behind standardizing this stuff is that projects don’t use setuptools by convention anymore but are able to use whatever they want.

Since setuptools is pretty slow and has a lot of lagacy features that few people need, many pure-python projects benefit from switching to a faster build backend.

But of course setuptools works fine, so no need to change anything if it works for you.

@mcmtroffaes
Copy link
Owner Author

Thanks @flying-sheep - I am thankful that you are looking out for the project. I find it super exciting how Python is modularizing/standardizing its packaging eco-system.

It's funny how pip agreed to build the package without a build-system specified... whence how this went under my radar.

@flying-sheep
Copy link
Contributor

The default is

[build-system]
requires = ['setuptools']
build-backend = 'setuptools.build_meta:__legacy__'

which behaves as closely as possible like doing python setup.py sdist bdist_wheel.

But explicitly selecting a non-legacy backend works for almost all packages and executes much less hacky code.

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.

setup.py: migrate deprecated namespace_packages
3 participants