Updated RPM SPEC File to Support Python 3
Signed-off-by: Lars Kiesow <lkiesow@uos.de>
This commit is contained in:
parent
bf8d0729f6
commit
183cbd577a
1 changed files with 51 additions and 6 deletions
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
Name: python-%{srcname}
|
Name: python-%{srcname}
|
||||||
Version: 0.3.1
|
Version: 0.3.1
|
||||||
Release: 1%{?dist}
|
Release: 2%{?dist}
|
||||||
Summary: Feed Generator (ATOM, RSS, Podcasts)
|
Summary: Feed Generator (ATOM, RSS, Podcasts)
|
||||||
|
|
||||||
Group: Development/Libraries
|
Group: Development/Libraries
|
||||||
|
@ -17,6 +17,9 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
BuildRequires: python2-devel
|
BuildRequires: python2-devel
|
||||||
BuildRequires: python-setuptools
|
BuildRequires: python-setuptools
|
||||||
|
BuildRequires: python3-devel
|
||||||
|
BuildRequires: python3-setuptools
|
||||||
|
|
||||||
Requires: python-lxml
|
Requires: python-lxml
|
||||||
Requires: python-dateutil
|
Requires: python-dateutil
|
||||||
|
|
||||||
|
@ -26,18 +29,49 @@ has support for extensions. Included is for example an extension to produce
|
||||||
Podcasts.
|
Podcasts.
|
||||||
|
|
||||||
|
|
||||||
|
%package -n python3-%{srcname}
|
||||||
|
Summary: Feed Generator (ATOM, RSS, Podcasts)
|
||||||
|
Group: Development/Libraries
|
||||||
|
|
||||||
|
Requires: python3-lxml
|
||||||
|
Requires: python3-dateutil
|
||||||
|
|
||||||
|
%description -n python3-%{srcname}
|
||||||
|
This module can be used to generate web feeds in both ATOM and RSS format. It
|
||||||
|
has support for extensions. Included is for example an extension to produce
|
||||||
|
Podcasts.
|
||||||
|
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n %{srcname}-%{version}
|
%setup -q -n %{srcname}-%{version}
|
||||||
|
mkdir python2
|
||||||
|
mv PKG-INFO docs feedgen license.bsd license.lgpl readme.md setup.py python2
|
||||||
|
cp -r python2 python3
|
||||||
|
|
||||||
|
# ensure the right python version is used
|
||||||
|
find python3 -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python3}|'
|
||||||
|
find python2 -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python2}|'
|
||||||
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%{__python} setup.py build
|
pushd python2
|
||||||
|
%{__python2} setup.py build
|
||||||
|
popd
|
||||||
|
pushd python3
|
||||||
|
%{__python3} setup.py build
|
||||||
|
popd
|
||||||
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
rm -rf $RPM_BUILD_ROOT
|
rm -rf $RPM_BUILD_ROOT
|
||||||
%{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
|
pushd python3
|
||||||
chmod 644 $RPM_BUILD_ROOT%{python_sitelib}/%{srcname}/*.py
|
%{__python3} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
|
||||||
|
popd
|
||||||
|
pushd python2
|
||||||
|
%{__python2} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
|
||||||
|
popd
|
||||||
|
chmod 644 $RPM_BUILD_ROOT%{python3_sitelib}/%{srcname}/*.py
|
||||||
|
chmod 644 $RPM_BUILD_ROOT%{python2_sitelib}/%{srcname}/*.py
|
||||||
|
|
||||||
|
|
||||||
%clean
|
%clean
|
||||||
|
@ -46,11 +80,22 @@ rm -rf $RPM_BUILD_ROOT
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%defattr(-,root,root,-)
|
%defattr(-,root,root,-)
|
||||||
%doc docs/*
|
%license python2/license.*
|
||||||
%{python_sitelib}/*
|
%doc python2/docs/*
|
||||||
|
%{python2_sitelib}/*
|
||||||
|
|
||||||
|
|
||||||
|
%files -n python3-%{srcname}
|
||||||
|
%defattr(-,root,root,-)
|
||||||
|
%license python3/license.*
|
||||||
|
%doc python3/docs/*
|
||||||
|
%{python3_sitelib}/*
|
||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon May 4 2015 Lars Kiesow <lkiesow@uos.de> - 0.3.1-2
|
||||||
|
- Building for Python 3 as well
|
||||||
|
|
||||||
* Fri Jan 16 2015 Lars Kiesow <lkiesow@uos.de> - 0.3.1-1
|
* Fri Jan 16 2015 Lars Kiesow <lkiesow@uos.de> - 0.3.1-1
|
||||||
- Update to 0.3.1
|
- Update to 0.3.1
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue