-
Notifications
You must be signed in to change notification settings - Fork 113
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #165 from wizaye/wizaye
[FIX]: Enhance `setup.py` with Virtual Environment and Cross Platform Support
- Loading branch information
Showing
3 changed files
with
61 additions
and
22 deletions.
There are no files selected for viewing
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,19 @@ | ||
@echo off | ||
|
||
:: Create a virtual environment | ||
python -m venv venv | ||
|
||
:: Activate the virtual environment | ||
call venv\Scripts\activate | ||
|
||
:: Check if the activation was successful | ||
if "%VIRTUAL_ENV%" NEQ "" ( | ||
echo Virtual environment activated. | ||
|
||
:: Install the required packages | ||
:: pip install -r requirements.txt | ||
:: Run the main application | ||
python setup.py | ||
) else ( | ||
echo Failed to activate virtual environment. | ||
) |
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
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,17 @@ | ||
#!/bin/bash | ||
|
||
# Create a virtual environment | ||
python3 -m venv venv | ||
|
||
# Activate the virtual environment | ||
source venv/bin/activate | ||
|
||
# Check if the activation was successful | ||
if [ "$VIRTUAL_ENV" != "" ]; then | ||
echo "Virtual environment activated." | ||
|
||
# Run the main application | ||
python setup.py | ||
else | ||
echo "Failed to activate virtual environment." | ||
fi |