-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdev-setup.sh
More file actions
28 lines (22 loc) · 910 Bytes
/
dev-setup.sh
File metadata and controls
28 lines (22 loc) · 910 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/bin/zsh
# 1. Install Poetry if not already installed
if ! command -v poetry &> /dev/null; then
echo "Installing Poetry..."
curl -sSL https://install.python-poetry.org | python3 -
echo 'export PATH="$HOME/.local/bin:$PATH"' >> $HOME/.bashrc
source $HOME/.bashrc
fi
# 2. Initialize a new Poetry project if 'pyproject.toml' is not present
if [ ! -f "pyproject.toml" ]; then
echo "Creating a new Poetry project..."
poetry new project_name
cd project_name # Replace 'project_name' with your actual project name
fi
# 3. Ensure the required Python version is set in 'pyproject.toml'
echo "Make sure that the required Python version is set in your 'pyproject.toml' file."
# 4. Create and activate the Poetry virtual environment
poetry install
# 5. Enter the virtual environment shell
poetry shell
# 6. Continue with your project's setup
echo "Continue with your project's setup."