From 667294605bf241d656af12c438d96f863f42b006 Mon Sep 17 00:00:00 2001 From: Steve Milner Date: Jun 12 2015 12:45:26 +0000 Subject: Merge branch 'master' into el6 * master: Fixup python macros, conditionl Update to 12.0.7 add python3 subpackage update to virtualenv 1.11.6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild --- diff --git a/.gitignore b/.gitignore index f148ef0..94fb3b7 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,4 @@ virtualenv-1.9.1.tar.gz /virtualenv-1.10.1.tar.gz +/virtualenv-1.11.6.tar.gz +/virtualenv-12.0.7.tar.gz diff --git a/python-virtualenv.spec b/python-virtualenv.spec index 7df24d7..29f9043 100644 --- a/python-virtualenv.spec +++ b/python-virtualenv.spec @@ -1,8 +1,13 @@ # sitelib for noarch packages -%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} +%{!?__python2: %global __python2 /usr/bin/python2} +%{!?python2_sitelib: %global python2_sitelib %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} +%{!?python2_version: %global python2_version %(%{__python2} -c "import sys; sys.stdout.write(sys.version[:3])")} +%if 0%{?fedora} +%global with_python3 1 +%endif Name: python-virtualenv -Version: 1.10.1 +Version: 12.0.7 Release: 1%{?dist} Summary: Tool to create isolated Python environments @@ -10,16 +15,25 @@ Group: Development/Languages License: MIT URL: http://pypi.python.org/pypi/virtualenv Source0: http://pypi.python.org/packages/source/v/virtualenv/virtualenv-%{version}.tar.gz -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch BuildRequires: python2-devel -Requires: python-setuptools, python2-devel %if 0%{?fedora} BuildRequires: python-sphinx %endif +%if 0%{?with_python3} +BuildRequires: python3-devel + +%if 0%{?fedora} +BuildRequires: python3-sphinx +%endif + +%endif # with_python3 + +Requires: python-setuptools +Requires: python2-devel %description virtualenv is a tool to create isolated Python environments. virtualenv @@ -27,44 +41,103 @@ is a successor to workingenv, and an extension of virtual-python. It is written by Ian Bicking, and sponsored by the Open Planning Project. It is licensed under an MIT-style permissive license. +%if 0%{?with_python3} +%package -n python3-virtualenv +Summary: Tool to create isolated Python environments + +Requires: python3-setuptools +Requires: python3-devel + +%description -n python3-virtualenv +virtualenv is a tool to create isolated Python environments. virtualenv +is a successor to workingenv, and an extension of virtual-python. It is +written by Ian Bicking, and sponsored by the Open Planning Project. It is +licensed under an MIT-style permissive license +%endif # with_python3 + %prep %setup -q -n virtualenv-%{version} %{__sed} -i -e "1s|#!/usr/bin/env python||" virtualenv.py +%if 0%{?with_python3} +rm -rf %{py3dir} +cp -a . %{py3dir} +%endif # with_python3 + %build # Build code -%{__python} setup.py build +%{__python2} setup.py build # Build docs on Fedora %if 0%{?fedora} > 0 -%{__python} setup.py build_sphinx +%{__python2} setup.py build_sphinx +rm -f build/sphinx/html/.buildinfo %endif +%if 0%{?with_python3} +pushd %{py3dir} +%{__python3} setup.py build -%install -rm -rf $RPM_BUILD_ROOT -%{__python} setup.py install --skip-build --root $RPM_BUILD_ROOT +# Build docs on Fedora +%if 0%{?fedora} > 0 +%{__python3} setup.py build_sphinx rm -f build/sphinx/html/.buildinfo +%endif +popd +%endif # with_python3 -%clean -rm -rf $RPM_BUILD_ROOT +%install +%if 0%{?with_python3} +pushd %{py3dir} +%{__python3} setup.py install --skip-build --root %{buildroot} +# rename binaries to use python3 +mv %{buildroot}/%{_bindir}/virtualenv %{buildroot}/%{_bindir}/py3-virtualenv +popd +%endif # with_python3 +%{__python2} setup.py install --skip-build --root $RPM_BUILD_ROOT %files -%defattr(-,root,root,-) %doc docs/*rst PKG-INFO AUTHORS.txt LICENSE.txt # Include sphinx docs on Fedora %if 0%{?fedora} > 0 %doc build/sphinx/* %endif -# For noarch packages: sitelib -%{python_sitelib}/* -%attr(755,root,root) %{_bindir}/virtualenv* + +%{python2_sitelib}/* +%{_bindir}/virtualenv +%{_bindir}/virtualenv-%{python2_version} + +%if 0%{?with_python3} +%files -n python3-virtualenv +%doc docs/*rst PKG-INFO AUTHORS.txt LICENSE.txt +# Include sphinx docs on Fedora +%if 0%{?fedora} > 0 +%doc build/sphinx/* +%endif +%{_bindir}/py3-virtualenv +%{_bindir}/virtualenv-%{python3_version} +%{python3_sitelib}/* +%endif + %changelog +* Mon Mar 16 2015 Matej Stuchlik - 12.0.7-1 +- Update to 12.0.7 + +* Thu Jan 15 2015 Matthias Runge - 1.11.6-2 +- add a python3-package, thanks to Matej Stuchlik (rhbz#1179150) + +* Wed Jul 09 2014 Matthias Runge - 1.11.6-1 +- update to 1.11.6: + Upstream updated setuptools to 3.6, updated pip to 1.5.6 + +* Sun Jun 08 2014 Fedora Release Engineering - 1.10.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + * Thu Aug 15 2013 Steve 'Ashcrow' Milner - 1.10.1-1 - Upstream upgraded pip to v1.4.1 - Upstream upgraded setuptools to v0.9.8 (fixes CVE-2013-1633) diff --git a/sources b/sources index 95007d5..0e70868 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -3a04aa2b32c76c83725ed4d9918e362e virtualenv-1.10.1.tar.gz +e08796f79d112f3bfa6653cc10840114 virtualenv-12.0.7.tar.gz