Skip to content

Commit 3a4ccda

Browse files
committed
Project cleanup
* Adjusted README.md for standard pip installation. Added information on how to handle multiple envs. Used absolute paths instead of relative for documentation for when it gets uploaded to other sites * Adjusted some of the information for uploading to PyPI, tweaked the version slightly * Minor tweaks and nitpicky stuff
1 parent e4e6645 commit 3a4ccda

File tree

5 files changed

+35
-22
lines changed

5 files changed

+35
-22
lines changed

MANIFEST.in

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
include LICENSE
22
include README.md
33
include TODO.md
4-
recursive-include git_py_stats *
4+
recursive-include git_py_stats *.py
55
recursive-include man *
66
global-exclude *.pyc __pycache__/
7+
prune git_py_stats/tests
78

README.md

+14-8
Original file line numberDiff line numberDiff line change
@@ -113,9 +113,12 @@ to the parent project:
113113
You can check your Python version with:
114114

115115
```bash
116-
python3 --version
116+
python --version
117117
```
118118

119+
If your `python` is symlinked to Python 2, you can use
120+
[`pyenv`](https://github.com/pyenv/pyenv) to switch between Python versions.
121+
119122
- **Git**:
120123
Git should be installed and available in your system's `PATH`.
121124
@@ -132,11 +135,11 @@ to the parent project:
132135
133136
2. **Install the Package**:
134137
135-
You can install the package locally in editable mode.
138+
You can install the package directly from PyPI.
136139
This allows you to run `git-py-stats` from anywhere on your system.
137140
138141
```bash
139-
pip install -e .
142+
pip install git-py-stats
140143
```
141144
142145
Or you can run it locally without `pip` by doing the following
@@ -158,7 +161,7 @@ to the parent project:
158161
to be done in the following manner:
159162
160163
```bash
161-
python3 -m git_py_stats.main --help
164+
python -m git_py_stats.main --help
162165
```
163166
164167
### Using `setup.py`
@@ -168,7 +171,7 @@ If you prefer using `setup.py` directly:
168171
1. **Install the Package**:
169172
170173
```bash
171-
python3 setup.py install
174+
python setup.py install
172175
```
173176
174177
2. **Verify the Installation**:
@@ -306,17 +309,20 @@ export _MENU_THEME="legacy"
306309
## Contributing
307310
308311
We welcome contributions of all kinds! Please read our
309-
[CONTRIBUTING.md](CONTRIBUTING.md) guide to learn how to get involved.
312+
[CONTRIBUTING.md](https://github.com/tomice/git-py-stats/blob/main/CONTRIBUTING.md)
313+
guide to learn how to get involved.
310314
311315
## Code of Conduct
312316
313317
To ensure a positive and inclusive community, please follow our
314-
[Code of Conduct](CODE_OF_CONDUCT.md) during your interactions.
318+
[Code of Conduct](https://github.com/tomice/git-py-stats/blob/main/CODE_OF_CONDUCT.md)
319+
during your interactions.
315320
316321
## License
317322
318323
This project is licensed under the MIT License.
319-
See the [LICENSE](LICENSE) file for more details.
324+
See the [LICENSE](https://github.com/tomice/git-py-stats/blob/main/LICENSE)
325+
file for more details.
320326
321327
## Author
322328

git_py_stats/main.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ def main() -> None:
2626

2727
# Check if we are inside a Git repository
2828
if not check_git_repository():
29-
print("This is not a Git repository.")
30-
print("Please navigate to a Git repository and try again.")
29+
print("This is not a git repository.")
30+
print("Please navigate to a git repository and try again.")
3131
sys.exit(1)
3232

3333
# Get env config

man/git-py-stats.1

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.TH GIT-PY-STATS "1" "September 2024" "git-py-stats 0.1" "User Commands"
1+
.TH GIT-PY-STATS "1" "September 2024" "git-py-stats 0.1.0" "User Commands"
22
.SH NAME
33
git-py-stats \- A Python implementation of git-quick-stats.
44

setup.py

+16-10
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,34 @@
11
from setuptools import setup, find_packages
22

3+
# Read the long description from README
4+
with open("README.md", "r", encoding="utf-8") as fh:
5+
long_description = fh.read()
6+
37
setup(
48
name="git-py-stats",
5-
version="0.1",
6-
packages=find_packages(
7-
exclude=["*.tests", "*.tests.*", "tests.*", "tests"]
8-
), # Exclude test packages
9+
version="0.1.0",
10+
packages=find_packages(),
911
entry_points={
1012
"console_scripts": [
1113
"git-py-stats=git_py_stats.main:main",
1214
],
1315
},
14-
install_requires=[
15-
# Nothing
16-
],
1716
data_files=[
18-
# Manpages
1917
("share/man/man1", ["man/git-py-stats.1"]),
2018
],
2119
description="A Python Implementation of git-quick-stats",
22-
long_description=open("README.md").read(),
20+
long_description=long_description,
2321
long_description_content_type="text/markdown",
2422
author="Tom Ice",
23+
author_email="[email protected]",
2524
license="MIT",
2625
url="https://github.com/tomice/git-py-stats",
27-
python_requires=">=3.6",
26+
classifiers=[
27+
"Programming Language :: Python :: 3",
28+
"License :: OSI Approved :: MIT License",
29+
"Operating System :: OS Independent",
30+
],
31+
python_requires=">=3.8",
32+
include_package_data=True,
33+
keywords="git stats statistics command-line",
2834
)

0 commit comments

Comments
 (0)