Skip to content

Commit be00f65

Browse files
Add virtual environment setup to development script
Check for the existence of a virtual environment and create one if it doesn't exist. Install dependencies from the requirements file and log the actions taken. Update the SSL certificate generation command to include additional subject information.
1 parent 3959d52 commit be00f65

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

scripts/setup_dev.py

+7-1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@
1414
def setup_development_environment():
1515
"""Set up the development environment."""
1616
try:
17+
if not Path("venv").exists():
18+
logger.info("Creating virtual environment and installing dependencies")
19+
os.system("python -m venv venv")
20+
os.system("venv/Scripts/activate && pip install -r requirements.txt")
21+
logger.info("Created virtual environment and installed dependencies")
1722
# Create necessary directories
1823
directories = ["data", "logs", "backups", "certs", "config"]
1924

@@ -53,7 +58,8 @@ def setup_development_environment():
5358
if not Path("certs/dev.key").exists():
5459
os.system(
5560
"openssl req -x509 -newkey rsa:4096 -keyout certs/dev.key "
56-
"-out certs/dev.crt -days 365 -nodes -subj '/CN=localhost'"
61+
"-out certs/dev.crt -days 365 -nodes "
62+
"-subj /CN=localhost/O=Development/OU=Engineering/C=US"
5763
)
5864
logger.info("Generated development SSL certificates")
5965

0 commit comments

Comments
 (0)