Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

distutils.sysconfig directory returns Makefile relative to venv #1783

Closed
bnomis opened this issue Apr 21, 2020 · 6 comments
Closed

distutils.sysconfig directory returns Makefile relative to venv #1783

bnomis opened this issue Apr 21, 2020 · 6 comments
Labels

Comments

@bnomis
Copy link

@bnomis bnomis commented Apr 21, 2020

Issue

Starting in virtualenv 20.0.5 the path to the sysconfig directory changed to be relative to the virtualenv. Prior to 20.0.5 distutils.sysconfig.get_makefile_filename() returned the Makefile in the master Python install. Since 20.0.5 it returns venv/lib/python2.7/config/Makefile which does not exist.

This is an issue for programs which try to read/parse the non-existent Makefile. For example, numpy 1.16.x install fails see line at URL below

https://github.com/numpy/numpy/blob/12daed78eecbacdb35b49335f061b2437f019f0f/numpy/distutils/fcompiler/gnu.py#L142

The following is a simple program to demonstrate the issue. In 20.0.4 a path to an existing Makefile is returned. From 20.0.5 the path returned does not exist.

import distutils.sysconfig
import os.path

filename = distutils.sysconfig.get_makefile_filename()

print('%s: %s' % (filename, os.path.exists(filename)))

Environment Follows

Python

$ python --version
Python 2.7.14

OS

$ uname -a
Darwin eddie.local 18.7.0 Darwin Kernel Version 18.7.0: Mon Feb 10 21:08:45 PST 2020; root:xnu-4903.278.28~1/RELEASE_X86_64 x86_64

pip list

Package                       Version
----------------------------- -----------
alabaster                     0.7.12
ansible                       2.9.7
ansible-lint                  4.2.0
appdirs                       1.4.3
astroid                       1.6.6
awscli                        1.18.42
Babel                         2.8.0
backports-abc                 0.5
backports.functools-lru-cache 1.6.1
botocore                      1.15.42
certifi                       2020.4.5.1
cffi                          1.14.0
chardet                       3.0.4
click                         7.1.1
colorama                      0.4.3
configparser                  4.0.2
contextlib2                   0.6.0.post1
cryptography                  2.9
distlib                       0.3.0
docutils                      0.15.2
entrypoints                   0.3
enum34                        1.1.10
filelock                      3.0.12
flake8                        3.7.9
flake8-isort                  3.0.0
functools32                   3.2.3.post2
futures                       3.3.0
hvac                          0.10.1
idna                          2.9
imagesize                     1.2.0
importlib-metadata            1.6.0
importlib-resources           1.4.0
ipaddress                     1.0.23
isort                         4.3.21
Jinja2                        2.11.2
jmespath                      0.9.5
lazy-object-proxy             1.4.3
livereload                    2.6.1
Markdown                      3.1.1
MarkupSafe                    1.1.1
mccabe                        0.6.1
mkdocs                        1.0.4
packaging                     20.3
pathlib2                      2.3.5
Pillow                        6.2.2
pip                           20.0.2
pipsi                         0.9
pluggy                        0.13.1
py                            1.8.1
pyasn1                        0.4.8
pycodestyle                   2.5.0
pycparser                     2.20
pyflakes                      2.1.1
Pygments                      2.5.2
pylint                        1.9.5
pyparsing                     2.4.7
python-dateutil               2.8.1
pytz                          2019.3
PyYAML                        5.3.1
requests                      2.23.0
rsa                           3.4.2
ruamel.ordereddict            0.4.14
ruamel.yaml                   0.16.10
ruamel.yaml.clib              0.2.0
s3transfer                    0.3.3
scandir                       1.10.0
setuptools                    44.1.0
singledispatch                3.4.0.3
six                           1.14.0
snowballstemmer               2.0.0
Sphinx                        1.8.5
sphinx-bootstrap-theme        0.7.1
sphinx-rtd-theme              0.4.3
sphinxcontrib-websupport      1.1.2
testfixtures                  6.14.1
toml                          0.10.0
tornado                       5.1.1
tox                           3.14.6
typing                        3.7.4.1
urllib3                       1.25.9
virtualenv                    20.0.18
wheel                         0.34.2
wrapt                         1.11.2
xkcdpass                      1.17.3
yapf                          0.29.0
zipp                          1.2.0

Output of virtual environment creation

$ virtualenv -vvv --with-traceback venv
332 setup logging to NOTSET [DEBUG report:43]
471 find interpreter for spec PythonSpec(path=/Users/simonb/.pyenv/versions/2.7.14/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python) [INFO builtin:44]
471 proposed PythonInfo({'base_exec_prefix': None, 'system_stdlib': u'/Users/simonb/.pyenv/versions/2.7.14/Python.framework/Versions/2.7/lib/python2.7', 'has_venv': False, 'prefix': u'/Users/simonb/.pyenv/versions/2.7.14/Python.framework/Versions/2.7', 'stdout_encoding': u'UTF-8', 'executable': '/Users/simonb/.pyenv/versions/2.7.14/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python', 'implementation': u'CPython', 'exec_prefix': u'/Users/simonb/.pyenv/versions/2.7.14/Python.framework/Versions/2.7', 'platform': u'darwin', 'version': u'2.7.14 (default, Apr 21 2020, 10:24:39) \n[GCC 4.2.1 Compatible Apple LLVM 11.0.0 (clang-1100.0.33.17)]', 'sysconfig_paths': {u'platstdlib': u'{platbase}/lib/python{py_version_short}', u'platlib': u'{platbase}/lib/python{py_version_short}/site-packages', u'purelib': u'{base}/lib/python{py_version_short}/site-packages', u'stdlib': u'{base}/lib/python{py_version_short}', u'scripts': u'{base}/bin', u'include': u'{base}/include/python{py_version_short}', u'data': u'{base}'}, 'base_prefix': None, 'system_stdlib_platform': u'/Users/simonb/.pyenv/versions/2.7.14/Python.framework/Versions/2.7/lib/python2.7', 'file_system_encoding': u'utf-8', 'version_info': VersionInfo(major=2, minor=7, micro=14, releaselevel=u'final', serial=0), 'sysconfig_vars': {u'base': u'/Users/simonb/.pyenv/versions/2.7.14/Python.framework/Versions/2.7', u'platbase': u'/Users/simonb/.pyenv/versions/2.7.14/Python.framework/Versions/2.7', u'PYTHONFRAMEWORK': u'Python', u'py_version_short': u'2.7'}, 'path': [u'/Users/simonb/.pyenv/versions/2.7.14/Python.framework/Versions/2.7/bin', u'/Users/simonb/.pyenv/versions/2.7.14/Python.framework/Versions/2.7/lib/python27.zip', u'/Users/simonb/.pyenv/versions/2.7.14/Python.framework/Versions/2.7/lib/python2.7', u'/Users/simonb/.pyenv/versions/2.7.14/Python.framework/Versions/2.7/lib/python2.7/plat-darwin', u'/Users/simonb/.pyenv/versions/2.7.14/Python.framework/Versions/2.7/lib/python2.7/plat-mac', u'/Users/simonb/.pyenv/versions/2.7.14/Python.framework/Versions/2.7/lib/python2.7/plat-mac/lib-scriptpackages', u'/Users/simonb/.pyenv/versions/2.7.14/Python.framework/Versions/2.7/lib/python2.7/lib-tk', u'/Users/simonb/.pyenv/versions/2.7.14/Python.framework/Versions/2.7/lib/python2.7/lib-old', u'/Users/simonb/.pyenv/versions/2.7.14/Python.framework/Versions/2.7/lib/python2.7/lib-dynload', u'/Users/simonb/Library/Python/2.7/lib/python/site-packages', u'/Users/simonb/.pyenv/versions/2.7.14/Python.framework/Versions/2.7/lib/python2.7/site-packages'], 'max_size': 9223372036854775807, 'real_prefix': None, 'distutils_install': {u'purelib': u'lib/python2.7/site-packages', u'headers': u'include/python2.7/UNKNOWN', u'platlib': u'lib/python2.7/site-packages', u'data': u'', u'scripts': u'bin'}, 'architecture': 64, 'original_executable': u'/Users/simonb/.pyenv/versions/2.7.14/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python', 'os': u'posix', 'system_executable': u'/Users/simonb/.pyenv/versions/2.7.14/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python'}) [INFO builtin:50]
472 accepted PythonInfo({'base_exec_prefix': None, 'system_stdlib': u'/Users/simonb/.pyenv/versions/2.7.14/Python.framework/Versions/2.7/lib/python2.7', 'has_venv': False, 'prefix': u'/Users/simonb/.pyenv/versions/2.7.14/Python.framework/Versions/2.7', 'stdout_encoding': u'UTF-8', 'executable': '/Users/simonb/.pyenv/versions/2.7.14/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python', 'implementation': u'CPython', 'exec_prefix': u'/Users/simonb/.pyenv/versions/2.7.14/Python.framework/Versions/2.7', 'platform': u'darwin', 'version': u'2.7.14 (default, Apr 21 2020, 10:24:39) \n[GCC 4.2.1 Compatible Apple LLVM 11.0.0 (clang-1100.0.33.17)]', 'sysconfig_paths': {u'platstdlib': u'{platbase}/lib/python{py_version_short}', u'platlib': u'{platbase}/lib/python{py_version_short}/site-packages', u'purelib': u'{base}/lib/python{py_version_short}/site-packages', u'stdlib': u'{base}/lib/python{py_version_short}', u'scripts': u'{base}/bin', u'include': u'{base}/include/python{py_version_short}', u'data': u'{base}'}, 'base_prefix': None, 'system_stdlib_platform': u'/Users/simonb/.pyenv/versions/2.7.14/Python.framework/Versions/2.7/lib/python2.7', 'file_system_encoding': u'utf-8', 'version_info': VersionInfo(major=2, minor=7, micro=14, releaselevel=u'final', serial=0), 'sysconfig_vars': {u'base': u'/Users/simonb/.pyenv/versions/2.7.14/Python.framework/Versions/2.7', u'platbase': u'/Users/simonb/.pyenv/versions/2.7.14/Python.framework/Versions/2.7', u'PYTHONFRAMEWORK': u'Python', u'py_version_short': u'2.7'}, 'path': [u'/Users/simonb/.pyenv/versions/2.7.14/Python.framework/Versions/2.7/bin', u'/Users/simonb/.pyenv/versions/2.7.14/Python.framework/Versions/2.7/lib/python27.zip', u'/Users/simonb/.pyenv/versions/2.7.14/Python.framework/Versions/2.7/lib/python2.7', u'/Users/simonb/.pyenv/versions/2.7.14/Python.framework/Versions/2.7/lib/python2.7/plat-darwin', u'/Users/simonb/.pyenv/versions/2.7.14/Python.framework/Versions/2.7/lib/python2.7/plat-mac', u'/Users/simonb/.pyenv/versions/2.7.14/Python.framework/Versions/2.7/lib/python2.7/plat-mac/lib-scriptpackages', u'/Users/simonb/.pyenv/versions/2.7.14/Python.framework/Versions/2.7/lib/python2.7/lib-tk', u'/Users/simonb/.pyenv/versions/2.7.14/Python.framework/Versions/2.7/lib/python2.7/lib-old', u'/Users/simonb/.pyenv/versions/2.7.14/Python.framework/Versions/2.7/lib/python2.7/lib-dynload', u'/Users/simonb/Library/Python/2.7/lib/python/site-packages', u'/Users/simonb/.pyenv/versions/2.7.14/Python.framework/Versions/2.7/lib/python2.7/site-packages'], 'max_size': 9223372036854775807, 'real_prefix': None, 'distutils_install': {u'purelib': u'lib/python2.7/site-packages', u'headers': u'include/python2.7/UNKNOWN', u'platlib': u'lib/python2.7/site-packages', u'data': u'', u'scripts': u'bin'}, 'architecture': 64, 'original_executable': u'/Users/simonb/.pyenv/versions/2.7.14/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python', 'os': u'posix', 'system_executable': u'/Users/simonb/.pyenv/versions/2.7.14/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python'}) [DEBUG builtin:52]
479 filesystem is not case-sensitive [DEBUG info:28]
629 create virtual environment via CPython2macOsFramework(dest=/Users/simonb/Downloads/tmp/venv, clear=False, global=False) [INFO session:52]
630 create folder /Users/simonb/Downloads/tmp/venv/bin [DEBUG _sync:21]
630 create folder /Users/simonb/Downloads/tmp/venv/include [DEBUG _sync:21]
630 create folder /Users/simonb/Downloads/tmp/venv/lib/python2.7/site-packages [DEBUG _sync:21]
631 write /Users/simonb/Downloads/tmp/venv/pyvenv.cfg [DEBUG pyenv_cfg:34]
631 	home = /Users/simonb/.pyenv/versions/2.7.14/Python.framework/Versions/2.7 [DEBUG pyenv_cfg:38]
631 	implementation = CPython [DEBUG pyenv_cfg:38]
631 	version_info = 2.7.14.final.0 [DEBUG pyenv_cfg:38]
631 	virtualenv = 20.0.18 [DEBUG pyenv_cfg:38]
631 	include-system-site-packages = false [DEBUG pyenv_cfg:38]
631 	base-prefix = /Users/simonb/.pyenv/versions/2.7.14/Python.framework/Versions/2.7 [DEBUG pyenv_cfg:38]
631 	base-exec-prefix = /Users/simonb/.pyenv/versions/2.7.14/Python.framework/Versions/2.7 [DEBUG pyenv_cfg:38]
631 	base-executable = /Users/simonb/.pyenv/versions/2.7.14/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python [DEBUG pyenv_cfg:38]
631 copy /Users/simonb/.pyenv/versions/2.7.14/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python to /Users/simonb/Downloads/tmp/venv/bin/python [DEBUG _sync:48]
673 symlink /Users/simonb/.pyenv/versions/2.7.14/Python.framework/Versions/2.7/lib/python2.7/os.py to /Users/simonb/Downloads/tmp/venv/lib/python2.7/os.py [DEBUG _sync:40]
674 symlink /Users/simonb/.pyenv/versions/2.7.14/Python.framework/Versions/2.7/lib/python2.7/os.pyc to /Users/simonb/Downloads/tmp/venv/lib/python2.7/os.pyc [DEBUG _sync:40]
674 symlink directory /Users/simonb/.pyenv/versions/2.7.14/Python.framework/Versions/2.7/include/python2.7 to /Users/simonb/Downloads/tmp/venv/include/python2.7 [DEBUG _sync:40]
674 symlink /Users/simonb/.pyenv/versions/2.7.14/Python.framework/Versions/2.7/Python to /Users/simonb/Downloads/tmp/venv/.Python [DEBUG _sync:40]
674 symlink directory /Users/simonb/.pyenv/versions/2.7.14/Python.framework/Versions/2.7/lib/python2.7/lib-dynload to /Users/simonb/Downloads/tmp/venv/lib/python2.7/lib-dynload [DEBUG _sync:40]
677 create virtualenv import hook file /Users/simonb/Downloads/tmp/venv/lib/python2.7/site-packages/_virtualenv.pth [DEBUG api:78]
678 create /Users/simonb/Downloads/tmp/venv/lib/python2.7/site-packages/_virtualenv.py [DEBUG api:81]
765 change Mach-O for /Users/simonb/Downloads/tmp/venv/bin/python from /Users/simonb/.pyenv/versions/2.7.14/Python.framework/Versions/2.7/Python to @executable_path/../.Python [DEBUG mac_os:158]
807 ============================== target debug ============================== [DEBUG session:54]
807 debug via /Users/simonb/Downloads/tmp/venv/bin/python /Users/simonb/.pyenv/versions/2.7.14/Python.framework/Versions/2.7/lib/python2.7/site-packages/virtualenv/create/debug.py [DEBUG creator:187]
807 {
  "site": "<module 'site' from '/Users/simonb/.pyenv/versions/2.7.14/Python.framework/Versions/2.7/lib/python2.7/site.pyc'>",
  "datetime": "<module 'datetime' from '/Users/simonb/.pyenv/versions/2.7.14/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/datetime.so'>",
  "sys": {
    "executable": "/Users/simonb/Downloads/tmp/venv/bin/python",
    "real_prefix": "/Users/simonb/.pyenv/versions/2.7.14/Python.framework/Versions/2.7",
    "base_exec_prefix": "/Users/simonb/.pyenv/versions/2.7.14/Python.framework/Versions/2.7",
    "exec_prefix": "/Users/simonb/Downloads/tmp/venv/bin/..",
    "io_encoding": null,
    "meta_path": [
      "<class '_virtualenv._VirtualenvImporter'>"
    ],
    "fs_encoding": "utf-8",
    "prefix": "/Users/simonb/Downloads/tmp/venv/bin/..",
    "_base_executable": null,
    "path": [
      "/Users/simonb/.pyenv/versions/2.7.14/Python.framework/Versions/2.7/lib/python27.zip",
      "/Users/simonb/.pyenv/versions/2.7.14/Python.framework/Versions/2.7/lib/python2.7",
      "/Users/simonb/.pyenv/versions/2.7.14/Python.framework/Versions/2.7/lib/python2.7/plat-darwin",
      "/Users/simonb/.pyenv/versions/2.7.14/Python.framework/Versions/2.7/lib/python2.7/plat-mac",
      "/Users/simonb/.pyenv/versions/2.7.14/Python.framework/Versions/2.7/lib/python2.7/plat-mac/lib-scriptpackages",
      "/Users/simonb/.pyenv/versions/2.7.14/Python.framework/Versions/2.7/lib/python2.7/lib-tk",
      "/Users/simonb/.pyenv/versions/2.7.14/Python.framework/Versions/2.7/lib/python2.7/lib-old",
      "/Users/simonb/.pyenv/versions/2.7.14/Python.framework/Versions/2.7/lib/python2.7/lib-dynload",
      "/Users/simonb/Downloads/tmp/venv/lib/python2.7/site-packages"
    ],
    "base_prefix": "/Users/simonb/.pyenv/versions/2.7.14/Python.framework/Versions/2.7"
  },
  "json": "<module 'json' from '/Users/simonb/.pyenv/versions/2.7.14/Python.framework/Versions/2.7/lib/python2.7/json/__init__.pyc'>",
  "version": "2.7.14 (default, Apr 21 2020, 10:24:39) \n[GCC 4.2.1 Compatible Apple LLVM 11.0.0 (clang-1100.0.33.17)]",
  "os": "<module 'os' from '/Users/simonb/.pyenv/versions/2.7.14/Python.framework/Versions/2.7/lib/python2.7/os.pyc'>",
  "math": "<module 'math' from '/Users/simonb/.pyenv/versions/2.7.14/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/math.so'>"
} [DEBUG session:55]
969 add seed packages via FromAppData(download=False, pip=latest, setuptools=latest, wheel=latest, via=copy, app_data_dir=/Users/simonb/Library/Application Support/virtualenv/seed-app-data/v1.0.1) [INFO session:59]
969 Attempting to acquire lock 4551654288 on /Users/simonb/Library/Application Support/virtualenv/seed-app-data/v1.0.1/2.7/wheels.lock [DEBUG filelock:270]
970 Lock 4551654288 acquired on /Users/simonb/Library/Application Support/virtualenv/seed-app-data/v1.0.1/2.7/wheels.lock [INFO filelock:274]
974 get bundled wheel /Users/simonb/.pyenv/versions/2.7.14/Python.framework/Versions/2.7/lib/python2.7/site-packages/virtualenv/seed/embed/wheels/pip-20.0.2-py2.py3-none-any.whl [DEBUG acquire:51]
975 get bundled wheel /Users/simonb/.pyenv/versions/2.7.14/Python.framework/Versions/2.7/lib/python2.7/site-packages/virtualenv/seed/embed/wheels/wheel-0.34.2-py2.py3-none-any.whl [DEBUG acquire:51]
975 get bundled wheel /Users/simonb/.pyenv/versions/2.7.14/Python.framework/Versions/2.7/lib/python2.7/site-packages/virtualenv/seed/embed/wheels/setuptools-44.1.0-py2.py3-none-any.whl [DEBUG acquire:51]
1028 install wheel from wheel /Users/simonb/Library/Application Support/virtualenv/seed-app-data/v1.0.1/2.7/wheels/wheel-0.34.2-py2.py3-none-any.whl via CopyPipInstall [DEBUG via_app_data:46]
1029 install pip from wheel /Users/simonb/Library/Application Support/virtualenv/seed-app-data/v1.0.1/2.7/wheels/pip-20.0.2-py2.py3-none-any.whl via CopyPipInstall [DEBUG via_app_data:46]
1029 install setuptools from wheel /Users/simonb/Library/Application Support/virtualenv/seed-app-data/v1.0.1/2.7/wheels/setuptools-44.1.0-py2.py3-none-any.whl via CopyPipInstall [DEBUG via_app_data:46]
1030 copy /Users/simonb/Library/Application Support/virtualenv/seed-app-data/v1.0.1/2.7/image/CopyPipInstall/setuptools-44.1.0-py2.py3-none-any/easy_install.py to /Users/simonb/Downloads/tmp/venv/lib/python2.7/site-packages/easy_install.py [DEBUG _sync:48]
1030 copy /Users/simonb/Library/Application Support/virtualenv/seed-app-data/v1.0.1/2.7/image/CopyPipInstall/wheel-0.34.2-py2.py3-none-any/wheel-0.34.2.virtualenv to /Users/simonb/Downloads/tmp/venv/lib/python2.7/site-packages/wheel-0.34.2.virtualenv [DEBUG _sync:48]
1031 copy directory /Users/simonb/Library/Application Support/virtualenv/seed-app-data/v1.0.1/2.7/image/CopyPipInstall/wheel-0.34.2-py2.py3-none-any/wheel to /Users/simonb/Downloads/tmp/venv/lib/python2.7/site-packages/wheel [DEBUG _sync:48]
1031 copy /Users/simonb/Library/Application Support/virtualenv/seed-app-data/v1.0.1/2.7/image/CopyPipInstall/pip-20.0.2-py2.py3-none-any/pip-20.0.2.virtualenv to /Users/simonb/Downloads/tmp/venv/lib/python2.7/site-packages/pip-20.0.2.virtualenv [DEBUG _sync:48]
1032 copy directory /Users/simonb/Library/Application Support/virtualenv/seed-app-data/v1.0.1/2.7/image/CopyPipInstall/pip-20.0.2-py2.py3-none-any/pip to /Users/simonb/Downloads/tmp/venv/lib/python2.7/site-packages/pip [DEBUG _sync:48]
1087 copy /Users/simonb/Library/Application Support/virtualenv/seed-app-data/v1.0.1/2.7/image/CopyPipInstall/setuptools-44.1.0-py2.py3-none-any/setuptools-44.1.0.virtualenv to /Users/simonb/Downloads/tmp/venv/lib/python2.7/site-packages/setuptools-44.1.0.virtualenv [DEBUG _sync:48]
1088 copy directory /Users/simonb/Library/Application Support/virtualenv/seed-app-data/v1.0.1/2.7/image/CopyPipInstall/setuptools-44.1.0-py2.py3-none-any/setuptools-44.1.0.dist-info to /Users/simonb/Downloads/tmp/venv/lib/python2.7/site-packages/setuptools-44.1.0.dist-info [DEBUG _sync:48]
1279 copy directory /Users/simonb/Library/Application Support/virtualenv/seed-app-data/v1.0.1/2.7/image/CopyPipInstall/setuptools-44.1.0-py2.py3-none-any/setuptools to /Users/simonb/Downloads/tmp/venv/lib/python2.7/site-packages/setuptools [DEBUG _sync:48]
1419 copy directory /Users/simonb/Library/Application Support/virtualenv/seed-app-data/v1.0.1/2.7/image/CopyPipInstall/wheel-0.34.2-py2.py3-none-any/wheel-0.34.2.dist-info to /Users/simonb/Downloads/tmp/venv/lib/python2.7/site-packages/wheel-0.34.2.dist-info [DEBUG _sync:48]
1454 changing mode of /Users/simonb/Downloads/tmp/venv/bin/wheel to 755 [INFO util:566]
1455 changing mode of /Users/simonb/Downloads/tmp/venv/bin/wheel-2.7 to 755 [INFO util:566]
1457 changing mode of /Users/simonb/Downloads/tmp/venv/bin/wheel2 to 755 [INFO util:566]
1457 generated console scripts wheel2 wheel-2.7 wheel [DEBUG base:53]
3140 copy directory /Users/simonb/Library/Application Support/virtualenv/seed-app-data/v1.0.1/2.7/image/CopyPipInstall/setuptools-44.1.0-py2.py3-none-any/pkg_resources to /Users/simonb/Downloads/tmp/venv/lib/python2.7/site-packages/pkg_resources [DEBUG _sync:48]
3808 changing mode of /Users/simonb/Downloads/tmp/venv/bin/easy_install to 755 [INFO util:566]
3835 changing mode of /Users/simonb/Downloads/tmp/venv/bin/easy_install2 to 755 [INFO util:566]
3862 changing mode of /Users/simonb/Downloads/tmp/venv/bin/easy_install-2.7 to 755 [INFO util:566]
3862 generated console scripts easy_install-2.7 easy_install easy_install2 [DEBUG base:53]
8245 copy directory /Users/simonb/Library/Application Support/virtualenv/seed-app-data/v1.0.1/2.7/image/CopyPipInstall/pip-20.0.2-py2.py3-none-any/pip-20.0.2.dist-info to /Users/simonb/Downloads/tmp/venv/lib/python2.7/site-packages/pip-20.0.2.dist-info [DEBUG _sync:48]
8293 changing mode of /Users/simonb/Downloads/tmp/venv/bin/pip to 755 [INFO util:566]
8295 changing mode of /Users/simonb/Downloads/tmp/venv/bin/pip2.7 to 755 [INFO util:566]
8295 changing mode of /Users/simonb/Downloads/tmp/venv/bin/pip-2.7 to 755 [INFO util:566]
8296 changing mode of /Users/simonb/Downloads/tmp/venv/bin/pip2 to 755 [INFO util:566]
8296 generated console scripts pip2.7 pip2 pip-2.7 pip [DEBUG base:53]
8296 Attempting to release lock 4551654288 on /Users/simonb/Library/Application Support/virtualenv/seed-app-data/v1.0.1/2.7/wheels.lock [DEBUG filelock:315]
8296 Lock 4551654288 released on /Users/simonb/Library/Application Support/virtualenv/seed-app-data/v1.0.1/2.7/wheels.lock [INFO filelock:318]
8297 add activators for Python, CShell, Fish, PowerShell, Bash [INFO session:65]
8420 write /Users/simonb/Downloads/tmp/venv/pyvenv.cfg [DEBUG pyenv_cfg:34]
8420 	home = /Users/simonb/.pyenv/versions/2.7.14/Python.framework/Versions/2.7 [DEBUG pyenv_cfg:38]
8420 	implementation = CPython [DEBUG pyenv_cfg:38]
8420 	version_info = 2.7.14.final.0 [DEBUG pyenv_cfg:38]
8420 	virtualenv = 20.0.18 [DEBUG pyenv_cfg:38]
8421 	include-system-site-packages = false [DEBUG pyenv_cfg:38]
8421 	base-prefix = /Users/simonb/.pyenv/versions/2.7.14/Python.framework/Versions/2.7 [DEBUG pyenv_cfg:38]
8421 	base-exec-prefix = /Users/simonb/.pyenv/versions/2.7.14/Python.framework/Versions/2.7 [DEBUG pyenv_cfg:38]
8421 	base-executable = /Users/simonb/.pyenv/versions/2.7.14/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python [DEBUG pyenv_cfg:38]
8421 created virtual environment CPython2.7.14.final.0-64 in 8090ms
  creator CPython2macOsFramework(dest=/Users/simonb/Downloads/tmp/venv, clear=False, global=False)
  seeder FromAppData(download=False, pip=latest, setuptools=latest, wheel=latest, via=copy, app_data_dir=/Users/simonb/Library/Application Support/virtualenv/seed-app-data/v1.0.1)
  activators PythonActivator,CShellActivator,FishActivator,PowerShellActivator,BashActivator [WARNING __main__:21]
@bnomis bnomis added the bug label Apr 21, 2020
@SanketDG
Copy link

@SanketDG SanketDG commented Apr 21, 2020

The issue seems to be how distutils.sysconfig takes in a prefix, https://docs.python.org/2/distutils/apiref.html#distutils.sysconfig.PREFIX

A naive solution seems to be to also copy all the files that distutils.sysconfig/sysconfig uses into the venv.

@gaborbernat
Copy link
Contributor

@gaborbernat gaborbernat commented Apr 21, 2020

I would definitely want to avoid that solution. It caused a lot of issues in virtualenv less than 20, bugs we managed to close by not doing that.

@SanketDG
Copy link

@SanketDG SanketDG commented Apr 21, 2020

@gaborbernat

Apologies, I am new here.

For issues like this, what has been the general consensus for solving them post rewrite?

@gaborbernat
Copy link
Contributor

@gaborbernat gaborbernat commented Apr 21, 2020

Generally, it's a decision of the project maintainers, I'm at the moment the primary person at the moment. Will look into this and propose alternative searched; at the moment if at all possible I'd like to avoid copying stuff. Maybe we can just link/copy in that make file to exist within the venv too; but let's see if there are better solutions.

@gaborbernat
Copy link
Contributor

@gaborbernat gaborbernat commented Apr 26, 2020

Fixed via #1787

@gaborbernat
Copy link
Contributor

@gaborbernat gaborbernat commented May 3, 2020

Hello, this now has been released via https://pypi.org/project/virtualenv/20.0.19/

heads up

@pypa pypa locked and limited conversation to collaborators Jan 14, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants