befeleme / pyp2spec

Generate Fedora RPM spec files for Python packages
MIT License
11 stars 4 forks source link

Support packages with extension modules #10

Open hroncok opened 2 years ago

hroncok commented 2 years ago

The tool currently only supports noarch pacakges, the noarch thing is hardcoded in the template. It would be nice if it also supported packages with extension modules - those are archful and usually need at least gcc to build.

befeleme commented 2 years ago

Taking a look at Packaging Guidelines and some arched spec files this is needed in template.spec:

Also, it could be possible to define ExcludeArch: and ExclusiveArch: in the config. It's already possible to define custom BuildRequires: in addition to the generated ones.

Will it be enough to make it working?

hroncok commented 2 years ago

I suppose the conf2spec tool needs a way to say we don't want noarch (I would not bother with ExcludeArch: and ExclusiveArch:) and a way to say we need gcc (the option already exists).

For automated rebuilds to work, the pyp2conf tool would need to detect this and add the proper config options.

befeleme commented 10 months ago

Detecting the existence of extension modules naively by parsing all available wheel names: https://github.com/befeleme/pyp2spec/pull/40 A draft of PEP that would make it possible to detect that in an explicit way: https://peps.python.org/pep-0725/