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

Commitb54c346

Browse files
committed
Use "python" in the virtual env, "python3" outside
This changes the build command to run with "python" when in avirtual environment, since all virtual environments support thiseven when "python" outside it is absent or refers to the wrongversion.On Windows, virtual environments don't contain a python3 command,but a global python3 command may be present, so the errors areconfusing. This fixes that by avoiding such errors altogether.
1 parentcc202cc commitb54c346

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

‎Makefile

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,13 @@ force_release: clean
2323
test -z"$$VIRTUAL_ENV"|| pip install -U build twine
2424

2525
# Build the sdist and wheel that will be uploaded to PyPI.
26-
python3 -m build --sdist --wheel || \
27-
test -z "$$VIRTUAL_ENV" && \
26+
if test -n "$$VIRTUAL_ENV"; then \
27+
python -m build --sdist --wheel; \
28+
else \
29+
python3 -m build --sdist --wheel || \
2830
echo "Use a virtual-env with 'python -m venv env && source env/bin/activate' instead" && \
29-
false
31+
false; \
32+
fi
3033

3134
# Upload to PyPI and push the tag.
3235
twine upload dist/*

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp