Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.

Bug 1696214

Summary: python34-setuptools will no longer produce packages with bdsit_rpm
Product: [Fedora] Fedora EPEL Reporter: Ulrik Haugen <ulrik.haugen>
Component: python34Assignee: Petr Viktorin <pviktori>
Status: NEW --- QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: epel7CC: carl, cstratak, kevin, mhroncok, orion, pviktori, python-sig, TicoTimo, ulrik.haugen
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Ulrik Haugen 2019-04-04 11:03:31 UTC
Description of problem:

When packaging Python projects with bdist_rpm from python34-setuptools it creates a spec file that tries to invoke "python3 setup.py build".

Since today none of its dependencies provides python3.

Presumably also any entry points will point to python3 in their hashbangs rendering them unable to start or locate libraries installed for python3.4.


Version-Release number of selected component (if applicable):

python34-setuptools-39.2.0-3.el7.noarch


How reproducible:

Always


Steps to Reproduce:
1. Install python34-setuptools and keep python36 from being installed.
2. Run python3.4 setup.py bdist_rpm in some Python 3 project.

Actual results:

[...]
+ python3 setup.py build
/var/tmp/rpm-tmp.7F0CJk: line 29: python3: command not found
error: Bad exit status from /var/tmp/rpm-tmp.7F0CJk (%build)


Expected results:

Successful completion resulting in packaged Python software.


Additional info:

As i noted above this probably extends to scripts installed for
entry points as well, if this issue is addressed, please look in
to that question too.

Comment 1 Miro Hrončok 2019-04-04 11:39:42 UTC
A very dirty fix would be to patch bdist_rpm to use python3.X in the spec file instead of python3.

Comment 2 Miro Hrončok 2019-04-04 11:40:21 UTC
AFAIK the responsible code is part of distutils (standard library).

Comment 3 Ulrik Haugen 2019-04-04 11:57:40 UTC
Patching bdist_rpm seems like a good start but please see my note about entry points too!

Comment 4 Miro Hrončok 2019-04-04 12:08:04 UTC
console scripts entrypoints are created with the caller script. e.g. if you call python3.4 setup.py install, the entrypoints will have /usr/bin/pythno3.4 shebangs.