Bug 112604 - Get the python version in the spec file
Get the python version in the spec file
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: up2date (Show other bugs)
1
All Linux
medium Severity medium
: ---
: ---
Assigned To: Adrian Likins
Fanny Augustin
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2003-12-24 07:20 EST by Robert Scheck
Modified: 2007-11-30 17:10 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-01-24 11:36:03 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Robert Scheck 2003-12-24 07:20:50 EST
Description of problem:
I found the following in the spec file of up2date:

--- snipp ---
# do a better fix later
%define pythonver python2.3
--- snapp ---

May you change that to:

--- snipp ---
# get the python version for building
%define pythonver %(pythonver="python`rpm -q --queryformat='%{VERSION}' python 2>/dev/null | cut -b1-3`"; echo "$pythonver")
--- snapp ---

Maybe it's not perfect, but looks better and is more flexible than the old solution.

Version-Release number of selected component (if applicable):
up2date-4.3.1-2
Comment 1 Robert Scheck 2004-01-24 11:36:03 EST
Thanks for including my idea to the up2date spec file, but now there
is a better solution than mine in the spec file:

%define pythonver python%(%{__python} -c "import sys; print sys.version[:3]")

This one works fine, so I think, you can remove the 2 old one... :)

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