Skip to content

Commit

Permalink
install.py: Replace Bash script with Python script
Browse files Browse the repository at this point in the history
- To remove the project's dependency on Bash 😃
  • Loading branch information
letam committed May 16, 2023
1 parent 738db2f commit ee8b386
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 24 deletions.
24 changes: 0 additions & 24 deletions install.sh

This file was deleted.

23 changes: 23 additions & 0 deletions install/__main__.py
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'])

0 comments on commit ee8b386

Please sign in to comment.