git.net

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Distutils - bdist_rpm - specify python interpretter location


I am trying to use Distutils "bdist_rpm" function on Fedora 30.  It is
failing, because Fedora does not provide a "python" executable; it
provides /usr/bin/python2 and /usr/bin/python3.

The error message is:

   env: 'python': No such file or directory
   error: Bad exit status from /var/tmp/rpm-tmp.a3xWMd (%build)

When run with the --spec-only option, one can see where 'python' is
used in the generated SPEC file:

   %build
   env CFLAGS="$RPM_OPT_FLAGS" python setup.py build

   %install
   python setup.py install -O1 --root=$RPM_BUILD_ROOT 
--record=INSTALLED_FILES

Is there a way to tell Distutils to use 'python2'?

Thanks!

-- 
========================================================================
Ian Pilcher                                         arequipeno at gmail.com
-------- "I grew up before Mark Zuckerberg invented friendship" --------
========================================================================