%{!?dotests: %define dotests 1} %define name python3-six %define srcname six %define version 1.13.0 %define release 1 %define is_python %(test -e /opt/freeware/bin/python3_32 && echo 1 || echo 0) %if %{is_python} %define python_sitelib %(python3_32 -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/python3_64 && echo 1 || echo 0) %if %{is_python_64} %define python_sitelib64 %(python3 -c "from distutils.sysconfig import get_python_lib; print (get_python_lib(1))") %endif Summary: Python 2 and 3 compatibility utilities Name: %{name} Version: %{version} Release: %{release} Source0: %{srcname}-%{version}.tar.gz License: MIT Group: Development/Libraries BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot Prefix: %{_prefix} BuildArch: noarch Vendor: Benjamin Peterson Url: http://pypi.python.org/pypi/six/ BuildRequires: python3 >= 3.7.3 BuildRequires: python3-devel >= 3.7.3 BuildRequires: python3-sphinx >= 2.2.1 BuildRequires: python3-pytest >= 5.3.1 BuildRequires: python3-py >= 1.8.0 BuildRequires: python3-pluggy >= 0.13.0 Requires: python3 >= 3.7.3 %description Six is a Python 2 and 3 compatibility library. It provides utility functions for smoothing over the differences between the Python versions with the goal of writing Python code that is compatible on both Python versions. See the documentation for more information on what is provided. Six supports Python 2.4+. Online documentation is at http://packages.python.org/six/. Bugs can be reported to http://bitbucket.org/gutworth/six. The code can also be found there. For questions about six or porting in general, email the python-porting mailing list: http://mail.python.org/mailman/listinfo/python-porting %prep %setup -q -n %{srcname}-%{version} %build python3 setup.py build if [ "%{dotests}" == 1 ] then PYTHONPATH=%{buildroot}%{python_sitelib} py.test-3 -rfsxX test_six.py fi cd documentation make text %install [ -d "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT python3 setup.py install --skip-build --root ${RPM_BUILD_ROOT} %clean [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} %files %defattr(-,root,system,-) %doc CHANGES LICENSE PKG-INFO README.rst %doc documentation %{python_sitelib}/* %changelog * Tue Oct 22 2019 Baanu Tumma - 1.13.0-1 - updated to version 1.13.0 build with python3 * Wed Aug 24 2016 Dylan McDougall - 1.10.0-1 - updated to version 1.10.0 * Wed May 25 2016 Ravi Hirekurabar - 1.3.0-1 - first version for AIX V6.1 and higher