From 7d0cc37b17df97a64b2f2449bbd31795c6a1c291 Mon Sep 17 00:00:00 2001 From: Yannick Jadoul Date: Fri, 21 Feb 2020 17:25:01 +0100 Subject: [PATCH 1/4] Revert "Keeping virtualenv<20 on macOS, until problems get fixed by new release" This reverts commit 691174cf1104d761baf2dcd05aedb1bd710e8de3. --- .circleci/prepare.sh | 2 +- cibuildwheel/macos.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/prepare.sh b/.circleci/prepare.sh index 083c6d19d..dfd3aeef1 100644 --- a/.circleci/prepare.sh +++ b/.circleci/prepare.sh @@ -1,6 +1,6 @@ $PYTHON --version $PYTHON -m pip --version -$PYTHON -m pip install -q --user --ignore-installed --upgrade "virtualenv<20" +$PYTHON -m pip install -q --user --ignore-installed --upgrade virtualenv $PYTHON -m virtualenv -p $PYTHON venv venv/bin/python -m pip install -r requirements-dev.txt venv/bin/python -m pip freeze diff --git a/cibuildwheel/macos.py b/cibuildwheel/macos.py index 0e95ff289..9d3b2d153 100644 --- a/cibuildwheel/macos.py +++ b/cibuildwheel/macos.py @@ -192,7 +192,7 @@ def build(project_dir, output_dir, test_command, test_requires, test_extras, bef if test_command: # set up a virtual environment to install and test from, to make sure # there are no dependencies that were pulled in at build time. - call(['pip', 'install', 'virtualenv<20'], env=env) + call(['pip', 'install', 'virtualenv'], env=env) venv_dir = tempfile.mkdtemp() call(['python', '-m', 'virtualenv', venv_dir], env=env) From 1199d78d882d1a6cfb7b7aa69a17929101ab4068 Mon Sep 17 00:00:00 2001 From: Yannick Jadoul Date: Thu, 27 Feb 2020 16:56:47 +0100 Subject: [PATCH 2/4] Always unset __PYVENV_LAUNCHER__ environment variable to avoid unwanted surprises --- cibuildwheel/macos.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cibuildwheel/macos.py b/cibuildwheel/macos.py index 9d3b2d153..0285b5989 100644 --- a/cibuildwheel/macos.py +++ b/cibuildwheel/macos.py @@ -133,6 +133,9 @@ def build(project_dir, output_dir, test_command, test_requires, test_extras, bef installation_bin_path, env['PATH'], ]) + # Fix issue with site.py setting the wrong `sys.prefix`, `sys.exec_prefix`, `sys.path`, ... for PyPy: https://foss.heptapod.net/pypy/pypy/issues/3175 + # Be safe and avoid other issues by just always removing the '__PYVENV_LAUNCHER__' environment variable (cfr. https://github.com/python/cpython/pull/9516) + env.pop('__PYVENV_LAUNCHER__', None) env = environment.as_dictionary(prev_environment=env) # check what version we're on @@ -203,7 +206,7 @@ def build(project_dir, output_dir, test_command, test_requires, test_extras, bef ]) # Fix some weird issue with the shebang of installed scripts # See https://github.com/theacodes/nox/issues/44 and https://github.com/pypa/virtualenv/issues/620 - virtualenv_env.pop('__PYVENV_LAUNCHER__', None) + # virtualenv_env.pop('__PYVENV_LAUNCHER__', None) # No need for this anymore, as '__PYVENV_LAUNCHER__' is already removed from `env` above # check that we are using the Python from the virtual environment call(['which', 'python'], env=virtualenv_env) From 8d8b91a9f6930eb81b119d88e5b22924e6b7292f Mon Sep 17 00:00:00 2001 From: Joe Rickerby Date: Fri, 28 Feb 2020 16:23:38 +0000 Subject: [PATCH 3/4] Remove commented line of code and move comment --- cibuildwheel/macos.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/cibuildwheel/macos.py b/cibuildwheel/macos.py index 0285b5989..fac7809f9 100644 --- a/cibuildwheel/macos.py +++ b/cibuildwheel/macos.py @@ -133,8 +133,13 @@ def build(project_dir, output_dir, test_command, test_requires, test_extras, bef installation_bin_path, env['PATH'], ]) - # Fix issue with site.py setting the wrong `sys.prefix`, `sys.exec_prefix`, `sys.path`, ... for PyPy: https://foss.heptapod.net/pypy/pypy/issues/3175 - # Be safe and avoid other issues by just always removing the '__PYVENV_LAUNCHER__' environment variable (cfr. https://github.com/python/cpython/pull/9516) + + # Fix issue with site.py setting the wrong `sys.prefix`, `sys.exec_prefix`, + # `sys.path`, ... for PyPy: https://foss.heptapod.net/pypy/pypy/issues/3175 + # Also fix an issue with the shebang of installed scripts inside the + # testing virtualenv- see https://github.com/theacodes/nox/issues/44 and + # https://github.com/pypa/virtualenv/issues/620 + # Also see https://github.com/python/cpython/pull/9516 env.pop('__PYVENV_LAUNCHER__', None) env = environment.as_dictionary(prev_environment=env) @@ -204,9 +209,6 @@ def build(project_dir, output_dir, test_command, test_requires, test_extras, bef os.path.join(venv_dir, 'bin'), virtualenv_env['PATH'], ]) - # Fix some weird issue with the shebang of installed scripts - # See https://github.com/theacodes/nox/issues/44 and https://github.com/pypa/virtualenv/issues/620 - # virtualenv_env.pop('__PYVENV_LAUNCHER__', None) # No need for this anymore, as '__PYVENV_LAUNCHER__' is already removed from `env` above # check that we are using the Python from the virtual environment call(['which', 'python'], env=virtualenv_env) From 958fa1b824c41e5edc4c0c9b66b4ab55e5c7a53a Mon Sep 17 00:00:00 2001 From: Joe Rickerby Date: Fri, 28 Feb 2020 16:26:08 +0000 Subject: [PATCH 4/4] Fix lint errors Serves me right for editing code in the github editor!! --- cibuildwheel/macos.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cibuildwheel/macos.py b/cibuildwheel/macos.py index fac7809f9..dd2a412bc 100644 --- a/cibuildwheel/macos.py +++ b/cibuildwheel/macos.py @@ -136,9 +136,9 @@ def build(project_dir, output_dir, test_command, test_requires, test_extras, bef # Fix issue with site.py setting the wrong `sys.prefix`, `sys.exec_prefix`, # `sys.path`, ... for PyPy: https://foss.heptapod.net/pypy/pypy/issues/3175 - # Also fix an issue with the shebang of installed scripts inside the + # Also fix an issue with the shebang of installed scripts inside the # testing virtualenv- see https://github.com/theacodes/nox/issues/44 and - # https://github.com/pypa/virtualenv/issues/620 + # https://github.com/pypa/virtualenv/issues/620 # Also see https://github.com/python/cpython/pull/9516 env.pop('__PYVENV_LAUNCHER__', None) env = environment.as_dictionary(prev_environment=env)