-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
install.py: Replace Bash script with Python script
- To remove the project's dependency on Bash 😃
- Loading branch information
Showing
2 changed files
with
23 additions
and
24 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/usr/bin/env python3 | ||
|
||
# Set up environment to run this Python project | ||
|
||
|
||
import os.path | ||
import subprocess | ||
import sys | ||
|
||
# Directory where the virtual environment is located. | ||
venv_dir = '.venv' | ||
|
||
# Ensure the virtual environment exists. | ||
if not os.path.isdir(venv_dir): | ||
subprocess.run('./install/create_venv.py') | ||
|
||
|
||
# Install project dependencies. | ||
print('Installing project dependencies...') | ||
if '--dev' in sys.argv: | ||
subprocess.run(['./install/install_dependencies.py', '--dev']) | ||
else: | ||
subprocess.run(['./install/install_dependencies.py']) |