On 19. 06. 19 14:36, Neal Gompa wrote:
On Wed, Jun 19, 2019 at 8:09 AM Miro Hrončok mhroncok@redhat.com wrote:
On 19. 06. 19 12:24, Neal Gompa wrote:
On Wed, Jun 19, 2019 at 6:05 AM Miro Hrončok mhroncok@redhat.com wrote:
We have an interesting request for python3-rpm-macros to depend on python3.
See https://bugzilla.redhat.com/show_bug.cgi?id=1563789
Highlights:
- users who build for Python 3 are told (in the guidelines) to BR python3-devel (that brings in both python3 and python3-rpm-macros) - the existence of python3-rpm-macros is left as an implementation detail for ^ - in theory, those macros can be used with other Pythons (such as pypy3 or python36, that is most likely not done in practice)
Arguments:
- to require: the macros are broken without a python3 interpreter - to not: the macros should work with any python3 interpreter
Solutions?
- declare direct BR of macros without a python3 interpreter unsupported - add dependency on python3. unused if used with another interpreter - add a common virtual provide for all python3 interpreters or require (python3 or pypy3 or python36...) - very tedious
Have we ever tried using it with pypy3? Does it even work with that (that is, pypy3-foo packages can be made)? If it does, we should just add a common virtual provide to supported interpreters and require that. Else, just require python3.
In practice, I have not. However in theory:
$ rpm --define '__python3 /usr/bin/pypy3' --eval '%python3_sitearch' /usr/lib64/pypy3-7.1/site-packages
$ rpm --define '__python3 /usr/bin/python3.5' --eval '%python3_sitearch' /usr/lib64/python3.5/site-packages
$ rpm --define '__python3 /usr/bin/python3.4' --eval '%python3_sitearch' /usr/lib64/python3.4/site-packages
$ rpm --define '__python3 /usr/bin/python3.8' --eval '%python3_sitearch' /usr/lib64/python3.8/site-packages
I took a look at pypy3, and I see we already define pypy3 variants of the python3 macros... Do we want to deduplicate them and maybe have a macro switch for flipping the interpreter? In that case, then pypy3-devel should BR python3-rpm-macros...
No idea. I don't think that it is needed, I'm just saying it is possible.