Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitcc202cc

Browse files
committed
Improve when and how Makefile suggests virtual env
The avoids showing the message when the build command was alreadyrun in a virtual environment.It also keeps the command failing, so the subsequent twine commandis not attempted. (Just adding "|| echo ..." caused the command tosucceed, because "echo ..." itself succeeds except in the rare caseit cannot write to standard output.)
1 parentb1c61d9 commitcc202cc

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

‎Makefile

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,13 @@ release: clean
2121
force_release: clean
2222
# IF we're in a virtual environment, add build tools
2323
test -z"$$VIRTUAL_ENV"|| pip install -U build twine
24-
python3 -m build --sdist --wheel||echo"Use a virtual-env with 'python -m venv env && source env/bin/activate' instead"
24+
25+
# Build the sdist and wheel that will be uploaded to PyPI.
26+
python3 -m build --sdist --wheel || \
27+
test -z "$$VIRTUAL_ENV" && \
28+
echo "Use a virtual-env with 'python -m venv env && source env/bin/activate' instead" && \
29+
false
30+
31+
# Upload to PyPI and push the tag.
2532
twine upload dist/*
2633
git push --tags origin main

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp