Add check if exec_dir exists before listing it's content
This commit is contained in:
parent
396459cfdd
commit
6b9ab1f32b
16
check-exec_dir.patch
Normal file
16
check-exec_dir.patch
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
diff --git a/virtualenv.py b/virtualenv.py
|
||||||
|
index c4e3bd5..89b8863 100755
|
||||||
|
--- a/virtualenv.py
|
||||||
|
+++ b/virtualenv.py
|
||||||
|
@@ -1181,8 +1181,9 @@ def install_python(home_dir, lib_dir, inc_dir, bin_dir, site_packages, clear, sy
|
||||||
|
exec_dir = join(sys.exec_prefix, 'Lib')
|
||||||
|
else:
|
||||||
|
exec_dir = join(sys.exec_prefix, 'lib', py_version)
|
||||||
|
- for fn in os.listdir(exec_dir):
|
||||||
|
- copyfile(join(exec_dir, fn), join(lib_dir, fn), symlink)
|
||||||
|
+ if os.path.isdir(exec_dir):
|
||||||
|
+ for fn in os.listdir(exec_dir):
|
||||||
|
+ copyfile(join(exec_dir, fn), join(lib_dir, fn), symlink)
|
||||||
|
|
||||||
|
if is_jython:
|
||||||
|
# Jython has either jython-dev.jar and javalib/ dir, or just
|
@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
Name: python-virtualenv
|
Name: python-virtualenv
|
||||||
Version: 15.0.3
|
Version: 15.0.3
|
||||||
Release: 5%{?dist}
|
Release: 6%{?dist}
|
||||||
Summary: Tool to create isolated Python environments
|
Summary: Tool to create isolated Python environments
|
||||||
|
|
||||||
Group: Development/Languages
|
Group: Development/Languages
|
||||||
@ -16,6 +16,11 @@ License: MIT
|
|||||||
URL: http://pypi.python.org/pypi/virtualenv
|
URL: http://pypi.python.org/pypi/virtualenv
|
||||||
Source0: http://pypi.python.org/packages/source/v/virtualenv/virtualenv-%{version}.tar.gz
|
Source0: http://pypi.python.org/packages/source/v/virtualenv/virtualenv-%{version}.tar.gz
|
||||||
|
|
||||||
|
# virtualenv -p "/usr/bin/python3" venv fails if there are not packages installed
|
||||||
|
# under /usr/local/lib/pythonX.Y/site-packages. Check if exec_dir exists before
|
||||||
|
# listing it's content.
|
||||||
|
Patch0: check-exec_dir.patch
|
||||||
|
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
BuildRequires: python2-devel
|
BuildRequires: python2-devel
|
||||||
|
|
||||||
@ -81,6 +86,8 @@ licensed under an MIT-style permissive license
|
|||||||
%setup -q -n virtualenv-%{version}
|
%setup -q -n virtualenv-%{version}
|
||||||
%{__sed} -i -e "1s|#!/usr/bin/env python||" virtualenv.py
|
%{__sed} -i -e "1s|#!/usr/bin/env python||" virtualenv.py
|
||||||
|
|
||||||
|
%patch0 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
# Build code
|
# Build code
|
||||||
%{py2_build}
|
%{py2_build}
|
||||||
@ -147,6 +154,9 @@ cp %{buildroot}/%{_bindir}/virtualenv %{buildroot}/%{_bindir}/virtualenv-2
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Feb 17 2017 Michal Cyprian <mcyprian@redhat.com> - 15.0.3-6
|
||||||
|
- Check if exec_dir exists before listing it's content during venv create process
|
||||||
|
|
||||||
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 15.0.3-5
|
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 15.0.3-5
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user