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

Commit72e48aa

Browse files
committed
Update installation instructions in readme
This changes the installation instructions in README.md torecommend "pip install ." instead of "python setup.py install". Theformer is compatible with Python 3.12 which doesn't have setuptoolsinstalled by default (so setup.py, which imports it, can beindirectly but not directly used). This also matches thecorresponding change made in the installation unit test.While doing so, I've also clarified the instructions, and added theimplied "cd" command as well as the "git fetch --tags" command inthe position where a later section was recently updated to mentionit should have been run.Using "pip install ." creates the opportunity to pass "-e" to makean editable install, which users who clone the repository to workon changes should do, because the effect of an editable install isonly partially simulated by pytest, and so that manual testing ofchanges actually uses the changes intended for testing.This increases the length and detail of the instructions, so I'veadded h4 subsections to clarify the separations between them andmake it easier for readers to find the part they're looking for. Indoing so, I've reordered these subsections accordingly. Becausegreater detail can create the impression that all important stepsare mentioned, I've made the general good advice to use a virtualenvironment explicit. For brevity, I have not added venv commands.
1 parentdba4245 commit72e48aa

File tree

1 file changed

+28
-9
lines changed

1 file changed

+28
-9
lines changed

‎README.md

Lines changed: 28 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -49,30 +49,49 @@ The installer takes care of installing them for you.
4949

5050
###INSTALL
5151

52-
If you have downloadedthesource code:
52+
GitPython and its required package dependencies can be installed in any ofthefollowing ways, all of which should typically be done in a[virtual environment](https://docs.python.org/3/tutorial/venv.html).
5353

54-
```bash
55-
python setup.py install
56-
```
54+
####From PyPI
5755

58-
or if you want to obtaina copy fromthe Pypi repository:
56+
To obtain and installa copy[fromPyPI](https://pypi.org/project/GitPython/), run:
5957

6058
```bash
6159
pip install GitPython
6260
```
6361

64-
Both commands will install the required package dependencies.
62+
(A distribution package can also be downloaded for manual installation at[the PyPI page](https://pypi.org/project/GitPython/).)
63+
64+
####From downloaded source code
65+
66+
If you have downloaded the source code, run this from inside the unpacked`GitPython` directory:
6567

66-
A distribution package can be obtained for manual installation at:<http://pypi.python.org/pypi/GitPython>.
68+
```bash
69+
pip install.
70+
```
6771

68-
If you like to clone from source, you can do it like so:
72+
####By cloning the source code repository
73+
74+
To clone the[the GitHub repository](https://github.com/gitpython-developers/GitPython) from source to work on the code, you can do it like so:
6975

7076
```bash
7177
git clone https://github.com/gitpython-developers/GitPython
72-
git submodule update --init --recursive
78+
cd GitPython
79+
git fetch --tags
7380
./init-tests-after-clone.sh
7481
```
7582

83+
If you are cloning[your own fork](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/about-forks), then replace the above`git clone` command with one that gives the URL of your fork. Or use this[`gh`](https://cli.github.com/) command (assuming you have`gh` and your fork is called`GitPython`):
84+
85+
```bash
86+
gh repo clone GitPython
87+
```
88+
89+
Having cloned the repo, create and activate your[virtual environment](https://docs.python.org/3/tutorial/venv.html). Then make an[editable install](https://pip.pypa.io/en/stable/topics/local-project-installs/#editable-installs):
90+
91+
```bash
92+
pip install -e.
93+
```
94+
7695
###Limitations
7796

7897
####Leakage of System Resources

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp