Skip to content

Improve Python version and OS compatibility, fixing deprecations #1654

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 17 commits into from
Sep 12, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
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 automatically
installs/upgrades the "build" and "twine" packages in it. This is
only done if "make" is run in a virtual environment.

This can be a fresh environment: neither the project nor its
dependencies need to be installed in it. Because the "build" module
is not currently used in any tests and running "make" in a virtual
environment 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 virtual
environment, 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 run
in needs to have a usable "build" module.
  • Loading branch information
EliahKagan committed Sep 11, 2023
commit 5343aa01e9d90481e4570797e99faf6a98ba8f6c
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ release: clean
make force_release

force_release: clean
# IF we're in a virtual environment, add build tools
test -z "$$VIRTUAL_ENV" || pip install -U build twine
python3 -m build --sdist --wheel
twine upload dist/*
git push --tags origin main
14 changes: 8 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -188,13 +188,15 @@ Please have a look at the [contributions file][contributing].

### How to make a new release

- Update/verify the **version** in the `VERSION` file
- Update/verify that the `doc/source/changes.rst` changelog file was updated
- Commit everything
- Run `git tag -s <version>` to tag the version in Git
- Run `make release`
- Update/verify the **version** in the `VERSION` file.
- Update/verify that the `doc/source/changes.rst` changelog file was updated.
- Commit everything.
- Run `git tag -s <version>` to tag the version in Git.
- _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`.\
(When run in a virtual environment, the next step will automatically take care of installing `build` and `twine` in it.)
- Run `make release`.
- Close the milestone mentioned in the _changelog_ and create a new one. _Do not reuse milestones by renaming them_.
- Got to [GitHub Releases](https://github.com/gitpython-developers/GitPython/releases) and publish a new one with the recently pushed tag. Generate the changelog.
- Go to [GitHub Releases](https://github.com/gitpython-developers/GitPython/releases) and publish a new one with the recently pushed tag. Generate the changelog.

### How to verify a release (DEPRECATED)

Expand Down
1 change: 0 additions & 1 deletion test-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
black
build
coverage[toml]
ddt>=1.1.1, !=1.4.3
mypy
Expand Down