From 9f59d4f199fe047e74bb7276440c0ad64d7736aa Mon Sep 17 00:00:00 2001 From: Wouter Deconinck Date: Sat, 25 Mar 2023 21:49:24 -0500 Subject: py-build: new versions 0.10.0 (-> flit) (#36416) * py-build: new versions 0.10.0 (-> flit) py-build switched to flit with 0.10, https://github.com/pypa/build/blob/0.10.0/pyproject.toml ``` ==> py-build: Successfully installed py-build-0.10.0-twgngkplyegllaovlp45r76nsk7bqezw ``` * py-pyproject-hooks: new package 1.0.0 * py-build: depends_on py-pyproject-hooks * py-pyproject-hooks: use pypi url and hash * py-build: replace patch with filter_file * py-build: remove patch in favor of filter_file --- .../repos/builtin/packages/py-build/isolation.patch | 10 ---------- var/spack/repos/builtin/packages/py-build/package.py | 18 +++++++++++++++--- .../builtin/packages/py-pyproject-hooks/package.py | 18 ++++++++++++++++++ 3 files changed, 33 insertions(+), 13 deletions(-) delete mode 100644 var/spack/repos/builtin/packages/py-build/isolation.patch create mode 100644 var/spack/repos/builtin/packages/py-pyproject-hooks/package.py diff --git a/var/spack/repos/builtin/packages/py-build/isolation.patch b/var/spack/repos/builtin/packages/py-build/isolation.patch deleted file mode 100644 index f51855add3..0000000000 --- a/var/spack/repos/builtin/packages/py-build/isolation.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- 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 aa57e693e1..046955dac1 100644 --- a/var/spack/repos/builtin/packages/py-build/package.py +++ b/var/spack/repos/builtin/packages/py-build/package.py @@ -12,19 +12,31 @@ class PyBuild(PythonPackage): homepage = "https://github.com/pypa/build" pypi = "build/build-0.7.0.tar.gz" + version("0.10.0", sha256="d5b71264afdb5951d6704482aac78de887c80691c52b88a9ad195983ca2c9269") + version("0.9.0", sha256="1a07724e891cbd898923145eb7752ee7653674c511378eb9c7691aab1612bc3c") + version("0.8.0", sha256="887a6d471c901b1a6e6574ebaeeebb45e5269a79d095fe9a8f88d6614ed2e5f0") version("0.7.0", sha256="1aaadcd69338252ade4f7ec1265e1a19184bf916d84c9b7df095f423948cb89f") variant("virtualenv", default=False, description="Install optional virtualenv dependency") depends_on("python@3.6:", type=("build", "run")) - depends_on("py-setuptools", type="build") + depends_on("python@3.7:", when="@0.10:", type=("build", "run")) + depends_on("py-flit-core@3.4:", when="@0.10:", type="build") + depends_on("py-setuptools", when="@:0.9", type="build") depends_on("py-packaging@19:", type=("build", "run")) - depends_on("py-pep517@0.9.1:", type=("build", "run")) + depends_on("py-pyproject-hooks", when="@0.10.0:", type=("build", "run")) + depends_on("py-pep517@0.9.1:", when="@:0.9", type=("build", "run")) depends_on("py-tomli@1:", type=("build", "run")) + depends_on("py-tomli@1.1:", when="@0.10:", 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") + def patch(self): + filter_file( + r"^(\s*)(venv\.EnvBuilder.*)$", + r"\1os.environ.pop('PYTHONPATH', None)" + "\n" + r"\1\2", + "src/build/env.py", + ) diff --git a/var/spack/repos/builtin/packages/py-pyproject-hooks/package.py b/var/spack/repos/builtin/packages/py-pyproject-hooks/package.py new file mode 100644 index 0000000000..efb5eaec49 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-pyproject-hooks/package.py @@ -0,0 +1,18 @@ +# Copyright 2013-2023 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack.package import * + + +class PyPyprojectHooks(PythonPackage): + """Wrappers to call pyproject.toml-based build backend hooks.""" + + homepage = "https://github.com/pypa/pyproject-hooks" + pypi = "pyproject_hooks/pyproject_hooks-1.0.0.tar.gz" + + version("1.0.0", sha256="f271b298b97f5955d53fb12b72c1fb1948c22c1a6b70b315c54cedaca0264ef5") + + depends_on("py-flit-core@3.2:3", type="build") + depends_on("py-tomli@1.1:", when="^python@:3.10", type=("build", "run")) -- cgit v1.2.3-60-g2f50