#1019 Use python2/3 instead of python in Makefile/spec
Merged by mikem. Opened by tkopecek.
tkopecek/koji issue1018  into  master

Download 1019.patch

Fixes: https://pagure.io/koji/issue/1018

related PR#990: https://pagure.io/koji/pull-request/990
We'll need some tweaks for building koji on RHEL8

1 new commit added

  • use macro to support RHEL8 build

2 new commits added

  • use macro to support RHEL8 build
  • Use python2/3 instead of python in Makefile/spec

Combined with PR #990 to one.

Some make commands are pretty noisy with this change. I think we need to make sure we provide a default value for PYTHON everywhere.

[mike@localhost koji]$ make clean
rm -f *.o *.so *.pyc *~ koji*.bz2 koji*.src.rpm
rm -rf koji-1.16.0
for d in hub builder koji cli util www plugins vm; do make -s -C $d clean; done
make[1]: -c: Command not found
make[1]: -c: Command not found
make[1]: -c: Command not found
make[1]: -c: Command not found
make[1]: -c: Command not found
make[1]: -c: Command not found
make[3]: -c: Command not found
make[3]: -c: Command not found
make[1]: -c: Command not found
make[1]: -c: Command not found
make[1]: -c: Command not found
coverage erase ||:

I think maybe we just need to export the PYTHON variable in the main Makefile. E.g.

https://github.com/mikem23/koji-playground/commits/pagure/pr/1019

1 new commit added

  • set default python

Your solution doesn't allow to override PYTHON via standard environment variables e.g. ('PYTHON=python3 make clean', while 'make PYTHON-python3 clean' works). Python2 will be still used. I've added commit with conditional define which should solve it.

I'm still seeing junk output when running commands like make clean and make tarball. I should not have to explicitly set PYTHON=python2 to run these commands.

maybe your approach, but also export the var?

rebased onto e6e214f7081314b1e4d6ef7fc77a06ee301dca2c

yeah, it seems to fixed it

:thumbsup:

What about this one? Using unversioned 'python' prevents koji from building in actual Fedora.
(https://copr-be.cloud.fedoraproject.org/results/tkopecek/koji/fedora-29-x86_64/00829698-koji/)

What about this one? Using unversioned 'python' prevents koji from building in actual Fedora.
(https://copr-be.cloud.fedoraproject.org/results/tkopecek/koji/fedora-29-x86_64/00829698-koji/)

I guess it should be this problem: https://fedoraproject.org/wiki/Changes/Avoid_usr_bin_python_in_RPM_Build#Quick_Opt-Out

Commit e10daecd fixes this pull-request

Pull-Request has been merged by mikem

Metadata