%define name python-boto3 %define srcname boto3 %define version 1.2.3 %define release 1 %define is_python %(test -e /usr/bin/python && echo 1 || echo 0) %if %{is_python} %define python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)") %endif %define _libdir64 %{_prefix}/lib64 %define is_python_64 %(test -e /usr/bin/python_64 && echo 1 || echo 0) %if %{is_python_64} %define python_sitelib64 %(python_64 -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)") %endif Summary: Code coverage measurement for Python Name: %{name} Version: %{version} Release: %{release} Source0: %{srcname}-%{version}.tar.gz License: BSD Group: Development/Libraries BuildRequires: python, python-devel BuildRequires: python-setuptools BuildRequires: python-nose BuildRequires: python-mock BuildRequires: python-botocore BuildRequires: python-jmespath BuildRequires: python-futures BuildRequires: python-s3transfer Requires: python-botocore >= 1.5.0 Requires: python-jmespath >= 0.7.1 Requires: python-s3transfer >= 0.1.10 RequireS: python-futures >= 2.2.0 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot Prefix: %{_prefix} Vendor: Ned Batchelder and others Url: http://nedbatchelder.com/code/coverage Requires: python %description Boto3 is the Amazon Web Services (AWS) Software Development Kit (SDK) for Python, which allows Python developers to write software that makes use of services like Amazon S3 and Amazon EC2. %prep %setup -n %{srcname}-%{version} mkdir ../32bit mv * ../32bit mv ../32bit . mkdir 64bit cp -r 32bit/* 64bit/ %build export OBJECT_MODE=64 cd 64bit python_64 setup.py build export OBJECT_MODE=32 cd ../32bit python setup.py build %install [ -d "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT cd 64bit python_64 setup.py install --skip-build --root ${RPM_BUILD_ROOT} cd ../32bit python setup.py install --skip-build --root ${RPM_BUILD_ROOT} cd ${RPM_BUILD_ROOT} mkdir -p usr/bin cd usr/bin ln -sf ../..%{_bindir}/* . %clean [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} %files %defattr(-,root,system,-) %doc 32bit/AUTHORS.txt 32bit/CHANGES.txt 32bit/PKG-INFO 32bit/README.txt 32bit/doc %{python_sitelib}/%{srcname}/* #%{python_sitelib64}/%{srcname}/* %changelog * Tue May 9 2017 Ravi Hirekurabar -1.2.3-1 - first version for AIX V6.1 and higher