From c6bd85c6a9000b3ba528249e84b39a52651c9a5b Mon Sep 17 00:00:00 2001 From: sagitter Date: Dec 15 2017 13:15:10 +0000 Subject: Python3 built on epel7 --- diff --git a/future.spec b/future.spec index 5719801..88107a0 100644 --- a/future.spec +++ b/future.spec @@ -15,7 +15,8 @@ %endif %if 0%{?rhel} && 0%{?rhel} > 6 -%global with_python3 0 +%global with_python3 1 +%{!?python3_shortver: %global python3_shortver %(%{__python3} -c 'import sys; print(str(sys.version_info.major) + "." + str(sys.version_info.minor))')} %endif %global with_python35 1 @@ -23,7 +24,7 @@ Name: future Summary: Easy, clean, reliable Python 2/3 compatibility Version: 0.16.0 -Release: 5%{?dist} +Release: 6%{?dist} License: MIT Group: Applications/Engineering URL: http://python-future.org/ @@ -71,16 +72,16 @@ either Py2 or Py3 code easily to support both Python 2 and 3 in a single clean Py3-style codebase, module by module. %if 0%{?with_python3} -%package -n python3-%{name} +%package -n python%{python3_pkgversion}-%{name} Summary: Easy, clean, reliable Python 2/3 compatibility -%{?python_provide:%python_provide python3-%{name}} -BuildRequires: python3-devel -BuildRequires: python3-setuptools -BuildRequires: python3-numpy -BuildRequires: python3-requests -BuildRequires: python3-pytest - -%description -n python3-%{name} +%{?python_provide:%python_provide python%{python3_pkgversion}-%{name}} +BuildRequires: python%{python3_pkgversion}-devel +BuildRequires: python%{python3_pkgversion}-setuptools +BuildRequires: python%{python3_pkgversion}-numpy +BuildRequires: python%{python3_pkgversion}-requests +BuildRequires: python%{python3_pkgversion}-pytest + +%description -n python%{python3_pkgversion}-%{name} Python3-%{name} is the missing compatibility layer between Python 2 and Python 3. It allows you to use a single, clean Python 3.x-compatible codebase to support both Python 2 and Python 3 with minimal overhead. @@ -122,19 +123,19 @@ popd %if 0%{?with_python3} pushd python3 CFLAGS="%{optflags}" %{__python3} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT -mv $RPM_BUILD_ROOT%{_bindir}/futurize $RPM_BUILD_ROOT%{_bindir}/python%{python3_version}-futurize -mv $RPM_BUILD_ROOT%{_bindir}/pasteurize $RPM_BUILD_ROOT%{_bindir}/python%{python3_version}-pasteurize +mv $RPM_BUILD_ROOT%{_bindir}/futurize $RPM_BUILD_ROOT%{_bindir}/python%{python3_pkgversion}-futurize +mv $RPM_BUILD_ROOT%{_bindir}/pasteurize $RPM_BUILD_ROOT%{_bindir}/python%{python3_pkgversion}-pasteurize sed -i -e '/^#!\//, 1d' $RPM_BUILD_ROOT%{python3_sitelib}/future/backports/test/pystone.py for i in futurize-3 futurize-%{?python3_shortver}; do touch $i install -p $i $RPM_BUILD_ROOT%{_bindir} - ln -sf %{_bindir}/python%{python3_version}-futurize $RPM_BUILD_ROOT%{_bindir}/$i + ln -sf %{_bindir}/python%{python3_pkgversion}-futurize $RPM_BUILD_ROOT%{_bindir}/$i done for i in pasteurize-3 pasteurize-%{?python3_shortver}; do touch $i install -p $i $RPM_BUILD_ROOT%{_bindir} - ln -sf %{_bindir}/python%{python3_version}-pasteurize $RPM_BUILD_ROOT%{_bindir}/$i + ln -sf %{_bindir}/python%{python3_pkgversion}-pasteurize $RPM_BUILD_ROOT%{_bindir}/$i done popd %endif @@ -166,7 +167,7 @@ popd %if 0%{?with_python3} && !%{?with_python35} pushd python3 -PYTHONPATH=$PWD/build/lib py.test-%{python3_version} -v +PYTHONPATH=$PWD/build/lib py.test-%{python3_pkgversion} -v popd %endif # with_python3 # with_python35 @@ -200,14 +201,16 @@ popd %{python2_sitelib}/*.egg-info %if 0%{?with_python3} -%files -n python3-%{name} +%files -n python%{python3_pkgversion}-%{name} %{!?_licensedir:%global license %doc} %license python3/LICENSE.txt %doc python3/README.rst -%{_bindir}/futurize-3* -%{_bindir}/pasteurize-3* -%{_bindir}/python%{python3_version}-futurize -%{_bindir}/python%{python3_version}-pasteurize +%{_bindir}/futurize-3 +%{_bindir}/futurize-%{?python3_shortver} +%{_bindir}/pasteurize-3 +%{_bindir}/pasteurize-%{?python3_shortver} +%{_bindir}/python%{python3_pkgversion}-futurize +%{_bindir}/python%{python3_pkgversion}-pasteurize %{python3_sitelib}/future/ %{python3_sitelib}/past/ %{python3_sitelib}/libfuturize/ @@ -216,6 +219,9 @@ popd %endif %changelog +* Fri Dec 15 2017 Antonio Trande - 0.16.0-6 +- Python3 built on epel7 + * Wed Jul 26 2017 Fedora Release Engineering - 0.16.0-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild