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

Add pyproject.toml and move metadata from setup.py #211

Merged
merged 5 commits into from
Apr 17, 2023

Conversation

JonathonReinhart
Copy link
Owner

This is a step toward modernizing the project packaging, and allows us to begin defining tooling config in pyproject.toml.

References:

Tested:

  • python3 -m build
  • diff generated scuba-*.dist-info/* files and ensure only minimal, expected changes

Closes #203

@github-actions
Copy link

github-actions bot commented Apr 17, 2023

Test Results

    5 files      5 suites   1m 42s ⏱️
160 tests 158 ✔️   2 💤 0
800 runs  790 ✔️ 10 💤 0

Results for commit 7c95e7f.

♻️ This comment has been updated with latest results.

This is a step toward modernizing the project packaging, and
allows us to begin defining tooling config in pyproject.toml.

References:
- https://packaging.python.org/en/latest/specifications/declaring-project-metadata/

Tested:
- python3 -m build
- diff generated .dist-info/* files and ensure only minimal, expected changes
This the more modern, flexible frontend for building packages.

Also, it provides build isolation which should avoid
setuputils-version-related issues.
@JonathonReinhart
Copy link
Owner Author

This build (and others) failed because the resulting dist is named dist/UNKNOWN-2.10.1+23.g536aef3-py3-none-any.whl.

The UNKNOWN-* bug is documented here:

Maybe the right idea is to just invoke build instead of setup.py in the workflows.

@JonathonReinhart
Copy link
Owner Author

JonathonReinhart commented Apr 17, 2023

After switching to build, my tests are failing again.

The reason is that scubainit is not found.

Why not? Because when we run the tests from the project root, the scuba package is the one in the current directory (shadowing the one we just installed as a wheel!) The reason scubainit is missing is because of the build isolation provided by build. So our CI test has always been broken! build isolation FTW.

How to fix this? My initial thought is to just blast scuba from the source tree after building. We could also switch to a src/ tree layout so scuba isn't in the current dir.

@JonathonReinhart JonathonReinhart marked this pull request as ready for review April 17, 2023 05:47
This will ensure that only the package from the installed wheel is used.
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.

Move to setup.cfg / pyproject.toml
1 participant