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

Commit5343aa0

Browse files
committed
Let "make" install build and twine if in a virtual environment
If a virtual environment (created by venv or virtualenv) is active,running "make release" or "make force_release" now automaticallyinstalls/upgrades the "build" and "twine" packages in it. This isonly done if "make" is run in a virtual environment.This can be a fresh environment: neither the project nor itsdependencies need to be installed in it. Because the "build" moduleis not currently used in any tests and running "make" in a virtualenvironment takes care of installing "build" (and "twine"), "build"is now removed from test-requirements.txt.The publishing instructions in the readme are updated accordingly,to mention the optional step of creating and activating a virtualenvironment, and to briefly clarify why one might want to do that.Running "make" outside a virtual environment remains supported,except that, due to recent changes, whatever environment it is runin needs to have a usable "build" module.
1 parentf86f09e commit5343aa0

File tree

3 files changed

+10
-7
lines changed

3 files changed

+10
-7
lines changed

‎Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ release: clean
1515
make force_release
1616

1717
force_release: clean
18+
# IF we're in a virtual environment, add build tools
19+
test -z"$$VIRTUAL_ENV"|| pip install -U build twine
1820
python3 -m build --sdist --wheel
1921
twine upload dist/*
2022
git push --tags origin main

‎README.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -188,13 +188,15 @@ Please have a look at the [contributions file][contributing].
188188

189189
###How to make a new release
190190

191-
- Update/verify the**version** in the`VERSION` file
192-
- Update/verify that the`doc/source/changes.rst` changelog file was updated
193-
- Commit everything
194-
- Run`git tag -s <version>` to tag the version in Git
195-
- Run`make release`
191+
- Update/verify the**version** in the`VERSION` file.
192+
- Update/verify that the`doc/source/changes.rst` changelog file was updated.
193+
- Commit everything.
194+
- Run`git tag -s <version>` to tag the version in Git.
195+
-_Optionally_ create and activate a[virtual environment](https://packaging.python.org/en/latest/guides/installing-using-pip-and-virtual-environments/#creating-a-virtual-environment) using`venv` or`virtualenv`.\
196+
(When run in a virtual environment, the next step will automatically take care of installing`build` and`twine` in it.)
197+
- Run`make release`.
196198
- Close the milestone mentioned in the_changelog_ and create a new one._Do not reuse milestones by renaming them_.
197-
-Got to[GitHub Releases](https://github.com/gitpython-developers/GitPython/releases) and publish a new one with the recently pushed tag. Generate the changelog.
199+
-Go to[GitHub Releases](https://github.com/gitpython-developers/GitPython/releases) and publish a new one with the recently pushed tag. Generate the changelog.
198200

199201
###How to verify a release (DEPRECATED)
200202

‎test-requirements.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
black
2-
build
32
coverage[toml]
43
ddt>=1.1.1, !=1.4.3
54
mypy

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp