Bug 112604 - Get the python version in the spec file
Summary: Get the python version in the spec file
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: up2date
Version: 1
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Adrian Likins
QA Contact: Fanny Augustin
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2003-12-24 12:20 UTC by Robert Scheck
Modified: 2007-11-30 22:10 UTC (History)
0 users

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2004-01-24 16:36:03 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Robert Scheck 2003-12-24 12:20:50 UTC
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 16:36:03 UTC
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.