Bug 770909 - brp-python-bytecompile requires python2
Summary: brp-python-bytecompile requires python2
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: python3
Version: 16
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Dave Malcolm
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-12-30 05:16 UTC by Spencer Jackson
Modified: 2011-12-30 17:09 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-12-30 17:09:19 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

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.


Note You need to log in before you can comment on or make changes to this bug.