Skip to content

Commit 2923f26

Browse files
blhsingclaude
andcommitted
release: rename distribution to pure-python-git for PyPI
PyPI rejected the name `pythongit` for normalising too close to the existing `python-git` distribution. Renamed both PyPI artifacts: pythongit -> pure-python-git pythongit-git-shim -> pure-python-git-shim The Python import path stays `pythongit.*` so user code that imports `from pythongit import ...` is unaffected. Only the pip-install names change. Published 0.1.0 of both packages to PyPI: https://pypi.org/project/pure-python-git/0.1.0/ https://pypi.org/project/pure-python-git-shim/0.1.0/ Confirmed end-to-end from a clean venv: pip install pure-python-git -> only `pygit` script pip install "pure-python-git[git]" -> `pygit` + `git` Updates: - pyproject.toml: name = "pure-python-git", extras dep = "pure-python-git-shim==0.1.0" - pure-python-git-shim/: renamed from pythongit-git-shim/ - pure-python-git-shim/pure_python_git_shim/: renamed package dir - README.md, .gitignore, CI: all references switched - CI smoke-tests now use the new wheel filenames Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 88046ab commit 2923f26

10 files changed

Lines changed: 92 additions & 85 deletions

File tree

.github/workflows/ci.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -99,13 +99,13 @@ jobs:
9999
pygit uninstall-git-shim
100100
[ ! -f "$shim" ] || (echo "uninstall left $shim behind"; exit 1)
101101
102-
- name: Verify opt-in via `pip install "pythongit[git]"` extra
102+
- name: Verify opt-in via `pip install "pure-python-git[git]"` extra
103103
shell: bash
104104
run: |
105105
# Install the sibling shim package from this repo, then re-install
106106
# pythongit with the [git] extra. The extra references
107-
# pythongit-git-shim, which should now resolve locally.
108-
python -m pip install ./pythongit-git-shim
107+
# pure-python-git-shim, which should now resolve locally.
108+
python -m pip install ./pure-python-git-shim
109109
scripts_dir=$(python -c "import sysconfig; print(sysconfig.get_path('scripts'))")
110110
if [[ "${{ runner.os }}" == "Windows" ]]; then
111111
shim="$scripts_dir/git.exe"
@@ -116,7 +116,7 @@ jobs:
116116
"$shim" --version | grep -q "pygit version"
117117
# Clean up so the test step (which does not want this extra installed)
118118
# ends back in the default state.
119-
python -m pip uninstall -y pythongit-git-shim
119+
python -m pip uninstall -y pure-python-git-shim
120120
[ ! -f "$shim" ] || (echo "pip uninstall left $shim behind"; exit 1)
121121
122122
build:
@@ -136,34 +136,34 @@ jobs:
136136
- name: Build pythongit (main package)
137137
run: python -m build
138138

139-
- name: Build pythongit-git-shim (companion package)
140-
run: python -m build pythongit-git-shim --outdir dist
139+
- name: Build pure-python-git-shim (companion package)
140+
run: python -m build pure-python-git-shim --outdir dist
141141

142142
- name: twine check both distributions
143143
run: python -m twine check dist/*
144144

145145
- name: Smoke-install — default (no `git` shim)
146146
run: |
147147
python -m venv /tmp/install-venv
148-
/tmp/install-venv/bin/pip install dist/pythongit-*.whl
148+
/tmp/install-venv/bin/pip install dist/pure_python_git-*.whl
149149
/tmp/install-venv/bin/pygit --version
150150
# `git` must NOT be installed by default.
151151
[ ! -f /tmp/install-venv/bin/git ] || (echo "unexpected git in /tmp/install-venv/bin"; exit 1)
152152
153-
- name: Smoke-install — `pythongit[git]` extra
153+
- name: Smoke-install — `pure-python-git[git]` extra
154154
run: |
155155
python -m venv /tmp/install-extra-venv
156156
# Install both wheels so the extra resolves against local artifacts.
157-
/tmp/install-extra-venv/bin/pip install dist/pythongit_git_shim-*.whl dist/pythongit-*.whl
157+
/tmp/install-extra-venv/bin/pip install dist/pure_python_git_shim-*.whl dist/pure_python_git-*.whl
158158
/tmp/install-extra-venv/bin/pygit --version
159159
/tmp/install-extra-venv/bin/git --version | grep -q "pygit version"
160-
/tmp/install-extra-venv/bin/pip uninstall -y pythongit-git-shim
160+
/tmp/install-extra-venv/bin/pip uninstall -y pure-python-git-shim
161161
[ ! -f /tmp/install-extra-venv/bin/git ] || (echo "uninstall failed"; exit 1)
162162
163163
- name: Smoke-install — `pygit install-git-shim` post-install path
164164
run: |
165165
python -m venv /tmp/install-postvenv
166-
/tmp/install-postvenv/bin/pip install dist/pythongit-*.whl
166+
/tmp/install-postvenv/bin/pip install dist/pure_python_git-*.whl
167167
/tmp/install-postvenv/bin/pygit install-git-shim
168168
/tmp/install-postvenv/bin/git --version | grep -q "pygit version"
169169
/tmp/install-postvenv/bin/pygit uninstall-git-shim

.gitignore

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ build/
33
dist/
44
*.egg-info/
55
*.egg
6-
pythongit-git-shim/build/
7-
pythongit-git-shim/dist/
8-
pythongit-git-shim/*.egg-info/
6+
pure-python-git-shim/build/
7+
pure-python-git-shim/dist/
8+
pure-python-git-shim/*.egg-info/
99

1010
# Python
1111
__pycache__/

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ implements.
5151
## Install
5252

5353
```bash
54-
pip install pythongit
54+
pip install pure-python-git
5555
```
5656

5757
By default this installs **one console script**: `pygit`. The system `git`
@@ -64,12 +64,12 @@ The `git` command name is **not** installed by default. You can opt in two ways:
6464
**1. The standard extras syntax — recommended:**
6565

6666
```bash
67-
pip install "pythongit[git]"
67+
pip install "pure-python-git[git]"
6868
```
6969

70-
This pulls in the tiny companion package `pythongit-git-shim`, which exists
70+
This pulls in the tiny companion package `pure-python-git-shim`, which exists
7171
only to register a `git` console-script. Uninstall it with
72-
`pip uninstall pythongit-git-shim` to remove the `git` command without
72+
`pip uninstall pure-python-git-shim` to remove the `git` command without
7373
touching the rest of pythongit.
7474

7575
**2. After-the-fact, without reinstalling:**
@@ -95,8 +95,8 @@ python -m pythongit <command> [args...]
9595

9696
Silently shadowing `git` on every install is a footgun: scripts that shell
9797
out to `git` start invoking pythongit instead the next time you
98-
`pip install pythongit` into a venv, without warning. Making it opt-in turns
99-
it into a deliberate choice you make per-environment.
98+
`pip install pure-python-git` into a venv, without warning. Making it opt-in
99+
turns it into a deliberate choice you make per-environment.
100100

101101
## Tutorial
102102

pure-python-git-shim/README.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# pure-python-git-shim
2+
3+
A tiny companion package to [pure-python-git](https://pypi.org/project/pure-python-git/)
4+
whose only purpose is to install a `git` console-script that calls
5+
`pythongit.cli:main`.
6+
7+
Install via the `pure-python-git[git]` extra:
8+
9+
```bash
10+
pip install "pure-python-git[git]"
11+
```
12+
13+
That pulls in `pure-python-git` and this shim, giving you both `pygit` and
14+
`git` commands. Uninstalling this shim (`pip uninstall pure-python-git-shim`)
15+
cleanly removes the `git` console-script and leaves `pygit` working.
16+
17+
The point of having this as a separate distribution is that
18+
`[project.scripts]` in `pyproject.toml` can't be gated by extras — every
19+
declared entry point gets installed unconditionally. By moving the `git`
20+
entry point into a separate distribution, we make the drop-in behavior an
21+
opt-in choice rather than something that silently happens on every
22+
`pip install pure-python-git`.
23+
24+
See pure-python-git's main README for usage.

pythongit-git-shim/pythongit_git_shim/__init__.py renamed to pure-python-git-shim/pure_python_git_shim/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
"""pythongit_git_shim is intentionally empty.
1+
"""pure_python_git_shim is intentionally empty.
22
33
This package exists only to declare a `git` console-script entry point that
44
delegates to `pythongit.cli:main`. It carries no runtime code — installing it
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
[build-system]
2+
requires = ["setuptools>=61"]
3+
build-backend = "setuptools.build_meta"
4+
5+
[project]
6+
name = "pure-python-git-shim"
7+
version = "0.1.0"
8+
description = "Drop-in `git` console-script that delegates to pure-python-git. Install via `pip install pure-python-git[git]`."
9+
readme = "README.md"
10+
requires-python = ">=3.9"
11+
authors = [{ name = "pure-python-git contributors" }]
12+
license = { file = "LICENSE" }
13+
dependencies = ["pure-python-git==0.1.0"]
14+
classifiers = [
15+
"Development Status :: 4 - Beta",
16+
"Environment :: Console",
17+
"License :: OSI Approved :: MIT License",
18+
"Operating System :: OS Independent",
19+
"Programming Language :: Python :: 3",
20+
"Topic :: Software Development :: Version Control :: Git",
21+
]
22+
23+
[project.urls]
24+
Homepage = "https://github.com/blhsing/pythongit"
25+
Repository = "https://github.com/blhsing/pythongit"
26+
"Main package" = "https://pypi.org/project/pure-python-git/"
27+
28+
[project.scripts]
29+
# Sole purpose of this package: register a `git` console-script that calls
30+
# pure-python-git's CLI dispatcher. Anyone who doesn't want `git` shadowed
31+
# should not install this package.
32+
git = "pythongit.cli:main"
33+
34+
[tool.setuptools.packages.find]
35+
include = ["pure_python_git_shim*"]

pyproject.toml

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ requires = ["setuptools>=61"]
33
build-backend = "setuptools.build_meta"
44

55
[project]
6-
name = "pythongit"
6+
name = "pure-python-git"
77
version = "0.1.0"
8-
description = "Pure-Python reimplementation of git. Installs `pygit`; opt in to a drop-in `git` shim via `pygit install-git-shim`."
8+
description = "Pure-Python reimplementation of git. Installs `pygit`; opt in to a drop-in `git` shim via `pip install pure-python-git[git]` or `pygit install-git-shim`."
99
readme = "README.md"
1010
requires-python = ">=3.9"
11-
authors = [{ name = "pythongit" }]
11+
authors = [{ name = "pure-python-git contributors" }]
1212
license = { file = "LICENSE" }
1313
keywords = ["git", "vcs", "version-control", "scm"]
1414
classifiers = [
@@ -29,8 +29,10 @@ classifiers = [
2929
]
3030

3131
[project.urls]
32-
Homepage = "https://github.com/example/pythongit"
33-
Repository = "https://github.com/example/pythongit"
32+
Homepage = "https://github.com/blhsing/pythongit"
33+
Repository = "https://github.com/blhsing/pythongit"
34+
Issues = "https://github.com/blhsing/pythongit/issues"
35+
"Source — companion `git` shim" = "https://github.com/blhsing/pythongit/tree/main/pure-python-git-shim"
3436

3537
[project.scripts]
3638
# The only auto-installed entry point. The `git` drop-in is opt-in via
@@ -39,11 +41,11 @@ Repository = "https://github.com/example/pythongit"
3941
pygit = "pythongit.cli:main"
4042

4143
[project.optional-dependencies]
42-
# Opt in to the drop-in `git` command via `pip install pythongit[git]`. This
43-
# pulls in pythongit-git-shim, whose only role is to register a `git`
44-
# console-script that calls pythongit.cli:main. Uninstall
45-
# `pythongit-git-shim` to remove the shim without uninstalling pythongit.
46-
git = ["pythongit-git-shim==0.1.0"]
44+
# Opt in to the drop-in `git` command via `pip install pure-python-git[git]`.
45+
# This pulls in `pure-python-git-shim`, whose only role is to register a `git`
46+
# console-script that calls pythongit.cli:main. Uninstall the shim with pip
47+
# to remove the shim without uninstalling the main package.
48+
git = ["pure-python-git-shim==0.1.0"]
4749
test = ["pytest>=7"]
4850

4951
[tool.setuptools.packages.find]

pythongit-git-shim/README.md

Lines changed: 0 additions & 24 deletions
This file was deleted.

pythongit-git-shim/pyproject.toml

Lines changed: 0 additions & 30 deletions
This file was deleted.

0 commit comments

Comments
 (0)