-
Notifications
You must be signed in to change notification settings - Fork 125
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
env._find_executable_and_scripts(): Prefer the venv installation scheme if it exists #434
Conversation
…me if it exists Python distributors with custom default installation scheme can set a scheme that can't be used to expand the paths in a venv. This can happen if build itself is not installed in a venv. The distributors are encouraged to set a "venv" scheme to be used for this. See https://bugs.python.org/issue45413 and pypa/virtualenv#2208 Since Python that ships with the macOS developer tools does not have the "venv" scheme yet, we keep the special case below. Once it gains the "venv" scheme, it will be preferred. Fixes pypa#433
src/build/env.py
Outdated
@@ -293,14 +293,21 @@ def _find_executable_and_scripts(path: str) -> Tuple[str, str, str]: | |||
""" | |||
config_vars = sysconfig.get_config_vars().copy() # globally cached, copy before altering it | |||
config_vars['base'] = path | |||
# Python distributors with custom default installation scheme can set a | |||
# scheme that can't be used to expand the paths in a venv. | |||
# This can happen if build itself is not installed in a venv. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this is relevant or something that distributors should be doing, varying the scheme at runtime depending on the prefix.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is the reality. We need to do that. See mostly https://bugs.python.org/issue43976
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately, this was made possible with the introduction of sysconfig._get_preferred_schemes
in 3.10, so something like this is needed.
Co-authored-by: layday <layday@protonmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change looks alright, and is indeed necessary to deal with distributors overriding the default scheme.
@hroncok would you be able to move each part of the comment to above its relevant if
/elif
clause? I think that makes the code easier to read, instead of having this big comment.
Done. |
In python/cpython#31034 the name of the installation scheme has been changed. We can either land this now and adapt later or wait a bit until the actual way forward is finalized there. |
python/cpython#31034 was merged, hence this is no longer a draft |
Thanks! |
Oops, forgot to squash merge 😕 |
🤷♂️ |
…v" scheme After pypa#434 the test would error: ____________________ test_executable_missing_post_creation _____________________ mocker = <pytest_mock.plugin.MockerFixture object at 0x7f9a75401a80> @pytest.mark.skipif(IS_PYPY3, reason='PyPy3 uses get path to create and provision venv') def test_executable_missing_post_creation(mocker): mocker.patch.object(build.env, '_should_use_virtualenv', lambda: False) original_get_paths = sysconfig.get_paths def _get_paths(vars): # noqa shutil.rmtree(vars['base']) return original_get_paths(vars=vars) get_paths = mocker.patch('sysconfig.get_paths', side_effect=_get_paths) with pytest.raises(RuntimeError, match='Virtual environment creation failed, executable .* missing'): > with build.env.IsolatedEnvBuilder(): tests/test_env.py:73: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ .../site-packages/build/env.py:104: in __enter__ executable, scripts_dir = _create_isolated_env_venv(self._path) .../site-packages/build/env.py:258: in _create_isolated_env_venv executable, script_dir, purelib = _find_executable_and_scripts(path) .../site-packages/build/env.py:298: in _find_executable_and_scripts paths = sysconfig.get_paths(scheme='venv', vars=config_vars) /usr/lib64/python3.10/unittest/mock.py:1104: in __call__ return self._mock_call(*args, **kwargs) /usr/lib64/python3.10/unittest/mock.py:1108: in _mock_call return self._execute_mock_call(*args, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <MagicMock name='get_paths' id='140301368829136'>, args = () kwargs = {'scheme': 'venv', 'vars': {'ABIFLAGS': '', 'AC_APPLE_UNIVERSAL_BUILD': 0, 'AIX_BUILDDATE': 0, 'AIX_GENUINE_CPLUSPLUS': 0, ...}} effect = <function test_executable_missing_post_creation.<locals>._get_paths at 0x7f9a754ac5e0> def _execute_mock_call(self, /, *args, **kwargs): # separate from _increment_mock_call so that awaited functions are # executed separately from their call, also AsyncMock overrides this method effect = self.side_effect if effect is not None: if _is_exception(effect): raise effect elif not _callable(effect): result = next(effect) if _is_exception(result): raise result else: > result = effect(*args, **kwargs) E TypeError: test_executable_missing_post_creation.<locals>._get_paths() got an unexpected keyword argument 'scheme' /usr/lib64/python3.10/unittest/mock.py:1169: TypeError That only happens when not installed in a virtual environment, so it was not discovered on CI or via tox.
Also, #448 |
…v" scheme After pypa#434 the test would error: ____________________ test_executable_missing_post_creation _____________________ mocker = <pytest_mock.plugin.MockerFixture object at 0x7f9a75401a80> @pytest.mark.skipif(IS_PYPY3, reason='PyPy3 uses get path to create and provision venv') def test_executable_missing_post_creation(mocker): mocker.patch.object(build.env, '_should_use_virtualenv', lambda: False) original_get_paths = sysconfig.get_paths def _get_paths(vars): # noqa shutil.rmtree(vars['base']) return original_get_paths(vars=vars) get_paths = mocker.patch('sysconfig.get_paths', side_effect=_get_paths) with pytest.raises(RuntimeError, match='Virtual environment creation failed, executable .* missing'): > with build.env.IsolatedEnvBuilder(): tests/test_env.py:73: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ .../site-packages/build/env.py:104: in __enter__ executable, scripts_dir = _create_isolated_env_venv(self._path) .../site-packages/build/env.py:258: in _create_isolated_env_venv executable, script_dir, purelib = _find_executable_and_scripts(path) .../site-packages/build/env.py:298: in _find_executable_and_scripts paths = sysconfig.get_paths(scheme='venv', vars=config_vars) /usr/lib64/python3.10/unittest/mock.py:1104: in __call__ return self._mock_call(*args, **kwargs) /usr/lib64/python3.10/unittest/mock.py:1108: in _mock_call return self._execute_mock_call(*args, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <MagicMock name='get_paths' id='140301368829136'>, args = () kwargs = {'scheme': 'venv', 'vars': {'ABIFLAGS': '', 'AC_APPLE_UNIVERSAL_BUILD': 0, 'AIX_BUILDDATE': 0, 'AIX_GENUINE_CPLUSPLUS': 0, ...}} effect = <function test_executable_missing_post_creation.<locals>._get_paths at 0x7f9a754ac5e0> def _execute_mock_call(self, /, *args, **kwargs): # separate from _increment_mock_call so that awaited functions are # executed separately from their call, also AsyncMock overrides this method effect = self.side_effect if effect is not None: if _is_exception(effect): raise effect elif not _callable(effect): result = next(effect) if _is_exception(result): raise result else: > result = effect(*args, **kwargs) E TypeError: test_executable_missing_post_creation.<locals>._get_paths() got an unexpected keyword argument 'scheme' /usr/lib64/python3.10/unittest/mock.py:1169: TypeError That only happens when not installed in a virtual environment, so it was not discovered on CI or via tox.
…v" scheme After pypa#434 the test would error: ____________________ test_executable_missing_post_creation _____________________ mocker = <pytest_mock.plugin.MockerFixture object at 0x7f9a75401a80> @pytest.mark.skipif(IS_PYPY3, reason='PyPy3 uses get path to create and provision venv') def test_executable_missing_post_creation(mocker): mocker.patch.object(build.env, '_should_use_virtualenv', lambda: False) original_get_paths = sysconfig.get_paths def _get_paths(vars): # noqa shutil.rmtree(vars['base']) return original_get_paths(vars=vars) get_paths = mocker.patch('sysconfig.get_paths', side_effect=_get_paths) with pytest.raises(RuntimeError, match='Virtual environment creation failed, executable .* missing'): > with build.env.IsolatedEnvBuilder(): tests/test_env.py:73: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ .../site-packages/build/env.py:104: in __enter__ executable, scripts_dir = _create_isolated_env_venv(self._path) .../site-packages/build/env.py:258: in _create_isolated_env_venv executable, script_dir, purelib = _find_executable_and_scripts(path) .../site-packages/build/env.py:298: in _find_executable_and_scripts paths = sysconfig.get_paths(scheme='venv', vars=config_vars) /usr/lib64/python3.10/unittest/mock.py:1104: in __call__ return self._mock_call(*args, **kwargs) /usr/lib64/python3.10/unittest/mock.py:1108: in _mock_call return self._execute_mock_call(*args, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <MagicMock name='get_paths' id='140301368829136'>, args = () kwargs = {'scheme': 'venv', 'vars': {'ABIFLAGS': '', 'AC_APPLE_UNIVERSAL_BUILD': 0, 'AIX_BUILDDATE': 0, 'AIX_GENUINE_CPLUSPLUS': 0, ...}} effect = <function test_executable_missing_post_creation.<locals>._get_paths at 0x7f9a754ac5e0> def _execute_mock_call(self, /, *args, **kwargs): # separate from _increment_mock_call so that awaited functions are # executed separately from their call, also AsyncMock overrides this method effect = self.side_effect if effect is not None: if _is_exception(effect): raise effect elif not _callable(effect): result = next(effect) if _is_exception(result): raise result else: > result = effect(*args, **kwargs) E TypeError: test_executable_missing_post_creation.<locals>._get_paths() got an unexpected keyword argument 'scheme' /usr/lib64/python3.10/unittest/mock.py:1169: TypeError That only happens when not installed in a virtual environment, so it was not discovered on CI or via tox.
…v" scheme After #434 the test would error: ____________________ test_executable_missing_post_creation _____________________ mocker = <pytest_mock.plugin.MockerFixture object at 0x7f9a75401a80> @pytest.mark.skipif(IS_PYPY3, reason='PyPy3 uses get path to create and provision venv') def test_executable_missing_post_creation(mocker): mocker.patch.object(build.env, '_should_use_virtualenv', lambda: False) original_get_paths = sysconfig.get_paths def _get_paths(vars): # noqa shutil.rmtree(vars['base']) return original_get_paths(vars=vars) get_paths = mocker.patch('sysconfig.get_paths', side_effect=_get_paths) with pytest.raises(RuntimeError, match='Virtual environment creation failed, executable .* missing'): > with build.env.IsolatedEnvBuilder(): tests/test_env.py:73: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ .../site-packages/build/env.py:104: in __enter__ executable, scripts_dir = _create_isolated_env_venv(self._path) .../site-packages/build/env.py:258: in _create_isolated_env_venv executable, script_dir, purelib = _find_executable_and_scripts(path) .../site-packages/build/env.py:298: in _find_executable_and_scripts paths = sysconfig.get_paths(scheme='venv', vars=config_vars) /usr/lib64/python3.10/unittest/mock.py:1104: in __call__ return self._mock_call(*args, **kwargs) /usr/lib64/python3.10/unittest/mock.py:1108: in _mock_call return self._execute_mock_call(*args, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <MagicMock name='get_paths' id='140301368829136'>, args = () kwargs = {'scheme': 'venv', 'vars': {'ABIFLAGS': '', 'AC_APPLE_UNIVERSAL_BUILD': 0, 'AIX_BUILDDATE': 0, 'AIX_GENUINE_CPLUSPLUS': 0, ...}} effect = <function test_executable_missing_post_creation.<locals>._get_paths at 0x7f9a754ac5e0> def _execute_mock_call(self, /, *args, **kwargs): # separate from _increment_mock_call so that awaited functions are # executed separately from their call, also AsyncMock overrides this method effect = self.side_effect if effect is not None: if _is_exception(effect): raise effect elif not _callable(effect): result = next(effect) if _is_exception(result): raise result else: > result = effect(*args, **kwargs) E TypeError: test_executable_missing_post_creation.<locals>._get_paths() got an unexpected keyword argument 'scheme' /usr/lib64/python3.10/unittest/mock.py:1169: TypeError That only happens when not installed in a virtual environment, so it was not discovered on CI or via tox.
Bumps [build](https://github.com/pypa/build) from 0.7.0 to 0.8.0. <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/pypa/build/blob/main/CHANGELOG.rst">build's changelog</a>.</em></p> <blockquote> <h1>0.8.0 (2022-05-22)</h1> <ul> <li>Accept <code>os.PathLike[str]</code> in addition to <code>str</code> for paths in public API (<code>PR [#392](https://github.com/pypa/build/issues/392)</code><em>, Fixes <code>[#372](https://github.com/pypa/build/issues/372)</code></em>)</li> <li>Add schema validation for <code>build-system</code> table to check conformity with PEP 517 and PEP 518 (<code>PR [#365](https://github.com/pypa/build/issues/365)</code><em>, Fixes <code>[#364](https://github.com/pypa/build/issues/364)</code></em>)</li> <li>Better support for Python 3.11 (sysconfig schemes <code>PR [#434](https://github.com/pypa/build/issues/434)</code><em>, <code>PR [#463](https://github.com/pypa/build/issues/463)</code></em>, tomllib <code>PR [#443](https://github.com/pypa/build/issues/443)</code><em>, warnings <code>PR [#420](https://github.com/pypa/build/issues/420)</code></em>)</li> <li>Improved error printouts (<code>PR [#442](https://github.com/pypa/build/issues/442)</code>_)</li> <li>Avoid importing packaging unless needed (<code>PR [#395](https://github.com/pypa/build/issues/395)</code><em>, Fixes <code>[#393](https://github.com/pypa/build/issues/393)</code></em>)</li> </ul> <h2>Breaking Changes</h2> <ul> <li>Failure to create a virtual environment in the <code>build.env</code> module now raises <code>build.FailedProcessError</code> (<code>PR [#442](https://github.com/pypa/build/issues/442)</code>_)</li> </ul> <p>.. _PR <a href="https://github-redirect.dependabot.com/pypa/build/issues/365">#365</a>: <a href="https://github-redirect.dependabot.com/pypa/build/pull/365">pypa/build#365</a> .. _PR <a href="https://github-redirect.dependabot.com/pypa/build/issues/392">#392</a>: <a href="https://github-redirect.dependabot.com/pypa/build/pull/392">pypa/build#392</a> .. _PR <a href="https://github-redirect.dependabot.com/pypa/build/issues/395">#395</a>: <a href="https://github-redirect.dependabot.com/pypa/build/pull/395">pypa/build#395</a> .. _PR <a href="https://github-redirect.dependabot.com/pypa/build/issues/420">#420</a>: <a href="https://github-redirect.dependabot.com/pypa/build/pull/420">pypa/build#420</a> .. _PR <a href="https://github-redirect.dependabot.com/pypa/build/issues/434">#434</a>: <a href="https://github-redirect.dependabot.com/pypa/build/pull/434">pypa/build#434</a> .. _PR <a href="https://github-redirect.dependabot.com/pypa/build/issues/442">#442</a>: <a href="https://github-redirect.dependabot.com/pypa/build/pull/442">pypa/build#442</a> .. _PR <a href="https://github-redirect.dependabot.com/pypa/build/issues/443">#443</a>: <a href="https://github-redirect.dependabot.com/pypa/build/pull/443">pypa/build#443</a> .. _PR <a href="https://github-redirect.dependabot.com/pypa/build/issues/463">#463</a>: <a href="https://github-redirect.dependabot.com/pypa/build/pull/463">pypa/build#463</a> .. _<a href="https://github-redirect.dependabot.com/pypa/build/issues/364">#364</a>: <a href="https://github-redirect.dependabot.com/pypa/build/issues/364">pypa/build#364</a> .. _<a href="https://github-redirect.dependabot.com/pypa/build/issues/372">#372</a>: <a href="https://github-redirect.dependabot.com/pypa/build/issues/372">pypa/build#372</a> .. _<a href="https://github-redirect.dependabot.com/pypa/build/issues/393">#393</a>: <a href="https://github-redirect.dependabot.com/pypa/build/pull/393">pypa/build#393</a></p> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/pypa/build/commit/6d97b86298d1663814ad74c22a1b4c0b3ce479c9"><code>6d97b86</code></a> release 0.8.0</li> <li><a href="https://github.com/pypa/build/commit/a3a4bf2de24e4924465020340beec8938cd21e21"><code>a3a4bf2</code></a> tests: include logging info on failures</li> <li><a href="https://github.com/pypa/build/commit/e76be1a00207b3a75bb72931247403352e84906f"><code>e76be1a</code></a> chore: bump mypy version</li> <li><a href="https://github.com/pypa/build/commit/798a1983c9cbbae4fb7cf015704e8a532633b08c"><code>798a198</code></a> Changed ambigous date format to ISO</li> <li><a href="https://github.com/pypa/build/commit/641d7dd2497cf5fada238efd601ca0c1fd39fd95"><code>641d7dd</code></a> ci: update actions</li> <li><a href="https://github.com/pypa/build/commit/cb3eaa093dbd830d55dd6ab538c7bc27d9ed4dd7"><code>cb3eaa0</code></a> chore: minor style check additions</li> <li><a href="https://github.com/pypa/build/commit/0c191b4572f457b5527ae21c9c08f9687eb5a55f"><code>0c191b4</code></a> chore: minor cleanups from <a href="https://github-redirect.dependabot.com/pypa/build/issues/361">#361</a></li> <li><a href="https://github.com/pypa/build/commit/91c7a750f6222958019df57e9da9e82197c9205f"><code>91c7a75</code></a> docs: update changelog</li> <li><a href="https://github.com/pypa/build/commit/bebe815f55f9a0e2ef7dce5434f0137ff4355475"><code>bebe815</code></a> tests: faster testing with less duplication</li> <li><a href="https://github.com/pypa/build/commit/cb394c6ae89d61e991e813156e1b42dc9e0fadb2"><code>cb394c6</code></a> PyPy >= 7.3.9 fixed the venv problem on windows</li> <li>Additional commits viewable in <a href="https://github.com/pypa/build/compare/0.7.0...0.8.0">compare view</a></li> </ul> </details> <br /> [](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details>
Bumps [build](https://github.com/pypa/build) from 0.7.0 to 0.8.0. <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/pypa/build/blob/main/CHANGELOG.rst">build's changelog</a>.</em></p> <blockquote> <h1>0.8.0 (2022-05-22)</h1> <ul> <li>Accept <code>os.PathLike[str]</code> in addition to <code>str</code> for paths in public API (<code>PR [#392](https://github.com/pypa/build/issues/392)</code><em>, Fixes <code>[#372](https://github.com/pypa/build/issues/372)</code></em>)</li> <li>Add schema validation for <code>build-system</code> table to check conformity with PEP 517 and PEP 518 (<code>PR [#365](https://github.com/pypa/build/issues/365)</code><em>, Fixes <code>[#364](https://github.com/pypa/build/issues/364)</code></em>)</li> <li>Better support for Python 3.11 (sysconfig schemes <code>PR [#434](https://github.com/pypa/build/issues/434)</code><em>, <code>PR [#463](https://github.com/pypa/build/issues/463)</code></em>, tomllib <code>PR [#443](https://github.com/pypa/build/issues/443)</code><em>, warnings <code>PR [#420](https://github.com/pypa/build/issues/420)</code></em>)</li> <li>Improved error printouts (<code>PR [#442](https://github.com/pypa/build/issues/442)</code>_)</li> <li>Avoid importing packaging unless needed (<code>PR [#395](https://github.com/pypa/build/issues/395)</code><em>, Fixes <code>[#393](https://github.com/pypa/build/issues/393)</code></em>)</li> </ul> <h2>Breaking Changes</h2> <ul> <li>Failure to create a virtual environment in the <code>build.env</code> module now raises <code>build.FailedProcessError</code> (<code>PR [#442](https://github.com/pypa/build/issues/442)</code>_)</li> </ul> <p>.. _PR <a href="https://github-redirect.dependabot.com/pypa/build/issues/365">#365</a>: <a href="https://github-redirect.dependabot.com/pypa/build/pull/365">pypa/build#365</a> .. _PR <a href="https://github-redirect.dependabot.com/pypa/build/issues/392">#392</a>: <a href="https://github-redirect.dependabot.com/pypa/build/pull/392">pypa/build#392</a> .. _PR <a href="https://github-redirect.dependabot.com/pypa/build/issues/395">#395</a>: <a href="https://github-redirect.dependabot.com/pypa/build/pull/395">pypa/build#395</a> .. _PR <a href="https://github-redirect.dependabot.com/pypa/build/issues/420">#420</a>: <a href="https://github-redirect.dependabot.com/pypa/build/pull/420">pypa/build#420</a> .. _PR <a href="https://github-redirect.dependabot.com/pypa/build/issues/434">#434</a>: <a href="https://github-redirect.dependabot.com/pypa/build/pull/434">pypa/build#434</a> .. _PR <a href="https://github-redirect.dependabot.com/pypa/build/issues/442">#442</a>: <a href="https://github-redirect.dependabot.com/pypa/build/pull/442">pypa/build#442</a> .. _PR <a href="https://github-redirect.dependabot.com/pypa/build/issues/443">#443</a>: <a href="https://github-redirect.dependabot.com/pypa/build/pull/443">pypa/build#443</a> .. _PR <a href="https://github-redirect.dependabot.com/pypa/build/issues/463">#463</a>: <a href="https://github-redirect.dependabot.com/pypa/build/pull/463">pypa/build#463</a> .. _<a href="https://github-redirect.dependabot.com/pypa/build/issues/364">#364</a>: <a href="https://github-redirect.dependabot.com/pypa/build/issues/364">pypa/build#364</a> .. _<a href="https://github-redirect.dependabot.com/pypa/build/issues/372">#372</a>: <a href="https://github-redirect.dependabot.com/pypa/build/issues/372">pypa/build#372</a> .. _<a href="https://github-redirect.dependabot.com/pypa/build/issues/393">#393</a>: <a href="https://github-redirect.dependabot.com/pypa/build/pull/393">pypa/build#393</a></p> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/pypa/build/commit/6d97b86298d1663814ad74c22a1b4c0b3ce479c9"><code>6d97b86</code></a> release 0.8.0</li> <li><a href="https://github.com/pypa/build/commit/a3a4bf2de24e4924465020340beec8938cd21e21"><code>a3a4bf2</code></a> tests: include logging info on failures</li> <li><a href="https://github.com/pypa/build/commit/e76be1a00207b3a75bb72931247403352e84906f"><code>e76be1a</code></a> chore: bump mypy version</li> <li><a href="https://github.com/pypa/build/commit/798a1983c9cbbae4fb7cf015704e8a532633b08c"><code>798a198</code></a> Changed ambigous date format to ISO</li> <li><a href="https://github.com/pypa/build/commit/641d7dd2497cf5fada238efd601ca0c1fd39fd95"><code>641d7dd</code></a> ci: update actions</li> <li><a href="https://github.com/pypa/build/commit/cb3eaa093dbd830d55dd6ab538c7bc27d9ed4dd7"><code>cb3eaa0</code></a> chore: minor style check additions</li> <li><a href="https://github.com/pypa/build/commit/0c191b4572f457b5527ae21c9c08f9687eb5a55f"><code>0c191b4</code></a> chore: minor cleanups from <a href="https://github-redirect.dependabot.com/pypa/build/issues/361">#361</a></li> <li><a href="https://github.com/pypa/build/commit/91c7a750f6222958019df57e9da9e82197c9205f"><code>91c7a75</code></a> docs: update changelog</li> <li><a href="https://github.com/pypa/build/commit/bebe815f55f9a0e2ef7dce5434f0137ff4355475"><code>bebe815</code></a> tests: faster testing with less duplication</li> <li><a href="https://github.com/pypa/build/commit/cb394c6ae89d61e991e813156e1b42dc9e0fadb2"><code>cb394c6</code></a> PyPy >= 7.3.9 fixed the venv problem on windows</li> <li>Additional commits viewable in <a href="https://github.com/pypa/build/compare/0.7.0...0.8.0">compare view</a></li> </ul> </details> <br /> [](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details>
Python distributors with custom default installation scheme can set a
scheme that can't be used to expand the paths in a venv.
This can happen if build itself is not installed in a venv.
The distributors are encouraged to set a "venv" scheme to be used for this.
See https://bugs.python.org/issue45413
and pypa/virtualenv#2208
Since Python that ships with the macOS developer tools does not have the "venv"
scheme yet, we keep the special case below. Once it gains the "venv" scheme,
it will be preferred.
Fixes #433