On 19.8.2016 16:40, Thomas Bechtold wrote:
- convert `python setup.py build` to `%python_build` and `python setup.py install` to `%python_install`.
Is this based on %py2_build, %py3_build, %py2_install and %py3_install? Would be nice to have theses macros, too (they are avaialble in Fedora).
No, it's a simple shell-based for-loop now. I'll look into the Fedora macros and possibly port them over.
What if a BuildRequires or Requires is only needed for a specfic version (described via marker, see pep-0496 in setup.cfg or requirements.txt) ?
BuildRequires is common for the whole spec, so it has to include everything. %{python_module} will make sure you get both/all versions (i'm thinking of adding pypy and possibly other pythons later). If you only need a particular version, say, python3-something, you can write BuildRequires: that-specific-thing, without the %{python_module} macro. Different requires for different python versions are not supported at the moment; all resulting packages will have the same Requires set, except with the relevant s/python/python3/ or vice versa. Also thank you rubber duck, in the course of writing this e-mail, i figured out how to accomplish it :) In the next version of the prototype, you will be able to specify: Requires: python-common-for-all-version %ifpython3 Requires: python3-only-required-in-python3 %endif
It would also be nice to get other distros (by which i really mean Fedora) in on this. Anyone here knows how to make that happen?
Fedora already has single specs for py2/py3 packages. Or what exactly do you mean?
Same autogenerating macros for subpackages and filelists. AFAICT Fedora is now doing the thing with listing the different subpackages by hand. m.
Best,
Tom