Skip to content

Commit

Permalink
Fix subdir for pyproject
Browse files Browse the repository at this point in the history
When using optimized builds for pyproject patterns that also need a
subdir, the path needs to be reset before attempting to change to the
optimized directory.

Signed-off-by: William Douglas <william.douglas@intel.com>
  • Loading branch information
bryteise committed Nov 4, 2024
1 parent 412ce5e commit 9bfe801
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions autospec/specfiles.py
Original file line number Diff line number Diff line change
Expand Up @@ -1434,6 +1434,9 @@ def write_pyproject_pattern(self):
for module in self.config.pypi_overrides:
self._write_strip(f"pypi-dep-fix.py . {module}")
self._write_strip("python3 -m build --wheel --skip-dependency-check --no-isolation " + self.config.extra_configure)
self._write_strip("\n")
if self.config.subdir:
self._write_strip("popd")

if self.config.config_opts['use_avx2']:
self._write_strip("pushd ../buildavx2/" + self.config.subdir)
Expand Down Expand Up @@ -1464,8 +1467,6 @@ def write_pyproject_pattern(self):
self._write_strip("popd")

self._write_strip("\n")
if self.config.subdir:
self._write_strip("popd")
self.write_build_append()
self.write_check()
self._write_strip("%install")
Expand Down

0 comments on commit 9bfe801

Please sign in to comment.