-
Notifications
You must be signed in to change notification settings - Fork 7
Move buildbackend from setuptools/pbr to hatchling #11
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
base: master
Are you sure you want to change the base?
Move buildbackend from setuptools/pbr to hatchling #11
Conversation
The tests are failing in CI as we do not install the project, which is required to generate the version info for hatchling. This worked locally, and also for e.g. the fixtures project as there tox is used, which both handles the virtual environment creation and the installation. Originally, I wanted to create a tox.ini file for this project to ease the test setup, but after the discussion in #10 (comment) I removed it to get things forward. @jelmer and others, could you please advise what is the preferred solution here? Would it be OK to add a tox.ini file, or should I create a virtualenv in the Makefile, and install the package afterwards? |
See testtools for an example of how this could work without installation. |
The tests should be running in a venv where the package is installed. If installed with |
|
e70bf51
to
0c20508
Compare
When I go to the testtools setup and run
While this tells me what to do, it still means all the manual work for the contributor, i.e. create virtual environments for all supported Python versions, install the package there, and run the tests. This seems a lot of effort compared to have a single configuration file, updated once a year when a new Python version gets released, but I am happy to go that route if this speeds up moving things forward. |
That is the very issue - we could either do this manually in the Make file or at the cost of maintaining an additional configuration file for hatch or tox and updating it once a year when there is a new Python version coming out. And while I am quite possible biased as I have been using tox for many years, and I am one of its maintainers, also for hatch you need to specify the Python versions, see https://hatch.pypa.io/latest/environment/#matrix, so at least from the features we need (ie build package, create venv, install package, run tests), both tools are pretty on par. |
Right, but this works fine today when you have setuptools-scm installed. Note that I'm not using this for running tests (I run with my current python and rely on the CI to run tests against other Python versions), but rather for me to run breezy against testtools HEAD. |
No description provided.