From a7ec8ceafd7341a7b3b5add0cb52fc9e07162541 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jan=20R=C4=99korajski?= Date: Wed, 28 Aug 2013 12:31:29 +0200 Subject: [PATCH] - updated to 1.10.1 - fixed python3 support --- python-virtualenv.spec | 12 +++++++----- virtualenv-pld.patch | 22 +++++++++++++++------- 2 files changed, 22 insertions(+), 12 deletions(-) diff --git a/python-virtualenv.spec b/python-virtualenv.spec index 64f15f3..cdd8e9e 100644 --- a/python-virtualenv.spec +++ b/python-virtualenv.spec @@ -1,12 +1,12 @@ Summary: Tool to create isolated Python environments Summary(pl.UTF-8): Narzędzie do tworzenia oddzielonych środowisk Pythona Name: python-virtualenv -Version: 1.9.1 -Release: 4 +Version: 1.10.1 +Release: 1 License: MIT Group: Development/Languages Source0: http://pypi.python.org/packages/source/v/virtualenv/virtualenv-%{version}.tar.gz -# Source0-md5: 07e09df0adfca0b2d487e39a4bf2270a +# Source0-md5: 3a04aa2b32c76c83725ed4d9918e362e Source1: https://raw.github.com/pypa/virtualenv/%{version}/bin/rebuild-script.py # Source1-md5: 5925c9a7d8e8b101c76b9c6cfa9ff297 Source2: unpack-support.py @@ -54,6 +54,9 @@ Project. Zostało wydane na liberalnej licencji w stylu MIT. %build %{__python} setup.py build +cd docs +%{__make} text + %install rm -rf $RPM_BUILD_ROOT %{__python} setup.py install \ @@ -69,11 +72,10 @@ rm -rf $RPM_BUILD_ROOT %files %defattr(644,root,root,755) -%doc docs/index.txt +%doc docs/_build/text/*.txt %attr(755,root,root) %{_bindir}/virtualenv %{py_sitescriptdir}/virtualenv-%{version}-py*.egg-info %{py_sitescriptdir}/virtualenv.py* %dir %{py_sitescriptdir}/virtualenv_support %{py_sitescriptdir}/virtualenv_support/__init__.py* %{py_sitescriptdir}/virtualenv_support/*.gz -%{py_sitescriptdir}/virtualenv_support/setuptools-*.egg diff --git a/virtualenv-pld.patch b/virtualenv-pld.patch index 31355f1..af8f622 100644 --- a/virtualenv-pld.patch +++ b/virtualenv-pld.patch @@ -6,10 +6,10 @@ 're', 'sre', 'sre_parse', 'sre_constants', 'sre_compile', - 'zlib'] + 'zlib', 'time', 'cStringIO', 'md5', '_hashlib', '_struct', 'bz2', -+ '_collections', 'operator', 'itertools', 'math', 'binascii', ++ '_collections', 'operator', 'itertools', 'math', 'binascii', 'atexit', + '_random', '_io', '_functools', 'array', '_socket', '_ssl', 'select', + 'fcntl', 'cPickle', 'datetime', 'syslog', '_sqlite3', 'unicodedata', -+ 'parser', 'simplejson', 'multiprocessing', '_multiprocessing'] ++ 'parser', 'simplejson', 'multiprocessing', '_multiprocessing', '_posixsubprocess'] REQUIRED_FILES = ['lib-dynload', 'config'] @@ -38,7 +38,7 @@ else: prefix = sys.prefix mkdir(lib_dir) -- fix_lib64(lib_dir) +- fix_lib64(lib_dir, symlink) stdlib_dirs = [os.path.dirname(os.__file__)] if is_win: stdlib_dirs.append(join(os.path.dirname(stdlib_dirs[0]), 'DLLs')) @@ -67,11 +67,11 @@ for fn in os.listdir(exec_dir): copyfile(join(exec_dir, fn), join(lib_dir, fn)) -@@ -1616,27 +1618,6 @@ - os.symlink(os.path.abspath(os.path.join(home_dir, subdir_name)), \ +@@ -1616,35 +1618,6 @@ + cp_or_ln(os.path.abspath(os.path.join(home_dir, subdir_name)), \ os.path.join(local_path, subdir_name)) --def fix_lib64(lib_dir): +-def fix_lib64(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 @@ -79,7 +79,14 @@ - """ - if [p for p in distutils.sysconfig.get_config_vars().values() - if isinstance(p, basestring) and 'lib64' in p]: +- # 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') +- return +- - logger.debug('This system uses lib64; symlinking lib64 to lib') +- - 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) @@ -90,7 +97,8 @@ - "Unexpected parent dir: %r" % lib_parent) - if os.path.lexists(lib64_link): - return -- os.symlink('lib', lib64_link) +- cp_or_ln = (os.symlink if symlink else copyfile) +- cp_or_ln('lib', lib64_link) - def resolve_interpreter(exe): """ -- 2.44.0