Skip to content

Commit 2efd3f8

Browse files
committed
fix
1 parent e40ea82 commit 2efd3f8

1 file changed

Lines changed: 10 additions & 9 deletions

File tree

20-poetry.sh

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,6 @@ if [[ -z "$POETRY_PROJECT_NAME" ]]; then
1414
export POETRY_PROJECT_NAME
1515
fi
1616

17-
# Initialize a new Poetry project with the project name
18-
poetry init --name "$POETRY_PROJECT_NAME" --python ">=3.14,<4" --no-interaction
19-
20-
# Modify the existing [tool.poetry] section to add package-mode = false
21-
sed -i '/^\[tool.poetry\]/a package-mode = false' pyproject.toml
22-
23-
# Remove authors from pyproject.toml (handles both single line and multiline)
24-
python3 -c "import sys, re; sys.stdout.write(re.sub(r'(?ms)^authors = \[.*?\]\n?', '', sys.stdin.read()))" < pyproject.toml > pyproject.toml.tmp && mv pyproject.toml.tmp pyproject.toml
25-
2617
echo "__pycache__/" >> .gitignore
2718

2819
cat <<EOF >> "README.md"
@@ -39,5 +30,15 @@ To activate the virtual environment, run:
3930
poetry shell
4031
EOF
4132

33+
# Initialize a new Poetry project with the project name
34+
poetry init --name "$POETRY_PROJECT_NAME" --python ">=3.14,<4" --no-interaction
35+
36+
# Modify the existing [tool.poetry] section to add package-mode = false
37+
sed -i '/^\[tool.poetry\]/a package-mode = false' pyproject.toml
38+
39+
# Remove authors from pyproject.toml (handles both single line and multiline)
40+
python3 -c "import sys, re; sys.stdout.write(re.sub(r'(?ms)^authors = \[.*?\]\n?', '', sys.stdin.read()))" < pyproject.toml > pyproject.toml.tmp
41+
mv pyproject.toml.tmp pyproject.toml
42+
4243
git add --all
4344
git commit -m "Initialize Poetry environment"

0 commit comments

Comments
 (0)