Skip to content

Commit

Permalink
Small tweaks to installer (#202)
Browse files Browse the repository at this point in the history
* Skip installing dependencies after initial install on production

* remove print

* remove requirements.txt on install

* small tweaks

---------

Co-authored-by: Soylu <[email protected]>
  • Loading branch information
JR-Morgan and Soylu authored Jul 12, 2024
1 parent 0d0ca2c commit 5081177
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions bpy_speckle/installer.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,6 @@ def ensure_pip() -> None:
def get_requirements_path() -> Path:
# we assume that a requirements.txt exists next to the __init__.py file
path = Path(Path(__file__).parent, "requirements.txt")
assert path.exists()
return path


Expand All @@ -154,7 +153,7 @@ def debugger_is_active() -> bool:
"""Return if the debugger is currently active"""
return hasattr(sys, 'gettrace') and sys.gettrace() is not None

requirements_path = Path(Path(__file__).parent, "requirements.txt")
requirements_path = get_requirements_path()

is_debug = debugger_is_active()

Expand Down Expand Up @@ -184,7 +183,7 @@ def debugger_is_active() -> bool:
)

if completed_process.returncode != 0:
m = f"Failed to install dependenices through pip, got {completed_process.returncode} return code"
m = f"Failed to install dependencies through pip, got {completed_process.returncode} return code"
print(m)
raise Exception(m)

Expand Down

0 comments on commit 5081177

Please sign in to comment.