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

How to generate SPEC for non setup.py file projects? #286

Open
pnemade opened this issue Sep 16, 2022 · 2 comments
Open

How to generate SPEC for non setup.py file projects? #286

pnemade opened this issue Sep 16, 2022 · 2 comments

Comments

@pnemade
Copy link

pnemade commented Sep 16, 2022

Hi,
Can I get help here please? I found some new releases/projects moved from using setup.py to pyproject.toml file. Does this pyp2rpm tool help to generate SPEC file for those projects?

Thanks

@hroncok
Copy link
Member

hroncok commented Sep 16, 2022

No, pyp2rpm does not support that.

For setup.py-less projects, the updated Python guideline must be used (at least in Fedora): https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/

There is an experimental https://github.com/befeleme/pyp2spec if you really need a generator.

@NimKri
Copy link

NimKri commented Aug 4, 2023

I came across a hack(for the lack of better word) to run specfile generation for projects lacking setup file, in the source find metadata_extractors.py file and edit the function get_setup_py to get a custom written file(I use /tmp/setup.py) and write a generic setup.py to it

from setuptools import setup, find_packages
if __name__ == '__main__':
   setup(name="%{pypi_name}",
               version="%{version}",
               packages=find_packages(),)

the above has worked out for a lot of projects

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

No branches or pull requests

3 participants