Skip to content

Commit

Permalink
build: Remove transient directories after install to allow for rebuild
Browse files Browse the repository at this point in the history
* While doing multiple rebuilds it is advisable to also clean up the
  state of the Git submodules with 'git clean -f', removing the OUTPUT
  directory at src/fastjet/_fastjet_core/ and the top level build directory
  is sufficient to do local development rebuilds --- i.e., the command
  'python -m pip install --upgrade .' can be run twice in a row without error.
  • Loading branch information
matthewfeickert committed Sep 12, 2024
1 parent 28ec47c commit f05e28d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,13 @@
PYTHON = DIR / "src/fastjet"
OUTPUT = PYTHON / "_fastjet_core"


# Clean up transient directories to allow for rebuilds during development
if (DIR / "build").exists():
shutil.rmtree(DIR / "build")
if OUTPUT.exists():
shutil.rmtree(OUTPUT)

LIBS = [
"fastjet",
"fastjettools",
Expand Down

0 comments on commit f05e28d

Please sign in to comment.