[packages/python-boto] build python3 module too
jajcus
jajcus at pld-linux.org
Thu Sep 17 10:16:21 CEST 2015
commit ed60413975237fed668488ef6bcaba0bba0df3fe
Author: Jacek Konieczny <j.konieczny at eggsoft.pl>
Date: Thu Sep 17 10:16:03 2015 +0200
build python3 module too
python-boto.spec | 64 ++++++++++++++++++++++++++++++++++++++++++++++----------
1 file changed, 53 insertions(+), 11 deletions(-)
---
diff --git a/python-boto.spec b/python-boto.spec
index 86c471c..7391455 100644
--- a/python-boto.spec
+++ b/python-boto.spec
@@ -1,18 +1,21 @@
-%define realname boto
+%bcond_without python2 # CPython 2.x module
+%bcond_without python3 # CPython 3.x module
+
+%define module boto
Summary: An integrated interface to infrastructural services offered by Amazon Web Services
Summary(pl.UTF-8): Zintegrowany interfejs do usług infrastruktury oferowanych przez usługi WWW Amazon
-Name: python-%{realname}
+Name: python-%{module}
Version: 2.38.0
Release: 1
License: MIT
Group: Libraries/Python
-Source0: https://pypi.python.org/packages/source/b/boto/boto-2.38.0.tar.gz
+Source0: https://pypi.python.org/packages/source/b/boto/boto-%{version}.tar.gz
# Source0-md5: 28112f29e9c7b10e12b6917a325e70ce
URL: https://github.com/boto/boto
BuildRequires: python-devel
BuildRequires: rpm-pythonprov
BuildRequires: rpmbuild(macros) >= 1.219
-%pyrequires_eq python-libs
+Requires: python-libs
BuildArch: noarch
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -24,6 +27,19 @@ offered by Amazon Web Services.
Zintegrowany interfejs do aktualnych i przyszłych usług infrastruktury
oferowanych przez usługi WWW Amazon.
+%package -n python3-%{module}
+Summary: An integrated interface to infrastructural services offered by Amazon Web Services
+Summary(pl.UTF-8): Zintegrowany interfejs do usług infrastruktury oferowanych przez usługi WWW Amazon
+Group: Libraries/Python
+
+%description -n python3-%{module}
+An integrated interface to current and future infrastructural services
+offered by Amazon Web Services.
+
+%description -n python3-%{module} -l pl.UTF-8
+Zintegrowany interfejs do aktualnych i przyszłych usług infrastruktury
+oferowanych przez usługi WWW Amazon.
+
%package -n boto
Summary: Python utilities for Amazon Web Services
Group: Applications
@@ -31,24 +47,44 @@ Requires: %{name} = %{version}-%{release}
%description -n boto
Boto is an integrated Python interface to current and future
-infrastructural services offered by Amazon Web Services.
+infrastructural services offered by Amazon Web Services.
This package includes sample utilities implemented with this API.
%prep
-%setup -q -n %{realname}-%{version}
+%setup -q -n %{module}-%{version}
%build
-%{__python} setup.py build
+%if %{with python2}
+%{__python} setup.py build --build-base build-2 %{?with_tests:test}
+%endif
+
+%if %{with python3}
+%{__python3} setup.py build --build-base build-3 %{?with_tests:test}
+%endif
%install
rm -rf $RPM_BUILD_ROOT
-%{__python} setup.py install \
- --root=$RPM_BUILD_ROOT \
- --optimize=2
-rm -rf $RPM_BUILD_ROOT%{py_sitescriptdir}/tests
+%if %{with python2}
+%{__python} setup.py \
+ build --build-base build-2 \
+ install --skip-build \
+ --optimize=2 \
+ --root=$RPM_BUILD_ROOT
+
+rm -rf $RPM_BUILD_ROOT%{py_sitescriptdir}/tests
%py_postclean
+%endif
+
+%if %{with python3}
+%{__python3} setup.py \
+ build --build-base build-3 \
+ install --skip-build \
+ --optimize=2 \
+ --root=$RPM_BUILD_ROOT
+rm -rf $RPM_BUILD_ROOT%{py3_sitescriptdir}/tests
+%endif
%clean
rm -rf $RPM_BUILD_ROOT
@@ -59,6 +95,12 @@ rm -rf $RPM_BUILD_ROOT
%{py_sitescriptdir}/boto
%{py_sitescriptdir}/boto-*.egg-info
+%files -n python3-%{module}
+%defattr(644,root,root,755)
+%doc PKG-INFO README*
+%{py3_sitescriptdir}/boto
+%{py3_sitescriptdir}/boto-*.egg-info
+
%files -n boto
%defattr(644,root,root,755)
%attr(755,root,root) %{_bindir}/*
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/python-boto.git/commitdiff/ed60413975237fed668488ef6bcaba0bba0df3fe
More information about the pld-cvs-commit
mailing list