Skip to content

From setup.py to pyproject#606

Open
Pcornat wants to merge 7 commits intocea-hpc:masterfrom
Pcornat:from-setup-py-to-pyproject
Open

From setup.py to pyproject#606
Pcornat wants to merge 7 commits intocea-hpc:masterfrom
Pcornat:from-setup-py-to-pyproject

Conversation

@Pcornat
Copy link
Copy Markdown

@Pcornat Pcornat commented Apr 4, 2026

I made a pyproject.toml file to resolve an issue. I tested only the pip install -e . command.
I made a small change to introduce setuptools-scm to make the build process get package's version from git tags.

Feel free to do whatever is needed to make it compliant with the project and to solve the issue.

Resolves #587

@Pcornat Pcornat changed the title From setup py to pyproject From setup.py to pyproject Apr 4, 2026
@Pcornat Pcornat marked this pull request as ready for review April 4, 2026 11:05
Copy link
Copy Markdown
Collaborator

@thiell thiell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello and thanks for your contribution @Pcornat
Could you explain what doesn't work for you today?

For example, re: RPM build, right now we're using %pyproject_* macros are not strictly tied to pyproject.toml and they work with the legacy setup.py/setup.cfg combo:
https://src.fedoraproject.org/rpms/clustershell/blob/rawhide/f/clustershell.spec
So #587 is actually already fixed without using a pyproject.toml

Adding your pyproject.toml will likely break the build on EL9 and EL10. That said, we could decide to move forward and include it, handling EL builds separately, if there is a good reason for it.

That said, a minimal pyproject.toml with just the [build-system] declaration (no [project] table, keeping metadata in setup.py/setup.cfg) could be useful for pip install -e . workflows and would work across all platforms without the setuptools version constraints? Would that work for you?

Comment thread pyproject.toml Outdated
Comment thread pyproject.toml Outdated
Comment thread pyproject.toml Outdated
@Pcornat
Copy link
Copy Markdown
Author

Pcornat commented Apr 16, 2026

Hello @thiell

As the issue is not closed, I thought the problem was still here. So now I think my contribution is useless (?). Would it be possible to close the issue #587 to know that the problem is yesterday's news ?

Plus, removing the [project] part in pyproject.toml is impossible as it is mandatory for this format. For the Python foundation, the pyproject.toml is aimed to replace the setup.py, that is why it cannot work without the [project] part.

@Pcornat Pcornat requested a review from thiell April 16, 2026 13:52
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.

Fedora Packaging: Stop using deprecated python setup.py build/install command in the spec

2 participants