1afd93b
# sitelib for noarch packages
Orion Poplawski 0bf58cb
%{!?__python2: %global __python2 /usr/bin/python2}
Orion Poplawski 0bf58cb
%{!?python2_sitelib: %global python2_sitelib %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
Orion Poplawski 0bf58cb
%{!?python2_version: %global python2_version %(%{__python2} -c "import sys; sys.stdout.write(sys.version[:3])")}
83fb3a6
%if 0%{?fedora}
83fb3a6
%global with_python3 1
83fb3a6
%endif
1afd93b
1afd93b
Name:           python-virtualenv
cde8592
Version:        15.1.0
ba61380
Release:        2%{?dist}
1afd93b
Summary:        Tool to create isolated Python environments
1afd93b
1afd93b
Group:          Development/Languages
1afd93b
License:        MIT
1afd93b
URL:            http://pypi.python.org/pypi/virtualenv
1afd93b
Source0:        http://pypi.python.org/packages/source/v/virtualenv/virtualenv-%{version}.tar.gz
1afd93b
6b9ab1f
# virtualenv -p "/usr/bin/python3" venv fails if there are not packages installed
6b9ab1f
# under /usr/local/lib/pythonX.Y/site-packages. Check if exec_dir exists before
6b9ab1f
# listing it's content.
6b9ab1f
Patch0: check-exec_dir.patch
6b9ab1f
1afd93b
BuildArch:      noarch
5e51d9e
BuildRequires:  python2-devel
e24c377
5e51d9e
%if 0%{?fedora}
5e51d9e
BuildRequires:  python-sphinx
e24c377
%endif
1afd93b
Orion Poplawski 0bf58cb
%if 0%{?with_python3}
83fb3a6
BuildRequires:  python3-devel
83fb3a6
83fb3a6
%if 0%{?fedora}
83fb3a6
BuildRequires:  python3-sphinx
83fb3a6
%endif
83fb3a6
83fb3a6
%endif # with_python3
83fb3a6
1afd93b
%description
1afd93b
virtualenv is a tool to create isolated Python environments. virtualenv
1afd93b
is a successor to workingenv, and an extension of virtual-python. It is
1afd93b
written by Ian Bicking, and sponsored by the Open Planning Project. It is
1afd93b
licensed under an MIT-style permissive license.
1afd93b
Orion Poplawski 3bb4abe
Orion Poplawski 3bb4abe
%package -n     python2-virtualenv
Orion Poplawski 3bb4abe
Summary:        Tool to create isolated Python environments
Orion Poplawski 3bb4abe
Orion Poplawski 3bb4abe
Requires:       python2-setuptools
Orion Poplawski 3bb4abe
Requires:       python2-devel
Orion Poplawski 3bb4abe
%{?python_provide:%python_provide python2-virtualenv}
Orion Poplawski 3bb4abe
Orion Poplawski 3bb4abe
%description -n python2-virtualenv
Orion Poplawski 3bb4abe
virtualenv is a tool to create isolated Python environments. virtualenv
Orion Poplawski 3bb4abe
is a successor to workingenv, and an extension of virtual-python. It is
Orion Poplawski 3bb4abe
written by Ian Bicking, and sponsored by the Open Planning Project. It is
Orion Poplawski 3bb4abe
licensed under an MIT-style permissive license
Orion Poplawski 3bb4abe
Orion Poplawski 3bb4abe
Orion Poplawski 3bb4abe
%if 0%{?fedora}
Orion Poplawski 7069738
%package -n     python-virtualenv-doc
Orion Poplawski 7069738
Summary:        Documentation for python virtualenv
Orion Poplawski 7069738
Orion Poplawski 7069738
%description -n python-virtualenv-doc
Orion Poplawski 7069738
Documentation for python virtualenv.
Orion Poplawski 7069738
%endif
Orion Poplawski 7069738
83fb3a6
%if 0%{?with_python3}
83fb3a6
%package -n     python3-virtualenv
83fb3a6
Summary:        Tool to create isolated Python environments
83fb3a6
83fb3a6
Requires:       python3-setuptools
83fb3a6
Requires:       python3-devel
Orion Poplawski 3bb4abe
%{?python_provide:%python_provide python3-virtualenv}
83fb3a6
83fb3a6
%description -n python3-virtualenv
83fb3a6
virtualenv is a tool to create isolated Python environments. virtualenv
83fb3a6
is a successor to workingenv, and an extension of virtual-python. It is
83fb3a6
written by Ian Bicking, and sponsored by the Open Planning Project. It is
83fb3a6
licensed under an MIT-style permissive license
83fb3a6
%endif # with_python3
83fb3a6
1afd93b
1afd93b
%prep
1afd93b
%setup -q -n virtualenv-%{version}
d96c54a
%{__sed} -i -e "1s|#!/usr/bin/env python||" virtualenv.py 
1afd93b
6b9ab1f
%patch0 -p1
6b9ab1f
1afd93b
%build
Steve 'Ashcrow' Milner a834d89
# Build code
Orion Poplawski 3bb4abe
%{py2_build}
Steve 'Ashcrow' Milner 6dd9f54
Steve 'Ashcrow' Milner 6dd9f54
# Build docs on Fedora
Orion Poplawski 3bb4abe
%if 0%{?fedora}
83fb3a6
%{__python2} setup.py build_sphinx
bebd34c
rm -f build/sphinx/html/.buildinfo
Steve 'Ashcrow' Milner 6dd9f54
%endif
Steve 'Ashcrow' Milner 6dd9f54
83fb3a6
%if 0%{?with_python3}
Orion Poplawski 3bb4abe
%{py3_build}
1afd93b
83fb3a6
# Build docs on Fedora
Orion Poplawski 3bb4abe
%if 0%{?fedora}
83fb3a6
%{__python3} setup.py build_sphinx
83fb3a6
rm -f build/sphinx/html/.buildinfo
83fb3a6
%endif
83fb3a6
%endif # with_python3
1afd93b
83fb3a6
%install
83fb3a6
%if 0%{?with_python3}
Orion Poplawski 3bb4abe
%{py3_install}
83fb3a6
# rename binaries to use python3
83fb3a6
mv %{buildroot}/%{_bindir}/virtualenv %{buildroot}/%{_bindir}/py3-virtualenv
dcc8df3
# The versioned 3.x script was removed from upstream. Add it back.
dcc8df3
cp %{buildroot}/%{_bindir}/py3-virtualenv %{buildroot}/%{_bindir}/virtualenv-%{python3_version}
866bff2
cp %{buildroot}/%{_bindir}/py3-virtualenv %{buildroot}/%{_bindir}/virtualenv-3
83fb3a6
%endif # with_python3
1afd93b
Orion Poplawski 3bb4abe
%{py2_install}
dcc8df3
# The versioned 2.x script was removed from upstream. Add it back.
dcc8df3
cp %{buildroot}/%{_bindir}/virtualenv %{buildroot}/%{_bindir}/virtualenv-%{python2_version}
866bff2
cp %{buildroot}/%{_bindir}/virtualenv %{buildroot}/%{_bindir}/virtualenv-2
404cde7
Orion Poplawski 3bb4abe
%files -n python2-virtualenv
Orion Poplawski 3bb4abe
%license LICENSE.txt
Orion Poplawski 3bb4abe
%doc docs/*rst PKG-INFO AUTHORS.txt
bebd34c
83fb3a6
%{python2_sitelib}/*
83fb3a6
%{_bindir}/virtualenv
866bff2
%{_bindir}/virtualenv-2
83fb3a6
%{_bindir}/virtualenv-%{python2_version}
83fb3a6
Orion Poplawski 3bb4abe
%if 0%{?fedora}
Orion Poplawski 7069738
# Include sphinx docs on Fedora
Orion Poplawski 7069738
%files -n python-virtualenv-doc
83fb3a6
%doc build/sphinx/*
83fb3a6
%endif
Orion Poplawski 7069738
Orion Poplawski 7069738
%if 0%{?with_python3}
Orion Poplawski 7069738
%files -n python3-virtualenv
Orion Poplawski 3bb4abe
%license LICENSE.txt
Orion Poplawski 3bb4abe
%doc docs/*rst PKG-INFO AUTHORS.txt
83fb3a6
%{_bindir}/py3-virtualenv
866bff2
%{_bindir}/virtualenv-3
83fb3a6
%{_bindir}/virtualenv-%{python3_version}
Orion Poplawski 3bb4abe
%{python3_sitelib}/virtualenv.py
Orion Poplawski 3bb4abe
%{python3_sitelib}/virtualenv_support/
Orion Poplawski 3bb4abe
%{python3_sitelib}/virtualenv-*.egg-info/
Orion Poplawski 3bb4abe
%{python3_sitelib}/__pycache__/*
83fb3a6
%endif
83fb3a6
1afd93b
1afd93b
1afd93b
%changelog
ba61380
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 15.1.0-2
ba61380
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
ba61380
cde8592
* Mon Jun 12 2017 Steve Milner <smilner@redhat.com> - 15.1.0-1
cde8592
- Update to 15.1.0 per https://bugzilla.redhat.com/show_bug.cgi?id=1454962
cde8592
6b9ab1f
* Fri Feb 17 2017 Michal Cyprian <mcyprian@redhat.com> - 15.0.3-6
6b9ab1f
- Check if exec_dir exists before listing it's content during venv create process
6b9ab1f
396459c
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 15.0.3-5
396459c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
396459c
866bff2
* Wed Jan  4 2017 Steve Milner <smilner@redhat.com> - 15.0.3-4
866bff2
- Updated version binaries per discussion at bz#1385240.
866bff2
1e32d8a
* Tue Dec 13 2016 Stratakis Charalampos <cstratak@redhat.com> - 15.0.3-3
1e32d8a
- Rebuild for Python 3.6
1e32d8a
404cde7
* Mon Oct 17 2016 Steve Milner <smilner@redhat.com> - 15.0.3-2
404cde7
- Added MAJOR symlinks per bz#1385240.
404cde7
dcc8df3
* Mon Aug  8 2016 Steve Milner <smilner@redhat.com> - 15.0.3-1
dcc8df3
- Update for upstream release.
dcc8df3
96adc94
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 14.0.6-2
96adc94
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
96adc94
Orion Poplawski eb6b09e
* Sun Feb 21 2016 Orion Poplawski <orion@cora.nwra.com> - 14.0.6-1
Orion Poplawski eb6b09e
- Update to 14.0.6
Orion Poplawski eb6b09e
Orion Poplawski 3bb4abe
* Tue Feb 2 2016 Orion Poplawski <orion@cora.nwra.com> - 13.1.2-4
Orion Poplawski 3bb4abe
- Modernize spec
Orion Poplawski 3bb4abe
- Fix python3 package file ownership
Orion Poplawski 3bb4abe
Orion Poplawski 7069738
* Wed Dec 2 2015 Orion Poplawski <orion@cora.nwra.com> - 13.1.2-3
Orion Poplawski 7069738
- Move documentation to separate package (bug #1219139)
Orion Poplawski 7069738
Robert Kuska aa8e808
* Wed Oct 14 2015 Robert Kuska <rkuska@redhat.com> - 13.1.2-2
Robert Kuska aa8e808
- Rebuilt for Python3.5 rebuild
Robert Kuska aa8e808
29fc196
* Mon Aug 24 2015 Steve Milner <smilner@redhat.com> - 13.1.2-1
29fc196
- Update for upstream release.
29fc196
1ef1b36
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 12.0.7-2
1ef1b36
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
1ef1b36
Matej Stuchlik 343e1f6
* Mon Mar 16 2015 Matej Stuchlik <mstuchli@redhat.com> - 12.0.7-1
Matej Stuchlik 343e1f6
- Update to 12.0.7
Matej Stuchlik 343e1f6
83fb3a6
* Thu Jan 15 2015 Matthias Runge <mrunge@redhat.com> - 1.11.6-2
83fb3a6
- add a python3-package, thanks to Matej Stuchlik (rhbz#1179150)
83fb3a6
bebd34c
* Wed Jul 09 2014 Matthias Runge <mrunge@redhat.com> - 1.11.6-1
bebd34c
- update to 1.11.6:
bebd34c
  Upstream updated setuptools to 3.6, updated pip to 1.5.6
bebd34c
949ff97
* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.10.1-2
949ff97
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
949ff97
02c7502
* Thu Aug 15 2013 Steve 'Ashcrow' Milner <me@stevemilner.org> - 1.10.1-1
02c7502
- Upstream upgraded pip to v1.4.1
02c7502
- Upstream upgraded setuptools to v0.9.8 (fixes CVE-2013-1633)
02c7502
c390d77
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.9.1-2
c390d77
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
c390d77
5e51d9e
* Tue May 14 2013 Toshio Kuratomi <toshio@fedoraproject.org> - 1.9.1-1
5e51d9e
- Update to upstream 1.9.1 because of security issues with the bundled
5e51d9e
  python-pip in older releases.  This is just a quick fix until a
5e51d9e
  python-virtualenv maintainer can unbundle the python-pip package
5e51d9e
  see: https://bugzilla.redhat.com/show_bug.cgi?id=749378
5e51d9e
bd7a53e
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.7.2-2
bd7a53e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
bd7a53e
Steve Milner 2abcf6e
* Tue Aug 14 2012 Steve Milner <me@stevemilner.org> - 1.7.2-1
Steve Milner 2abcf6e
- Update for upstream bug fixes.
Steve Milner 2abcf6e
- Added path for versioned binary.
Steve Milner 2abcf6e
- Patch no longer required.
Steve Milner 2abcf6e
1e17a34
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.7.1.2-3
1e17a34
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
1e17a34
c021ce4
* Wed Mar 14 2012 Steve 'Ashcrow' Milner <me@stevemilner.org> - 1.7.1.2-1
c021ce4
- Update for upstream bug fixes.
c021ce4
- Added patch for sphinx building
c021ce4
da38b2f
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.7-2
da38b2f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
da38b2f
Steve 'Ashcrow' Milner a834d89
* Tue Dec 20 2011 Steve 'Ashcrow' Milner <me@stevemilner.org> - 1.7-1
Steve 'Ashcrow' Milner a834d89
- Update for https://bugzilla.redhat.com/show_bug.cgi?id=769067
Steve 'Ashcrow' Milner a834d89
1f9a3ef
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.5.1-2
1f9a3ef
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
1f9a3ef
Steve 'Ashcrow' Milner 7c040f7
* Sat Oct 16 2010 Steve 'Ashcrow' Milner <me@stevemilner.org> - 1.5.1-1
Steve 'Ashcrow' Milner 7c040f7
- Added _weakrefset requirement for Python 2.7.1.
Steve 'Ashcrow' Milner 7c040f7
- Add support for PyPy.
Steve 'Ashcrow' Milner 7c040f7
- Uses a proper temporary dir when installing environment requirements.
Steve 'Ashcrow' Milner 7c040f7
- Add --prompt option to be able to override the default prompt prefix.
Steve 'Ashcrow' Milner 7c040f7
- Add fish and csh activate scripts.
Steve 'Ashcrow' Milner 7c040f7
d596d56
* Thu Jul 22 2010 David Malcolm <dmalcolm@redhat.com> - 1.4.8-4
d596d56
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
d596d56
Orion Poplawski 06850de
* Wed Jul  7 2010 Steve 'Ashcrow' Milner <me@stevemilner.org> - 1.4.8-3
e24c377
- Fixed EPEL installation issue from BZ#611536
e24c377
Orion Poplawski 06850de
* Wed Jun  9 2010 Steve 'Ashcrow' Milner <me@stevemilner.org> - 1.4.8-2
d96c54a
- Only replace the python shebang on the first line (Robert Buchholz)
d96c54a
Orion Poplawski 06850de
* Wed Apr 28 2010 Steve 'Ashcrow' Milner <me@stevemilner.org> - 1.4.8-1
3990cee
- update pip to 0.7
3990cee
- move regen-docs into bin/
3990cee
- Fix #31, make activate_this.py work on Windows (use Lib/site-packages)
3990cee
unset PYTHONHOME envioronment variable -- first step towards fixing the PYTHONHOME issue; see e.g. https://bugs.launchpad.net/virtualenv/+bug/290844
3990cee
- unset PYTHONHOME in the (Unix) activate script (and reset it in deactivate())
3990cee
- use the activate.sh in virtualenv.py via running bin/rebuild-script.py
3990cee
- add warning message if PYTHONHOME is set
3990cee
e7f7ed1
* Fri Apr 2 2010 Steve 'Ashcrow' Milner <me@stevemilner.org> - 1.4.6-1
e7f7ed1
- allow script creation without setuptools
e7f7ed1
- fix problem with --relocate when bin/ has subdirs (fixes #12)
e7f7ed1
- Allow more flexible .pth file fixup
e7f7ed1
- make nt a required module, along with posix. it may not be a builtin module on jython
e7f7ed1
- don't mess with PEP 302-supplied __file__, from CPython, and merge in a small startup optimization for Jython, from Jython
e7f7ed1
254c2a6
* Tue Dec 22 2009 Steve 'Ashcrow' Milner <me@stevemilner.org> - 1.4.3-1
254c2a6
- Updated for upstream release.
254c2a6
74cf733
* Thu Nov 12 2009 Steve 'Ashcrow' Milner <me@stevemilner.org> - 1.4.2-1
74cf733
- Updated for upstream release.
74cf733
82ea0d8
* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3.3-2
82ea0d8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
82ea0d8
632b29c
* Tue Apr 28 2009 Steve 'Ashcrow' Milner <me@stevemilner.org> - 1.3.3-1
632b29c
- Updated for upstream release.
632b29c
50e9df4
* Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3.2-2
50e9df4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
50e9df4
0a12792
* Thu Dec 25 2008 Steve 'Ashcrow' Milner <me@stevemilner.org> - 1.3.2-1
0a12792
- Updated for upstream release.
0a12792
11a605c
* Thu Dec 04 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 1.3.1-4
11a605c
- Rebuild for Python 2.6
11a605c
c21f7d0
* Mon Dec  1 2008 Steve 'Ashcrow' Milner <me@stevemilner.org> - 1.3.1-3
c21f7d0
- Added missing dependencies.
c21f7d0
5b3f92f
* Sat Nov 29 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 1.3.1-2
5b3f92f
- Rebuild for Python 2.6
5b3f92f
a0f0570
* Fri Nov 28 2008 Steve 'Ashcrow' Milner <me@stevemilner.org> - 1.3.1-1
a0f0570
- Updated for upstream release
a0f0570
85462af
* Sun Sep 28 2008 Steve 'Ashcrow' Milner <me@stevemilner.org> - 1.3-1
85462af
- Updated for upstream release
85462af
1afd93b
* Sat Aug 30 2008 Steve 'Ashcrow' Milner <me@stevemilner.org> - 1.2-1
1afd93b
- Updated for upstream release
1afd93b
1afd93b
* Fri Aug 29 2008 Steve 'Ashcrow' Milner <me@stevemilner.org> - 1.1-3
1afd93b
- Updated from review notes
1afd93b
1afd93b
* Thu Aug 28 2008 Steve 'Ashcrow' Milner <me@stevemilner.org> - 1.1-2
1afd93b
- Updated from review notes
1afd93b
1afd93b
* Tue Aug 26 2008 Steve 'Ashcrow' Milner <me@stevemilner.org> - 1.1-1
1afd93b
- Initial Version