d3f1ee
# sitelib for noarch packages
d3f1ee
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
d3f1ee
d3f1ee
Name:           python-virtualenv
d3f1ee
Version:        15.1.0
d3f1ee
Release:        2%{?dist}
d3f1ee
Summary:        Tool to create isolated Python environments
d3f1ee
d3f1ee
Group:          Development/Languages
d3f1ee
License:        MIT
d3f1ee
URL:            https://pypi.python.org/pypi/virtualenv
d3f1ee
Source0:        https://files.pythonhosted.org/packages/source/v/virtualenv/virtualenv-%{version}.tar.gz
d3f1ee
d3f1ee
# Disable downloading pip, wheel and setuptools from pypi
d3f1ee
# automatically when creating a new venv.
d3f1ee
# Upstream commit that was reverted:
d3f1ee
# https://github.com/pypa/virtualenv/commit/3d7361ff2e31472cb69d00150fbdf5a3c9af2a0d
d3f1ee
Patch0: disable-pypi-downloads-on-venv-creation.patch
d3f1ee
d3f1ee
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
d3f1ee
d3f1ee
BuildArch:      noarch
d3f1ee
BuildRequires:  python2-devel
d3f1ee
Requires:       python-setuptools, python2-devel
d3f1ee
d3f1ee
Provides:       python2-virtualenv = %{version}-%{release}
d3f1ee
d3f1ee
%if 0%{?fedora}
d3f1ee
BuildRequires:  python-sphinx
d3f1ee
%endif
d3f1ee
d3f1ee
d3f1ee
%description
d3f1ee
virtualenv is a tool to create isolated Python environments. virtualenv
d3f1ee
is a successor to workingenv, and an extension of virtual-python. It is
d3f1ee
written by Ian Bicking, and sponsored by the Open Planning Project. It is
d3f1ee
licensed under an MIT-style permissive license.
d3f1ee
d3f1ee
d3f1ee
%prep
d3f1ee
%setup -q -n virtualenv-%{version}
d3f1ee
%patch0 -p1
d3f1ee
%{__sed} -i -e "1s|#!/usr/bin/env python||" virtualenv.py 
d3f1ee
d3f1ee
d3f1ee
%build
d3f1ee
# Build code
d3f1ee
%{__python} setup.py build
d3f1ee
d3f1ee
# Build docs on Fedora
d3f1ee
%if 0%{?fedora} > 0
d3f1ee
%{__python} setup.py build_sphinx
d3f1ee
%endif
d3f1ee
d3f1ee
d3f1ee
%install
d3f1ee
rm -rf $RPM_BUILD_ROOT
d3f1ee
%{__python} setup.py install --skip-build --root $RPM_BUILD_ROOT
d3f1ee
rm -f build/sphinx/html/.buildinfo
d3f1ee
d3f1ee
# The versioned 2.x script was removed from upstream. Add it back.
d3f1ee
cp %{buildroot}/%{_bindir}/virtualenv %{buildroot}/%{_bindir}/virtualenv-%{python2_version}
d3f1ee
cp %{buildroot}/%{_bindir}/virtualenv %{buildroot}/%{_bindir}/virtualenv-2
d3f1ee
d3f1ee
d3f1ee
%clean
d3f1ee
rm -rf $RPM_BUILD_ROOT
d3f1ee
d3f1ee
d3f1ee
%files
d3f1ee
%defattr(-,root,root,-)
d3f1ee
%doc docs/*rst PKG-INFO AUTHORS.txt LICENSE.txt
d3f1ee
# Include sphinx docs on Fedora
d3f1ee
%if 0%{?fedora} > 0
d3f1ee
%doc build/sphinx/*
d3f1ee
%endif
d3f1ee
# For noarch packages: sitelib
d3f1ee
%{python_sitelib}/*
d3f1ee
%attr(755,root,root) %{_bindir}/virtualenv*
d3f1ee
d3f1ee
d3f1ee
%changelog
d3f1ee
* Wed Sep 13 2017 Charalampos Stratakis <cstratak@redhat.com> - 15.1.0-2
d3f1ee
- Add back the versioned virtualenv script
d3f1ee
Resolves: rhbz#1461154
d3f1ee
d3f1ee
* Wed Sep 13 2017 Charalampos Stratakis <cstratak@redhat.com> - 15.1.0-1
d3f1ee
- Rebase to version 15.1.0
d3f1ee
- Disable automatic downloads from pypi on new venv creation
d3f1ee
Resolves: rhbz#1461154
d3f1ee
d3f1ee
* Wed Feb 08 2017 Charalampos Stratakis <cstratak@redhat.com> - 1.10.1-4
d3f1ee
- Fix Python 3.4 compatibility
d3f1ee
Resolves: rhbz#1411685
d3f1ee
d3f1ee
* Mon May 09 2016 Tomas Orsava <torsava@redhat.com> - 1.10.1-3
d3f1ee
- Added a patch that shows a custom error message when a FILE passed to
d3f1ee
  virtualenv to be used as 'home dir' already exists and is NOT a directory.
d3f1ee
Resolves: rhbz#1306513
d3f1ee
d3f1ee
* Fri Dec 27 2013 Daniel Mach <dmach@redhat.com> - 1.10.1-2
d3f1ee
- Mass rebuild 2013-12-27
d3f1ee
d3f1ee
* Tue Aug 20 2013 Robert Kuska <rkuska@redhat.com> - 1.10.1-1
d3f1ee
- Update to v1.10.1 to deal with different securiy issue
d3f1ee
Resolves: CVE-2013-1633 
d3f1ee
d3f1ee
* Wed Jul 17 2013 Robert Kuska <rkuska@redhat.com> - 1.9.1-2
d3f1ee
- Delete bundled libraries of pip and setuptools
d3f1ee
d3f1ee
* Tue May 14 2013 Toshio Kuratomi <toshio@fedoraproject.org> - 1.9.1-1
d3f1ee
- Update to upstream 1.9.1 because of security issues with the bundled
d3f1ee
  python-pip in older releases.  This is just a quick fix until a
d3f1ee
  python-virtualenv maintainer can unbundle the python-pip package
d3f1ee
  see: https://bugzilla.redhat.com/show_bug.cgi?id=749378
d3f1ee
d3f1ee
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.7.2-2
d3f1ee
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
d3f1ee
d3f1ee
* Tue Aug 14 2012 Steve Milner <me@stevemilner.org> - 1.7.2-1
d3f1ee
- Update for upstream bug fixes.
d3f1ee
- Added path for versioned binary.
d3f1ee
- Patch no longer required.
d3f1ee
d3f1ee
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.7.1.2-3
d3f1ee
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
d3f1ee
d3f1ee
* Wed Mar 14 2012 Steve 'Ashcrow' Milner <me@stevemilner.org> - 1.7.1.2-1
d3f1ee
- Update for upstream bug fixes.
d3f1ee
- Added patch for sphinx building
d3f1ee
d3f1ee
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.7-2
d3f1ee
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
d3f1ee
d3f1ee
* Tue Dec 20 2011 Steve 'Ashcrow' Milner <me@stevemilner.org> - 1.7-1
d3f1ee
- Update for https://bugzilla.redhat.com/show_bug.cgi?id=769067
d3f1ee
d3f1ee
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.5.1-2
d3f1ee
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
d3f1ee
d3f1ee
* Sat Oct 16 2010 Steve 'Ashcrow' Milner <me@stevemilner.org> - 1.5.1-1
d3f1ee
- Added _weakrefset requirement for Python 2.7.1.
d3f1ee
- Add support for PyPy.
d3f1ee
- Uses a proper temporary dir when installing environment requirements.
d3f1ee
- Add --prompt option to be able to override the default prompt prefix.
d3f1ee
- Add fish and csh activate scripts.
d3f1ee
d3f1ee
* Thu Jul 22 2010 David Malcolm <dmalcolm@redhat.com> - 1.4.8-4
d3f1ee
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
d3f1ee
d3f1ee
* Tue Jul  7 2010 Steve 'Ashcrow' Milner <me@stevemilner.org> - 1.4.8-3
d3f1ee
- Fixed EPEL installation issue from BZ#611536
d3f1ee
d3f1ee
* Tue Jun  8 2010 Steve 'Ashcrow' Milner <me@stevemilner.org> - 1.4.8-2
d3f1ee
- Only replace the python shebang on the first line (Robert Buchholz)
d3f1ee
d3f1ee
* Fri Apr 28 2010 Steve 'Ashcrow' Milner <me@stevemilner.org> - 1.4.8-1
d3f1ee
- update pip to 0.7
d3f1ee
- move regen-docs into bin/
d3f1ee
- Fix #31, make activate_this.py work on Windows (use Lib/site-packages)
d3f1ee
unset PYTHONHOME envioronment variable -- first step towards fixing the PYTHONHOME issue; see e.g. https://bugs.launchpad.net/virtualenv/+bug/290844
d3f1ee
- unset PYTHONHOME in the (Unix) activate script (and reset it in deactivate())
d3f1ee
- use the activate.sh in virtualenv.py via running bin/rebuild-script.py
d3f1ee
- add warning message if PYTHONHOME is set
d3f1ee
d3f1ee
* Fri Apr 2 2010 Steve 'Ashcrow' Milner <me@stevemilner.org> - 1.4.6-1
d3f1ee
- allow script creation without setuptools
d3f1ee
- fix problem with --relocate when bin/ has subdirs (fixes #12)
d3f1ee
- Allow more flexible .pth file fixup
d3f1ee
- make nt a required module, along with posix. it may not be a builtin module on jython
d3f1ee
- don't mess with PEP 302-supplied __file__, from CPython, and merge in a small startup optimization for Jython, from Jython
d3f1ee
d3f1ee
* Tue Dec 22 2009 Steve 'Ashcrow' Milner <me@stevemilner.org> - 1.4.3-1
d3f1ee
- Updated for upstream release.
d3f1ee
d3f1ee
* Thu Nov 12 2009 Steve 'Ashcrow' Milner <me@stevemilner.org> - 1.4.2-1
d3f1ee
- Updated for upstream release.
d3f1ee
d3f1ee
* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3.3-2
d3f1ee
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
d3f1ee
d3f1ee
* Tue Apr 28 2009 Steve 'Ashcrow' Milner <me@stevemilner.org> - 1.3.3-1
d3f1ee
- Updated for upstream release.
d3f1ee
d3f1ee
* Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3.2-2
d3f1ee
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
d3f1ee
d3f1ee
* Thu Dec 25 2008 Steve 'Ashcrow' Milner <me@stevemilner.org> - 1.3.2-1
d3f1ee
- Updated for upstream release.
d3f1ee
d3f1ee
* Thu Dec 04 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 1.3.1-4
d3f1ee
- Rebuild for Python 2.6
d3f1ee
d3f1ee
* Mon Dec  1 2008 Steve 'Ashcrow' Milner <me@stevemilner.org> - 1.3.1-3
d3f1ee
- Added missing dependencies.
d3f1ee
d3f1ee
* Sat Nov 29 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 1.3.1-2
d3f1ee
- Rebuild for Python 2.6
d3f1ee
d3f1ee
* Fri Nov 28 2008 Steve 'Ashcrow' Milner <me@stevemilner.org> - 1.3.1-1
d3f1ee
- Updated for upstream release
d3f1ee
d3f1ee
* Sun Sep 28 2008 Steve 'Ashcrow' Milner <me@stevemilner.org> - 1.3-1
d3f1ee
- Updated for upstream release
d3f1ee
d3f1ee
* Sat Aug 30 2008 Steve 'Ashcrow' Milner <me@stevemilner.org> - 1.2-1
d3f1ee
- Updated for upstream release
d3f1ee
d3f1ee
* Fri Aug 29 2008 Steve 'Ashcrow' Milner <me@stevemilner.org> - 1.1-3
d3f1ee
- Updated from review notes
d3f1ee
d3f1ee
* Thu Aug 28 2008 Steve 'Ashcrow' Milner <me@stevemilner.org> - 1.1-2
d3f1ee
- Updated from review notes
d3f1ee
d3f1ee
* Tue Aug 26 2008 Steve 'Ashcrow' Milner <me@stevemilner.org> - 1.1-1
d3f1ee
- Initial Version