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 from setup.py to pyproject.toml #1929

Merged
merged 29 commits into from
Aug 6, 2023

Conversation

Kami
Copy link
Member

@Kami Kami commented Aug 2, 2023

This pull request is a work in progress attempt at trying to migrate package and build metadata from setup.py to pyproject.toml.

It will take some time to polish out all the kinks to ensure produced sdist and wheel artifacts match what would have been produced by the previous setup.oy config.

As part of this change, running tests directly via python setup.py test will be deprecated and removed (https://docs.pytest.org/en/7.2.x/explanation/goodpractices.html#do-not-run-via-setuptools) - I will document that in the changelog and update the affected readme.

TODO

  • Verify new .tar.gz and wheel artifacts match what would be generated with setup.py in the past
  • Update dist.sh script to utilize build package (https://github.com/pypa/build)
  • Research potentially using hatchling instead of setuptools for the build backend (may want to avoid this for now to keep the scope of the changes smaller)
  • Update development docs (release management section)
  • To reduce build artifact sizes, possibly consider excluding tests + test fixture files again (we've did that a long time ago and then changed to including tests with the distribution artifact - so the end user can run the tests on the downloaded artifact and verify the artifact is in order)

@Kami Kami force-pushed the migrate_from_setuppy_to_pyproject_toml branch from 5f19fd8 to 9d15c48 Compare August 2, 2023 19:33
@codecov-commenter
Copy link

codecov-commenter commented Aug 2, 2023

Codecov Report

Merging #1929 (0750a08) into trunk (a271de9) will increase coverage by 0.00%.
Report is 5 commits behind head on trunk.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##            trunk    #1929   +/-   ##
=======================================
  Coverage   83.12%   83.12%           
=======================================
  Files         353      353           
  Lines       81365    81387   +22     
  Branches     8598     8601    +3     
=======================================
+ Hits        67630    67652   +22     
  Misses      10931    10931           
  Partials     2804     2804           
Files Changed Coverage Δ
libcloud/__init__.py 65.79% <100.00%> (ø)
libcloud/compute/drivers/azure_arm.py 59.83% <100.00%> (+0.71%) ⬆️
libcloud/test/compute/test_azure_arm.py 98.93% <100.00%> (+0.02%) ⬆️

@Kami
Copy link
Member Author

Kami commented Aug 3, 2023

^ @rsnk96 Just a heads up since you made a similar change recently by moving most of the tooling config into pyproject.toml.

This change is still very much work in progress, but I just wanted to give you a heads up.

@Kami
Copy link
Member Author

Kami commented Aug 6, 2023

I checked and tests the artifacts and they appear to be looking and working fine.

For the time being, I will leave simple mainimal setup.py file there so we can still rely on python setup.py --version.

Alternative without that minimal setup.py file would be much more complicated (especially since we rely on dynamic version functionality in pyproject.toml).

@Kami Kami changed the title [WIP] Migrate from setup.py to pyproject.toml Migrate from setup.py to pyproject.toml Aug 6, 2023
@Kami Kami merged commit 17ea217 into apache:trunk Aug 6, 2023
18 checks passed
@Kami Kami added this to the v3.8.0 milestone Aug 6, 2023
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