Single generic package for python 2.x

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I have a python application, it can run on Python >= 2.6 and it's architecture independant.
I need the rpm package of this application to be installed on Fedora 14 (python 2.7) and Centos 6.2 (python 2.6).
I currently use mock to build one rpm package for each "flavour" and it works well.

Do I really have to use mock and build 2 rpms or is there another way to create a single generic python 2.x rpm package ?

Because apparently I can't install the Centos compiled rpm on Fedora.
It gives me this error message :

**************************************************************
error: Failed dependencies:
python(abi) = 2.6 is needed by myapp-0.9.el6.noarch
**************************************************************

Here is the relevant part of my .spec file :

*******************************************************************************************************************************************************************
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}

Name: myapp
Version: #VERSION#
Release: #RELEASE#%{dist}
Summary: myapp

Group: Development/Languages
License: Apache v2
Source0: %{name}-%{version}-#RELEASE#.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildArch: noarch

BuildRequires: python-devel
BuildRequires: python-setuptools

%description
myapp

%prep
%setup -c


%build
%{__python} setup.py build

%install
%{__rm} -rf %{buildroot}

%{__python} setup.py install -O1 --skip-build --root %{buildroot}
*******************************************************************************************************************************************************************

_______________________________________________
Rpm-list mailing list
Rpm-list@xxxxxxxxxxxxx
http://lists.rpm.org/mailman/listinfo/rpm-list

[Index of Archives]     [RPM Ecosystem]     [Linux Kernel]     [Red Hat Install]     [PAM]     [Red Hat Watch]     [Red Hat Development]     [Red Hat]     [Gimp]     [Yosemite News]     [IETF Discussion]

  Powered by Linux