Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 5 additions & 9 deletions 20-poetry.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#!/bin/bash

# Check if Poetry is installed
if ! command -v poetry &> /dev/null
then
Expand All @@ -15,21 +17,15 @@ fi
# Initialize a new Poetry project with the project name
poetry init --name "$POETRY_PROJECT_NAME" --no-interaction

# Switch to non-package-mode
cat <<EOF >> pyproject.toml

[tool.poetry]
package-mode = false
EOF
# Modify the existing [tool.poetry] section to add package-mode = false
sed -i '/^\[tool.poetry\]/a package-mode = false' pyproject.toml

# add python stuff to gitignore
echo "__pycache__/" >> .gitignore

# describe in the README
cat <<EOF >> "README.md"
# $POETRY_PROJECT_NAME

## Python deps
## Python dependencies

This project uses Poetry for dependency management. To install the dependencies, run:

Expand Down
Loading