Bug 770909

Summary: brp-python-bytecompile requires python2
Product: [Fedora] Fedora Reporter: Spencer Jackson <spencerandrewjackson>
Component: python3Assignee: Dave Malcolm <dmalcolm>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 16CC: amcnabb, dmalcolm, tomspur
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-12-30 17:09:19 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Spencer Jackson 2011-12-30 05:16:16 UTC
Description of problem:
The brp-python-bytecompile script checks for python2, and will abort silently if it is not found. When a pure python3 package is compiled in mock, __pycache__ will not be produced.


Version-Release number of selected component (if applicable):
Noticed in python3-3.2.1-1

How reproducible:
Perfectly


Steps to Reproduce:
1. Attempt to build the RPM spec in [[bugzilla:770765]] using mock
  
Actual results:
The build fails, as the spec hardcoded the path to the __pycache__ directory


Expected results:
Python3 is used to create a __pycache__ directory


Additional info:
Can be worked around by adding BuildRequires: python
My assumption is most packages contain python and python3 components, and thus bring the python2 interpretor into the buildroot for the python3 components.

Comment 1 Spencer Jackson 2011-12-30 17:09:05 UTC
Ahh, wait. I just realized I wasn't familiar with bash string operators. Setting %global __python %{__python3} resolves the issue. Closing.