summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam J. Stewart <ajstewart426@gmail.com>2022-02-16 08:53:22 -0600
committerGitHub <noreply@github.com>2022-02-16 15:53:22 +0100
commit5c1edbe00ac32de4eeac7416ded15fd9f3693596 (patch)
treeb5e4cdd7d5c15b484dc5104c2243475e33591ec7
parent5272e723443e4f82406d58fab5bb202108dbebfb (diff)
downloadspack-5c1edbe00ac32de4eeac7416ded15fd9f3693596.tar.gz
spack-5c1edbe00ac32de4eeac7416ded15fd9f3693596.tar.bz2
spack-5c1edbe00ac32de4eeac7416ded15fd9f3693596.tar.xz
spack-5c1edbe00ac32de4eeac7416ded15fd9f3693596.zip
py-build: python+ensurepip not required (#28562)
* py-build: python+ensurepip not required * Add patch to fix issue when pip is in PYTHONPATH
-rw-r--r--var/spack/repos/builtin/packages/py-build/isolation.patch10
-rw-r--r--var/spack/repos/builtin/packages/py-build/package.py6
2 files changed, 15 insertions, 1 deletions
diff --git a/var/spack/repos/builtin/packages/py-build/isolation.patch b/var/spack/repos/builtin/packages/py-build/isolation.patch
new file mode 100644
index 0000000000..f51855add3
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-build/isolation.patch
@@ -0,0 +1,10 @@
+--- a/src/build/env.py 2021-09-16 16:20:01.000000000 -0500
++++ b/src/build/env.py 2022-01-23 15:08:26.000000000 -0600
+@@ -254,6 +254,7 @@
+ """
+ import venv
+
++ os.environ.pop('PYTHONPATH', None)
+ venv.EnvBuilder(with_pip=True, symlinks=_fs_supports_symlink()).create(path)
+ executable, script_dir, purelib = _find_executable_and_scripts(path)
+
diff --git a/var/spack/repos/builtin/packages/py-build/package.py b/var/spack/repos/builtin/packages/py-build/package.py
index 12a5400de6..98f9feb8a8 100644
--- a/var/spack/repos/builtin/packages/py-build/package.py
+++ b/var/spack/repos/builtin/packages/py-build/package.py
@@ -16,7 +16,7 @@ class PyBuild(PythonPackage):
variant('virtualenv', default=False, description='Install optional virtualenv dependency')
- depends_on('python@3.6:+ensurepip', type=('build', 'run'))
+ depends_on('python@3.6:', type=('build', 'run'))
depends_on('py-setuptools', type='build')
depends_on('py-packaging@19:', type=('build', 'run'))
depends_on('py-pep517@0.9.1:', type=('build', 'run'))
@@ -24,3 +24,7 @@ class PyBuild(PythonPackage):
depends_on('py-colorama', when='platform=windows', type=('build', 'run'))
depends_on('py-importlib-metadata@0.22:', when='^python@:3.7', type=('build', 'run'))
depends_on('py-virtualenv@20.0.35:', when='+virtualenv', type=('build', 'run'))
+
+ # https://github.com/pypa/build/issues/266
+ # https://github.com/pypa/build/issues/406
+ patch('isolation.patch', when='@0.7.0')