-
Notifications
You must be signed in to change notification settings - Fork 150
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
Switch to pyproject.toml #2376
Switch to pyproject.toml #2376
Conversation
@Conan-Kudo I'm pro switching to poetry. I just opened this PR to show a bit of my experiments with moving away from setup.py and the issues I had and still have with it |
Related to #2370 |
81e8e97
to
2cd2ed9
Compare
Added more cleanup tasks:
|
setup.py now only holds settings that cannot (or I did not understand how to add them) be used in pyproject.toml. These settings are mainly scripts and entry-points and the license. See the dynamic section dynamic = [
"license",
"entry-points",
"scripts"
] ideas welcome |
setup.py is currently only actively called in the .spec file for installing
If we want to change this it would mean:
|
@Conan-Kudo I made some progress here, if you have a free minute would be nice if you can take a look at the changeset. |
@Conan-Kudo I finished my changes regarding setup.py. I think it is in a review-able state now. My main concern is the change on the .spec file level. I'm not sure if |
We cannot merge this until we drop support for old distributions as stated in #2369. Because otherwise this will be broken for half of our supported platforms. |
I thought with the last commit there should be a safe fallback for these cases, no ? |
You ripped all the data out of |
Calling setup.py is marked obsolete for a long time and with this commit pyproject.toml is introduced and used for the development environment setup. On the packaging side the spec file is kept compatible with setup.py in a way that we try the build and installer python modules first and only if those are not present setup.py is called. For the publishing on pypi both targets wheel and sdist are used which is the default action of python -m build.
3a77375
to
3081655
Compare
You could try moving the data into a setup.cfg file and tell pyproject.toml that we use setuptools to build. I think that's backward compatible. |
I might be missing all details but to my understanding only the direct call of setup.py as a command is obsolete. Meaning setuptools and the use of pyproject.toml in combination with setup.py is still a supported combination. With the current changeset I tried building for a distro that has build and installer python modules available and I also tried building against SLE15 which is py3.6 and there are not out of the box build and installer modules available. The spec tries to create the wheel and fails and as fallback continues with "setup.py install" as we had it before and that worked without any issues. Thus I wonder where the changes here breaks the backward compatibility. I admit that I haven't looked into all details and after effects. I will close this PR and re-open it against the kiwi-10 branch. I think there we definitely need to move away from setup.py |
setup.py is marked obsolete for a long time and with this commit pyproject.toml is introduced and used for the development environment setup.
To be more clear, calling setup.py as a tool is deprecated:
The changes here refactors kiwi to no longer call setup.py in any way