Commit graph

164 commits

Author SHA1 Message Date
Bernát Gábor
fd064dc08f
Bump dependencies and build tools (#2394)
Signed-off-by: Bernát Gábor <gaborjbernat@gmail.com>
2022-08-04 01:39:15 -07:00
Bernát Gábor
b85542c31c
Drop support of running under Python 2.7 (#2382) 2022-07-25 00:33:42 -07:00
rkucsora
76a8c87ef4
Fix test_py_info to work on Python 3.11 too (#2380) 2022-07-23 08:51:16 -07:00
reksarka
245cae75ec
Ignores missing DLLs dir in CPython3Windows (#2369)
Co-authored-by: Bernát Gábor <gaborjbernat@gmail.com>
Co-authored-by: Lumír 'Frenzy' Balhar <lbalhar@redhat.com>
2022-06-29 01:10:53 +01:00
reksarka
805dcffe00
Windows embedable support (#2353)
* Bump pip and setuptools (#2348)

Signed-off-by: Bernát Gábor <bgabor8@bloomberg.net>

* Use shlex.quote instead of deprecated pipes.quote (#2351)

* Embeds the "python<VERSION>.zip" for Windows.

For example, for Python 3.10 the embeddable file name would be
"python310.zip". If this file would be found in `sys.path`, the
virtualenv should copy it into the "<venv>\Scripts\python310.zip".

* For Windows CPython3: *.dll/*.pyd -> to_bin

* Fixture for a Python interpreter info.

Helps to test virtualenv creator classes.

* Creators tests: path_mock as separate module.

* Clarifies tests, separates testing tools.

* Tests for CPython3Windows sources.

* Tests for the embedded Python std lib for Windows.

* Add news entry.

* Replaces `yield from` for backward compability.

* FIX: Path mocking in pypy tests.

* Wrap `sys` `Path` with `str` for importlib.

The importlib accepts a Path-like objects from Python 3.6

* Makes PathMock ABC compatible with Python 2

* Does not collect tests for Python3 under Python 2

It is possible to make pass CPython3 tests under Python 2,
but it's better to disable it instead of decreasing the
readability and performance of Python 3 style.

* Allows empty `Path()` in Windows with Python 2

* Allows to load fixture files with PY2 Windows Path

* Skips one PY3 POSIX test in PY2 Windows

Co-authored-by: Bernát Gábor <gaborjbernat@gmail.com>
Co-authored-by: Lumír 'Frenzy' Balhar <lbalhar@redhat.com>
2022-06-25 01:11:17 +01:00
Lumír 'Frenzy' Balhar
0bf46eb638
Use shlex.quote instead of deprecated pipes.quote (#2351) 2022-06-10 13:57:19 +01:00
Jakub Žádník
ee018a3b2d
Update Nushell activation scripts to 0.60 (#2321) 2022-03-25 18:14:01 +00:00
Stefano Rivera
3a90a6bb48
Avoid symlinking the contents of /usr into PyPy3 virtualenvs (#2310)
Co-authored-by: Bernát Gábor <bgabor8@bloomberg.net>
2022-03-07 13:23:07 +00:00
Matthieu Darbois
319a540001
feature: cache downloaded wheel information (#2276)
Co-authored-by: Bernát Gábor <gaborjbernat@gmail.com>
2022-01-02 14:58:32 +00:00
Matthieu Darbois
4308ddb276
feature: store version update source in embed JSON file (#2273) 2022-01-01 10:35:10 +00:00
Matthieu Darbois
61c065ba77
fix: --download option (#2262) 2021-12-31 07:55:10 +00:00
mayeut
dbb6347e23
fix: pinned version are not working once periodic / manual updates kick-in
Fixes pypa#2203
2021-12-29 10:46:55 +01:00
Bernát Gábor
878c6e09de
Fix the CI (#2254) 2021-12-28 10:40:09 +00:00
Miro Hrončok
d3fee0ebb7
Fix test_custom_venv_install_scheme_is_prefered mocking if "venv" install scheme actually exists (#2231) 2021-12-03 18:43:14 +00:00
Tushar Sadhwani
15c09d6e0c
?? prompt should be wrapped in paranthesis ?? (#2224)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2021-10-31 10:34:03 +00:00
Miro Hrončok
8da79db86d
Favor the "venv" sysconfig install scheme over the default and distutils scheme (#2209) 2021-10-28 15:15:19 +01:00
Ruairidh MacLeod
6bfc29e1a3
special-case --prompt . to the cwd (#2220)
Co-authored-by: Bernát Gábor <gaborjbernat@gmail.com>
2021-10-23 11:16:41 +01:00
Bernát Gábor
fa16e0a98b
Fix the CI and bump setuptools (#2205) 2021-10-04 09:33:52 +01:00
Arcadiy Ivanov
e13ea2a7c6
During seeding properly uninstall present versions of the wheels (#2186)
* During seeding remove dist-info for present versions of the wheels

An existing dist-info may contain entrypoints that may interfere with
normal functioning of the redeployed seeded wheel if there is a version
mismatch

fixes #2185

* Remove package directories from dist-info top_level packages
Remove other recorded files from RECORD
Remove dist-info itself

* Do not resolve paths prior to removal for symlink mode
In the test ensure the directories are compared as sets and not lists
Add setuptools downgrade to ensure proper cleanup of the existing version

* PR Feedback

Signed-off-by: Bernát Gábor <gaborjbernat@gmail.com>

Co-authored-by: Bernát Gábor <gaborjbernat@gmail.com>
2021-09-24 10:56:28 +01:00
Fernando Herrera
e0410cafc8
Nushell activation scripts (#2170) 2021-09-16 13:10:42 +01:00
Bernát Gábor
1afc190027
Remove xonsh activator (#2160)
Signed-off-by: Bernát Gábor <gaborjbernat@gmail.com>
2021-07-31 12:41:33 +01:00
Bernát Gábor
c52fe3ea09
Support without distutils (#2146)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2021-07-14 17:45:30 +01:00
Bernát Gábor
ce6efc84c0
Drop Python 3.4 support (#2143) 2021-07-13 10:35:16 +01:00
Adrian Freund
7bfd44410e
Fix site.getsitepackages() broken on python2 on debian (#2108) 2021-05-05 18:26:30 +01:00
Adrian Freund
cc91e3f8a3
Fix site.getsitepackages() ignoring --system-site-packages on python2 (#2107)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2021-05-04 17:36:45 +01:00
Ashley Whetter
625d5d8827
Built in discovery class is always preferred over plugin supplied classes (#2088) 2021-04-20 09:55:07 +01:00
Lumír 'Frenzy' Balhar
133050c4ba
Fix pip_cert pytest fixture (#2083)
pip_cert is recognized as a generator so it should not use
return if PIP_CERT is in os.environ.

Fixes: https://github.com/pypa/virtualenv/issues/2048
2021-03-17 18:50:32 +00:00
Bernát Gábor
531e5761e7
Fix upgrade embeded crashes (#2062)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2021-02-01 07:37:26 +00:00
Bernát Gábor
a9b0f3b7cd
Fix Windows failure (#2056) 2021-01-19 00:44:19 +00:00
Bernát Gábor
40aec4824e
API: Allow passing on the environment variable as an argument (#2054)
Defaults to os.environ.

Signed-off-by: Bernát Gábor <bgabor8@bloomberg.net>
2021-01-18 16:06:22 +00:00
Bernát Gábor
39fdf9580b
Bump pip to 20.3.3 and wheel to 0.36.2 (#2036) 2021-01-12 10:04:54 +00:00
Bernát Gábor
684a632c71
Improve discovery on Windows and provide escape hatchet (#2046)
Signed-off-by: Bernát Gábor <bgabor8@bloomberg.net>
2021-01-10 12:23:14 +00:00
Bernát Gábor
bc787b2da6
Try to fix the CI (#2041) 2020-12-21 17:19:31 +00:00
Anthony Sottile
af083095f7
Add --readonly-app-data option (#2009) 2020-11-21 11:41:56 +00:00
Miro Hrončok
ed7ceb5595
conftest.py: Make coverage optional (#2008)
This allows to execute the tests without coverage installed.
We plan to do that in Fedora, where we run the tests, but not measure coverage.
2020-11-21 11:15:52 +00:00
Miro Hrončok
87877f8910
Also skip xonsh tests on Python 3.10 (#2013) 2020-11-19 13:18:07 +00:00
Aren Siekmeier
9708b54f0f
Optionally skip creation of .gitignore in virtualenv directory (#2004) 2020-11-02 11:32:46 +00:00
Anthony Sottile
3ae716faf3
clean up a few small things (#2002) 2020-11-01 09:31:16 +00:00
Patrice Neff
d89f97683e
Fix VIRTUALENV_PYTHON environment lookup (#1998) 2020-10-28 16:10:36 +00:00
Felix Yan
0a5009aee7
Fix test_bootstrap_link_via_app_data.py file name (#1994) 2020-10-25 13:05:37 +00:00
Bernát Gábor
aac61dfbaf
Fallback functionality for interpreter discovery (#1995)
Signed-off-by: Bernát Gábor <bgabor8@bloomberg.net>
2020-10-25 00:01:36 +01:00
Bernát Gábor
8f3d157101
Bump setuptools and fix Windows subprocess with cwd broken (#1982) 2020-10-15 13:06:48 +01:00
davidcoghlan
2b0bbbabb4
Fix absolute paths for Cygwin (#1970)
* Fix absolute paths for Cygwin

Absolute paths on Windows take the form "c:\somePath" -- these need to be mapped to the form "/cygdrive/c/somePath" on Cygwin. Otherwise, the virtualenv path gets garbled when activated on Cygwin, which can cause the wrong Python environment to be used.

* Remove Cygwin from the list, rely on the shell script for that

* Improved formatting

* Update tests to handle mingw + msys explicitly

* Add changelog entry

* lint errors

* Add msys support to the activation script

* Fix script error & linting
2020-10-12 10:51:18 +01:00
Bernát Gábor
06dba77aa1
Restore python3.4 support (add it back to CI) (#1965) 2020-10-04 18:17:24 +01:00
Dan Yeaw
adcf327ee5
Fix cygwin NoneType error if POSIX path in dest (#1964)
Closes #1962. Corrects an AttributeError for a regex match not
found if the cygwin path is already in posix format.
2020-10-03 15:46:06 +01:00
Kirill Smelkov
865af6682c
Process pth files even if $PYTHONPATH points to site-packages/ (#1960) 2020-10-01 18:37:04 +01:00
Dan Yeaw
5e46e4a8d4
Fix activator path in cygwin and msys2 (#1952)
Closes #1940. In cygwin and MSYS2, the path is in POSIX format.
This PR converts the Windows path to POSIX format using a regex
so that it is added to the bash activation script in the correct
format.
2020-09-30 07:58:41 +01:00
Bernát Gábor
13c0498a47
Upgrade setuptools and pip (#1939) 2020-09-10 19:29:25 +01:00
Bernát Gábor
dc5eb79cfa
Avoid showing new windows on Windows (#1929)
Signed-off-by: Bernat Gabor <bgabor8@bloomberg.net>
2020-08-31 19:39:30 +01:00
Siddhant Kumar
6c098d8daa
Use unix line-endings in bash activate script (#1924)
Co-authored-by: Bernat Gabor <bgabor8@bloomberg.net>
2020-08-23 14:25:50 +01:00