Skip to content

Commit

Permalink
py-build: python+ensurepip not required (spack#28562)
Browse files Browse the repository at this point in the history
* py-build: python+ensurepip not required

* Add patch to fix issue when pip is in PYTHONPATH
  • Loading branch information
adamjstewart authored Feb 16, 2022
1 parent 5272e72 commit 5c1edbe
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
10 changes: 10 additions & 0 deletions var/spack/repos/builtin/packages/py-build/isolation.patch
Original file line number Diff line number Diff line change
@@ -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)

6 changes: 5 additions & 1 deletion var/spack/repos/builtin/packages/py-build/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,15 @@ 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'))
depends_on('py-tomli@1:', type=('build', 'run'))
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')

0 comments on commit 5c1edbe

Please sign in to comment.