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

move build configuration into pyproject.toml #900

Merged
merged 1 commit into from
Mar 6, 2023

Conversation

zacharyburnett
Copy link
Collaborator

setuptools now supports the [project] table, which is defined by PEP621.

Additionally, setuptools now supports its own entry in pyproject.toml called [tool.setuptools] (pypa/setuptools#1688, https://setuptools.pypa.io/en/latest/userguide/pyproject_config.html#setuptools-specific-configuration); however, it comes with the following disclaimer:

Support for declaring configurations not standardized by PEP 621 (i.e. the [tool.setuptools] table), is still in beta stage and might change in future releases.

Support for the tool.setuptools table will likely be in beta until toml is natively supported with the release of Python 3.11.

Given this, we can attempt to consolidate the build configuration into a single pyproject.toml file that can possibly be read by other build systems in the future.

@zacharyburnett
Copy link
Collaborator Author

There are a few errors with the configuration before this is ready for review.

Copy link
Collaborator

@alphasentaurii alphasentaurii left a comment

Choose a reason for hiding this comment

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

Looks good to me, thanks Zach. Let me know when this is ready for final review.

@zacharyburnett zacharyburnett force-pushed the pep621 branch 2 times, most recently from 69d1f05 to fd02e20 Compare March 6, 2023 18:19
@zacharyburnett zacharyburnett marked this pull request as ready for review March 6, 2023 18:33
@zacharyburnett
Copy link
Collaborator Author

Looks good to me, thanks Zach. Let me know when this is ready for final review.

It looks like this is ready, though I am not sure if the scripts will be available at runtime; they seem to be on my machine. If we have issues with them, then the solution would be to use PEP621's project.scripts, which requires an entry point, instead of setup(scripts=) which uses a shebang'ed file.

@alphasentaurii
Copy link
Collaborator

Looks good to me, thanks Zach. Let me know when this is ready for final review.

It looks like this is ready, though I am not sure if the scripts will be available at runtime; they seem to be on my machine. If we have issues with them, then the solution would be to use PEP621's project.scripts, which requires an entry point, instead of setup(scripts=) which uses a shebang'ed file.

Ok cool - I can also do a fresh install with this PR to test that locally as an extra precaution

@alphasentaurii alphasentaurii merged commit 17efb9a into spacetelescope:master Mar 6, 2023
@zacharyburnett zacharyburnett deleted the pep621 branch March 6, 2023 19:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants