]> git.pld-linux.org Git - packages/python-boto.git/commitdiff
build python3 module too auto/th/python-boto-2.38.0-1
authorJacek Konieczny <j.konieczny@eggsoft.pl>
Thu, 17 Sep 2015 08:16:03 +0000 (10:16 +0200)
committerJacek Konieczny <j.konieczny@eggsoft.pl>
Thu, 17 Sep 2015 08:16:03 +0000 (10:16 +0200)
python-boto.spec

index 86c471c3b29d800a4d7c224047b42ed110ea3a08..7391455224f62188ae97dbab8aa93fe53f157005 100644 (file)
@@ -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}/*
This page took 0.246666 seconds and 4 git commands to generate.