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

Revert "Keeping virtualenv<20 on macOS, until problems get fixed by new release" #274

Merged
merged 4 commits into from
Feb 28, 2020
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .circleci/prepare.sh
Original file line number Diff line number Diff line change
@@ -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
Expand Down
7 changes: 5 additions & 2 deletions cibuildwheel/macos.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -192,7 +195,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)

Expand All @@ -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
joerick marked this conversation as resolved.
Show resolved Hide resolved

# check that we are using the Python from the virtual environment
call(['which', 'python'], env=virtualenv_env)
Expand Down