[packages/python-virtualenv] up to 20.13.0
atler
atler at pld-linux.org
Wed Jan 12 19:35:25 CET 2022
commit b9bca61ecbd51c84d7d0e7853aa46356dbe8b881
Author: Jan Palus <atler at pld-linux.org>
Date: Wed Jan 12 19:33:23 2022 +0100
up to 20.13.0
- project structure/logic changed
- disable docs by default: requires manual sphinx invocation and doc
dependencies update
multilib.patch | 107 -------------------------------------------------
python-virtualenv.spec | 42 ++++++++-----------
rebuild-support.patch | 12 ------
unpack-support.py | 23 -----------
4 files changed, 17 insertions(+), 167 deletions(-)
---
diff --git a/python-virtualenv.spec b/python-virtualenv.spec
index b0c65ee..3c02bde 100644
--- a/python-virtualenv.spec
+++ b/python-virtualenv.spec
@@ -1,6 +1,6 @@
#
# Conditional build:
-%bcond_without doc # Sphinx documentation
+%bcond_with doc # Sphinx documentation
%bcond_without tests # pytest tests
%bcond_without python2 # CPython 2.x module
%bcond_without python3 # CPython 3.x module
@@ -9,16 +9,13 @@
Summary: Tool to create isolated Python environments
Summary(pl.UTF-8): Narzędzie do tworzenia oddzielonych środowisk Pythona
Name: python-virtualenv
-Version: 16.0.0
-Release: 4
+Version: 20.13.0
+Release: 1
License: MIT
Group: Development/Languages
#Source0Download: https://pypi.org/simple/virtualenv/
Source0: https://files.pythonhosted.org/packages/source/v/virtualenv/virtualenv-%{version}.tar.gz
-# Source0-md5: 4feb74ee26255dd7e62e36ce96bcc4c6
-Source1: unpack-support.py
-Patch0: multilib.patch
-Patch1: rebuild-support.patch
+# Source0-md5: 95176f0639dc033650f0f3f9fdff299e
URL: https://pypi.org/project/virtualenv/
%if %{with python2}
BuildRequires: python >= 1:2.7
@@ -44,8 +41,13 @@ BuildRequires: rpmbuild(macros) >= 1.714
# Blame binary-only python packages authors
# virtualenv wants *.py
Requires: python-devel-src >= 1:2.7
+Requires: python-distlib >= 0.3.1
+Requires: python-filelock >= 3.2
+Requires: python-pathlib >= 2.3.3
+Requires: python-platformdirs >= 2
# for virtualenv-2 wrapper
Requires: python-setuptools
+Requires: python-six >= 1.9
BuildArch: noarch
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -66,9 +68,13 @@ Project. Zostało wydane na liberalnej licencji w stylu MIT.
Summary: Tool to create isolated Python environments
Summary(pl.UTF-8): Narzędzie do tworzenia oddzielonych środowisk Pythona
Group: Libraries/Python
+Requires: python3-distlib >= 0.3.1
+Requires: python3-filelock >= 3.2
Requires: python3-modules >= 1:3.4
+Requires: python3-platformdirs >= 2
# for virtualenv-3 wrapper
Requires: python3-setuptools
+Requires: python3-six >= 1.9
%description -n python3-%{module}
virtualenv is a tool to create isolated Python environments.
@@ -108,11 +114,6 @@ Project. Zostało wydane na liberalnej licencji w stylu MIT.
%prep
%setup -q -n virtualenv-%{version}
-install -p %{SOURCE1} bin
-%{__python} ./bin/unpack-support.py
-%patch0 -p1
-%patch1 -p1
-%{__python} ./bin/rebuild-script.py
%build
%if %{with python2}
@@ -146,28 +147,19 @@ rm -rf $RPM_BUILD_ROOT
%if %{with python2}
%files
%defattr(644,root,root,755)
-%doc AUTHORS.txt LICENSE.txt README.rst docs/_build/text/*.txt
+%doc LICENSE README.md %{?with_doc:docs/_build/text/*.txt}
%attr(755,root,root) %{_bindir}/virtualenv-2
%{py_sitescriptdir}/virtualenv-%{version}-py*.egg-info
-%{py_sitescriptdir}/virtualenv.py*
-%dir %{py_sitescriptdir}/virtualenv_support
-%{py_sitescriptdir}/virtualenv_support/*.py
-%{py_sitescriptdir}/virtualenv_support/*.py[co]
-%{py_sitescriptdir}/virtualenv_support/*.whl
+%{py_sitescriptdir}/virtualenv
%endif
%if %{with python3}
%files -n python3-%{module}
%defattr(644,root,root,755)
-%doc AUTHORS.txt LICENSE.txt README.rst docs/_build/text/*.txt
+%doc LICENSE README.md %{?with_doc:docs/_build/text/*.txt}
%attr(755,root,root) %{_bindir}/virtualenv-3
%{py3_sitescriptdir}/virtualenv-%{version}-py*.egg-info
-%{py3_sitescriptdir}/__pycache__/virtualenv*
-%{py3_sitescriptdir}/virtualenv.py*
-%dir %{py3_sitescriptdir}/virtualenv_support
-%{py3_sitescriptdir}/virtualenv_support/*.py
-%{py3_sitescriptdir}/virtualenv_support/*.whl
-%{py3_sitescriptdir}/virtualenv_support/__pycache__
+%{py3_sitescriptdir}/virtualenv
%endif
%files -n virtualenv
diff --git a/multilib.patch b/multilib.patch
deleted file mode 100644
index 84dd1ba..0000000
--- a/multilib.patch
+++ /dev/null
@@ -1,107 +0,0 @@
---- virtualenv-15.0.1/virtualenv.py~ 2016-03-17 16:16:07.000000000 +0100
-+++ virtualenv-15.0.1/virtualenv.py 2016-10-18 22:48:47.174956732 +0200
-@@ -1094,7 +1094,7 @@
- else:
- prefix = sys.prefix
- mkdir(lib_dir)
-- fix_lib64(lib_dir, symlink)
-+ fix_libarch(lib_dir, symlink)
- stdlib_dirs = [os.path.dirname(os.__file__)]
- if is_win:
- stdlib_dirs.append(join(os.path.dirname(stdlib_dirs[0]), 'DLLs'))
-@@ -1498,7 +1498,7 @@
- copyfile(os.path.abspath(os.path.join(home_dir, subdir_name)), \
- os.path.join(local_path, subdir_name), symlink)
-
--def fix_lib64(lib_dir, symlink=True):
-+def fix_libarch(lib_dir, symlink=True):
- """
- Some platforms (particularly Gentoo on x64) put things in lib64/pythonX.Y
- instead of lib/pythonX.Y. If this is such a platform we'll just create a
-@@ -1507,29 +1507,37 @@
- # PyPy's library path scheme is not affected by this.
- # Return early or we will die on the following assert.
- if is_pypy:
-- logger.debug('PyPy detected, skipping lib64 symlinking')
-+ logger.debug('PyPy detected, skipping lib64/libx32 symlinking')
- return
-- # Check we have a lib64 library path
-- if not [p for p in distutils.sysconfig.get_config_vars().values()
-+ lib_arch = None
-+ # Check we have a lib64 or libx32 library path
-+ if [p for p in distutils.sysconfig.get_config_vars().values()
-+ if isinstance(p, basestring) and 'libx32' in p]:
-+ lib_arch = 'libx32'
-+
-+ if [p for p in distutils.sysconfig.get_config_vars().values()
- if isinstance(p, basestring) and 'lib64' in p]:
-+ lib_arch = 'lib64'
-+
-+ if not lib_arch:
- return
-
-- logger.debug('This system uses lib64; symlinking lib64 to lib')
-+ logger.debug('This system uses %s; symlinking %s to lib', lib_arch, lib_arch)
-
- assert os.path.basename(lib_dir) == 'python%s' % sys.version[:3], (
- "Unexpected python lib dir: %r" % lib_dir)
- lib_parent = os.path.dirname(lib_dir)
- top_level = os.path.dirname(lib_parent)
- lib_dir = os.path.join(top_level, 'lib')
-- lib64_link = os.path.join(top_level, 'lib64')
-+ libarch_link = os.path.join(top_level, lib_arch)
- assert os.path.basename(lib_parent) == 'lib', (
- "Unexpected parent dir: %r" % lib_parent)
-- if os.path.lexists(lib64_link):
-+ if os.path.lexists(libarch_link):
- return
-- if symlink:
-- os.symlink('lib', lib64_link)
-+ if True:
-+ os.symlink('lib', libarch_link)
- else:
-- copyfile('lib', lib64_link)
-+ copyfile('lib', libarch_link)
-
- def resolve_interpreter(exe):
- """
---- virtualenv-15.0.1/virtualenv_support/site.py~ 2016-10-19 09:09:07.000000000 +0200
-+++ virtualenv-15.0.1/virtualenv_support/site.py 2016-10-19 09:11:26.681732254 +0200
-@@ -243,6 +243,13 @@
- sitedirs.insert(0, lib64_dir)
- else:
- sitedirs.append(lib64_dir)
-+ libx32_dir = os.path.join(prefix, "libx32", "python" + sys.version[:3], "site-packages")
-+ if (os.path.exists(libx32_dir) and
-+ os.path.realpath(libx32_dir) not in [os.path.realpath(p) for p in sitedirs]):
-+ if _is_64bit:
-+ sitedirs.append(libx32_dir)
-+ else:
-+ sitedirs.insert(0, libx32_dir)
- try:
- # sys.getobjects only available in --with-pydebug build
- sys.getobjects
-@@ -589,6 +596,12 @@
- paths.insert(0, lib64_path)
- else:
- paths.append(lib64_path)
-+ libx32_path = os.path.join(sys.real_prefix, 'libx32', 'python'+sys.version[:3])
-+ if os.path.exists(libx32_path):
-+ if _is_64bit:
-+ paths.append(libx32_path)
-+ else:
-+ paths.insert(0, libx32_path)
- # This is hardcoded in the Python executable, but relative to
- # sys.prefix. Debian change: we need to add the multiarch triplet
- # here, which is where the real stuff lives. As per PEP 421, in
---- virtualenv-16.0.0/tests/test_virtualenv.py.orig 2018-05-17 01:36:07.000000000 +0200
-+++ virtualenv-16.0.0/tests/test_virtualenv.py 2018-07-23 21:40:47.981924463 +0200
-@@ -135,6 +135,8 @@
- for root, dirs, files in os.walk(tmp_virtualenv):
- for f in files + dirs:
- full_name = os.path.join(root, f)
-+ if os.path.islink(full_name) and os.readlink(full_name) == "lib":
-+ continue
- assert not os.path.islink(full_name), "%s should not be a" \
- " symlink (to %s)" % (full_name, os.readlink(full_name))
- finally:
diff --git a/rebuild-support.patch b/rebuild-support.patch
deleted file mode 100644
index 7ad5f08..0000000
--- a/rebuild-support.patch
+++ /dev/null
@@ -1,12 +0,0 @@
---- virtualenv-1.8.4/bin/rebuild-script.py 2011-08-31 12:30:48.000000000 +0200
-+++ virtualenv-1.9.1/bin/rebuild-script.py 2013-04-05 20:06:30.000000000 +0200
-@@ -29,7 +29,7 @@
- data = match.group(3)
-
- print('Found file %s' % fn_decoded)
-- pathname = os.path.join(here, '..', 'virtualenv_embedded', fn_decoded)
-+ pathname = os.path.join(here, '..', 'virtualenv_support', fn_decoded)
-
- with open(pathname, 'rb') as f:
- embedded = f.read()
-
diff --git a/unpack-support.py b/unpack-support.py
deleted file mode 100644
index d357315..0000000
--- a/unpack-support.py
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/usr/bin/python
-
-import re
-import os
-import sys
-
-cmd_folder = os.path.dirname(os.path.abspath(__file__))
-sys.path.insert(0, os.path.join(cmd_folder, '..'))
-
-import virtualenv
-
-file_regex = re.compile(
- r'##file (.*?)\n([a-zA-Z][a-zA-Z0-9_]+)\s*=\s*convert\("""(.*?)"""\)',
- re.S)
-
-f = open('virtualenv.py', 'rb')
-content = f.read()
-f.close()
-match = None
-for match in file_regex.finditer(content):
- f = open(os.path.join('virtualenv_support', match.group(1)), 'wb')
- f.write(eval("virtualenv." + match.group(2)).encode('utf-8'))
- f.close()
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/python-virtualenv.git/commitdiff/b9bca61ecbd51c84d7d0e7853aa46356dbe8b881
More information about the pld-cvs-commit
mailing list