This commit is contained in:
parent
65e6ab3c60
commit
ca21f6720f
@ -1,11 +1,3 @@
|
|||||||
# sitelib for noarch packages
|
|
||||||
%{!?__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} || 0%{?rhel} > 7
|
|
||||||
%global with_python3 1
|
|
||||||
%endif
|
|
||||||
|
|
||||||
Name: python-virtualenv
|
Name: python-virtualenv
|
||||||
Version: 16.0.0
|
Version: 16.0.0
|
||||||
Release: 5%{?dist}
|
Release: 5%{?dist}
|
||||||
@ -35,11 +27,8 @@ BuildArch: noarch
|
|||||||
BuildRequires: git-core
|
BuildRequires: git-core
|
||||||
BuildRequires: python2-devel
|
BuildRequires: python2-devel
|
||||||
|
|
||||||
%if 0%{?with_python3}
|
|
||||||
BuildRequires: python2-sphinx
|
|
||||||
BuildRequires: python3-devel
|
BuildRequires: python3-devel
|
||||||
BuildRequires: python3-sphinx
|
BuildRequires: python3-sphinx
|
||||||
%endif # with_python3
|
|
||||||
|
|
||||||
# RPM installed wheels
|
# RPM installed wheels
|
||||||
BuildRequires: python-pip-wheel
|
BuildRequires: python-pip-wheel
|
||||||
@ -90,13 +79,6 @@ wheel that are required for virtualenv to create Python 2.6 virtual
|
|||||||
environments.
|
environments.
|
||||||
|
|
||||||
|
|
||||||
%if 0%{?with_python3}
|
|
||||||
%package -n python-virtualenv-doc
|
|
||||||
Summary: Documentation for python virtualenv
|
|
||||||
|
|
||||||
%description -n python-virtualenv-doc
|
|
||||||
Documentation for python virtualenv.
|
|
||||||
|
|
||||||
%package -n python3-virtualenv
|
%package -n python3-virtualenv
|
||||||
Summary: Tool to create isolated Python environments
|
Summary: Tool to create isolated Python environments
|
||||||
|
|
||||||
@ -105,6 +87,12 @@ Requires: python3-devel
|
|||||||
Requires: (python3-virtualenv-python26 = %{version}-%{release} if python26)
|
Requires: (python3-virtualenv-python26 = %{version}-%{release} if python26)
|
||||||
%{?python_provide:%python_provide python3-virtualenv}
|
%{?python_provide:%python_provide python3-virtualenv}
|
||||||
|
|
||||||
|
# /usr/bin/virtualenv was moved (remove in F31)
|
||||||
|
Conflicts: python2-virtualenv < 16.0.0-5
|
||||||
|
|
||||||
|
# Provide "virtualenv" for convenience
|
||||||
|
Provides: virtualenv = %{version}-%{release}
|
||||||
|
|
||||||
# RPM installed wheels
|
# RPM installed wheels
|
||||||
Requires: python-pip-wheel
|
Requires: python-pip-wheel
|
||||||
Requires: python-setuptools-wheel
|
Requires: python-setuptools-wheel
|
||||||
@ -115,7 +103,6 @@ virtualenv is a tool to create isolated Python environments. virtualenv
|
|||||||
is a successor to workingenv, and an extension of virtual-python. It is
|
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
|
written by Ian Bicking, and sponsored by the Open Planning Project. It is
|
||||||
licensed under an MIT-style permissive license
|
licensed under an MIT-style permissive license
|
||||||
%endif # with_python3
|
|
||||||
|
|
||||||
|
|
||||||
%package -n python3-virtualenv-python26
|
%package -n python3-virtualenv-python26
|
||||||
@ -134,6 +121,14 @@ This package contains wheels of older versions of argparse, pip, setuptools and
|
|||||||
wheel that are required for virtualenv to create Python 2.6 virtual
|
wheel that are required for virtualenv to create Python 2.6 virtual
|
||||||
environments.
|
environments.
|
||||||
|
|
||||||
|
|
||||||
|
%package -n python-virtualenv-doc
|
||||||
|
Summary: Documentation for python virtualenv
|
||||||
|
|
||||||
|
%description -n python-virtualenv-doc
|
||||||
|
Documentation for python virtualenv.
|
||||||
|
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup -p1 -S git -n virtualenv-%{version}
|
%autosetup -p1 -S git -n virtualenv-%{version}
|
||||||
%{__sed} -i -e "1s|#!/usr/bin/env python||" virtualenv.py
|
%{__sed} -i -e "1s|#!/usr/bin/env python||" virtualenv.py
|
||||||
@ -151,33 +146,19 @@ test $(ls virtualenv_support/*.whl -1 | wc -l) -eq 4
|
|||||||
%build
|
%build
|
||||||
# Build code
|
# Build code
|
||||||
%{py2_build}
|
%{py2_build}
|
||||||
|
|
||||||
# Build docs on Fedora
|
|
||||||
%if 0%{?with_python3}
|
|
||||||
%{__python2} setup.py build_sphinx
|
|
||||||
rm -f build/sphinx/html/.buildinfo
|
|
||||||
|
|
||||||
%{py3_build}
|
%{py3_build}
|
||||||
|
|
||||||
# Build docs on Fedora
|
# Build docs
|
||||||
%{__python3} setup.py build_sphinx
|
%{__python3} setup.py build_sphinx
|
||||||
rm -f build/sphinx/html/.buildinfo
|
rm -f build/sphinx/html/.buildinfo
|
||||||
%endif # with_python3
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%if 0%{?with_python3}
|
# As https://bugzilla.redhat.com/show_bug.cgi?id=1599422 we ship binaries in py3
|
||||||
%{py3_install}
|
|
||||||
# rename binaries to use python3
|
|
||||||
mv %{buildroot}/%{_bindir}/virtualenv %{buildroot}/%{_bindir}/py3-virtualenv
|
|
||||||
# The versioned 3.x script was removed from upstream. Add it back.
|
|
||||||
cp %{buildroot}/%{_bindir}/py3-virtualenv %{buildroot}/%{_bindir}/virtualenv-%{python3_version}
|
|
||||||
cp %{buildroot}/%{_bindir}/py3-virtualenv %{buildroot}/%{_bindir}/virtualenv-3
|
|
||||||
%endif # with_python3
|
|
||||||
|
|
||||||
%{py2_install}
|
%{py2_install}
|
||||||
# The versioned 2.x script was removed from upstream. Add it back.
|
rm %{buildroot}/%{_bindir}/virtualenv
|
||||||
cp %{buildroot}/%{_bindir}/virtualenv %{buildroot}/%{_bindir}/virtualenv-%{python2_version}
|
|
||||||
cp %{buildroot}/%{_bindir}/virtualenv %{buildroot}/%{_bindir}/virtualenv-2
|
%{py3_install}
|
||||||
|
|
||||||
|
|
||||||
%files -n python2-virtualenv
|
%files -n python2-virtualenv
|
||||||
%license LICENSE.txt
|
%license LICENSE.txt
|
||||||
@ -187,15 +168,10 @@ cp %{buildroot}/%{_bindir}/virtualenv %{buildroot}/%{_bindir}/virtualenv-2
|
|||||||
%dir %{python2_sitelib}/virtualenv_support/
|
%dir %{python2_sitelib}/virtualenv_support/
|
||||||
%{python2_sitelib}/virtualenv_support/__init__.py*
|
%{python2_sitelib}/virtualenv_support/__init__.py*
|
||||||
%{python2_sitelib}/virtualenv-*.egg-info/
|
%{python2_sitelib}/virtualenv-*.egg-info/
|
||||||
%{_bindir}/virtualenv
|
|
||||||
%{_bindir}/virtualenv-2
|
|
||||||
%{_bindir}/virtualenv-%{python2_version}
|
|
||||||
|
|
||||||
%files -n python2-virtualenv-python26
|
%files -n python2-virtualenv-python26
|
||||||
%{python2_sitelib}/virtualenv_support/*.whl
|
%{python2_sitelib}/virtualenv_support/*.whl
|
||||||
|
|
||||||
|
|
||||||
%if 0%{?with_python3}
|
|
||||||
# Include sphinx docs on Fedora
|
# Include sphinx docs on Fedora
|
||||||
%files -n python-virtualenv-doc
|
%files -n python-virtualenv-doc
|
||||||
%doc build/sphinx/*
|
%doc build/sphinx/*
|
||||||
@ -203,9 +179,7 @@ cp %{buildroot}/%{_bindir}/virtualenv %{buildroot}/%{_bindir}/virtualenv-2
|
|||||||
%files -n python3-virtualenv
|
%files -n python3-virtualenv
|
||||||
%license LICENSE.txt
|
%license LICENSE.txt
|
||||||
%doc docs/*rst PKG-INFO AUTHORS.txt
|
%doc docs/*rst PKG-INFO AUTHORS.txt
|
||||||
%{_bindir}/py3-virtualenv
|
%{_bindir}/virtualenv
|
||||||
%{_bindir}/virtualenv-3
|
|
||||||
%{_bindir}/virtualenv-%{python3_version}
|
|
||||||
%{python3_sitelib}/virtualenv.py
|
%{python3_sitelib}/virtualenv.py
|
||||||
%dir %{python3_sitelib}/virtualenv_support/
|
%dir %{python3_sitelib}/virtualenv_support/
|
||||||
%{python3_sitelib}/virtualenv_support/__init__.py
|
%{python3_sitelib}/virtualenv_support/__init__.py
|
||||||
@ -215,7 +189,6 @@ cp %{buildroot}/%{_bindir}/virtualenv %{buildroot}/%{_bindir}/virtualenv-2
|
|||||||
|
|
||||||
%files -n python3-virtualenv-python26
|
%files -n python3-virtualenv-python26
|
||||||
%{python3_sitelib}/virtualenv_support/*.whl
|
%{python3_sitelib}/virtualenv_support/*.whl
|
||||||
%endif
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -223,6 +196,8 @@ cp %{buildroot}/%{_bindir}/virtualenv %{buildroot}/%{_bindir}/virtualenv-2
|
|||||||
* Wed Aug 15 2018 Miro Hrončok <mhroncok@redhat.com> - 16.0.0-5
|
* Wed Aug 15 2018 Miro Hrončok <mhroncok@redhat.com> - 16.0.0-5
|
||||||
- Use wheels from RPM packages
|
- Use wheels from RPM packages
|
||||||
- Put wheels needed for Python 2.6 into a subpackage
|
- Put wheels needed for Python 2.6 into a subpackage
|
||||||
|
- Only have one /usr/bin/virtualenv (#1599422)
|
||||||
|
- Provide "virtualenv" (#1502670)
|
||||||
|
|
||||||
* Wed Jul 18 2018 Miro Hrončok <mhroncok@redhat.com> - 16.0.0-4
|
* Wed Jul 18 2018 Miro Hrončok <mhroncok@redhat.com> - 16.0.0-4
|
||||||
- Reintroduce support for Python 2.6 (#1602347)
|
- Reintroduce support for Python 2.6 (#1602347)
|
||||||
|
Loading…
Reference in New Issue
Block a user