diff --git a/var/spack/repos/builtin/packages/py-archspec/package.py b/var/spack/repos/builtin/packages/py-archspec/package.py index ac9b3d3cce..2451ffe012 100644 --- a/var/spack/repos/builtin/packages/py-archspec/package.py +++ b/var/spack/repos/builtin/packages/py-archspec/package.py @@ -30,7 +30,7 @@ class PyArchspec(PythonPackage): def patch(self): # See https://python-poetry.org/docs/pyproject/#poetry-and-pep-517 - with working_dir(self.build_directory): + with working_dir(self.stage.source_path): if self.spec.satisfies("@:0.1.3"): filter_file("poetry>=0.12", "poetry_core>=1.0.0", "pyproject.toml") filter_file("poetry.masonry.api", "poetry.core.masonry.api", "pyproject.toml")