apache / libcloud

Apache Libcloud is a Python library which hides differences between different cloud provider APIs and allows you to manage different cloud resources through a unified and easy to use API.
https://libcloud.apache.org
Apache License 2.0
2.03k stars 929 forks source link

Migrate from setup.py to pyproject.toml #1929

Closed Kami closed 11 months ago

Kami commented 11 months ago

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

codecov-commenter commented 11 months ago

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%) :arrow_up:
libcloud/test/compute/test_azure_arm.py 98.93% <100.00%> (+0.02%) :arrow_up:
Kami commented 11 months ago

^ @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 commented 11 months ago

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).