diff --git a/README.md b/README.md index 71099ec..006c42f 100644 --- a/README.md +++ b/README.md @@ -28,8 +28,9 @@ and ease of maintenance. - [Changes from Original](#changes-from-original) - [Requirements](#requirements) - [Installation](#installation) - - [From Source](#from-source) + - [Using PyPI](#using-pypi) - [Using `setup.py`](#using-setuppy) + - [From Source](#from-source) - [Usage](#usage) - [Interactive Mode](#interactive-mode) - [Non-Interactive Mode](#non-interactive-mode) @@ -124,62 +125,71 @@ to the parent project: ## Installation -### From Source +### Using PyPI -1. **Clone the Repository**: +1. **Install Using pip**: ```bash - git clone https://github.com/tomice/git-py-stats.git - cd git-py-stats + pip install git-py-stats ``` -2. **Install the Package**: + That's it! You can now use `git-py-stats` anywhere on your system + while inside of a git repo! - You can install the package directly from PyPI. - This allows you to run `git-py-stats` from anywhere on your system. + If you experience conflicts with other packages, + try using [`venv`](https://docs.python.org/3/library/venv.html) - ```bash - pip install git-py-stats - ``` +### Using `setup.py` - Or you can run it locally without `pip` by doing the following - while inside the `git-py-stats` repo from Step 1: +If you prefer using `setup.py` directly: + +1. **Clone the Repository**: ```bash - export PYTHONPATH=$(pwd):$PYTHONPATH + git clone https://github.com/tomice/git-py-stats.git + cd git-py-stats ``` -3. **Verify the Installation**: - - While inside of a valid git repo, type the following: +2. **Install the Package**: ```bash - git-py-stats --help + python setup.py install ``` - If you decided to use the `PYTHONPATH` method, commands will need - to be done in the following manner: + That's it! You can now use `git-py-stats` anywhere on your system + while inside of a git repo! If you don't have admin permissions, + you can use the `--user` flag at the end of the command to install + this locally. + +### From Source + +1. **Clone the Repository**: ```bash - python -m git_py_stats.main --help + git clone https://github.com/tomice/git-py-stats.git + cd git-py-stats ``` -### Using `setup.py` - -If you prefer using `setup.py` directly: +2. **Set PYTHONPATH**: -1. **Install the Package**: + Set the root of `git-py-stats` to be prefixed to your `PYTHONPATH`: ```bash - python setup.py install + export PYTHONPATH=$(pwd):$PYTHONPATH ``` -2. **Verify the Installation**: + That's it! You can now use `git-py-stats` anywhere on your system + while inside of a git repo, albeit with a slight modification. + Commands will need to be done in the following manner: ```bash - git-py-stats --help + python -m git_py_stats.main --help ``` + This will tell Python to run the `git_py_stats.main` module directly. + This method is usually best for devs who want to help contribute to the + project without going through the install process a normal end user would. + ## Usage You can run Git Py Stats in both interactive and non-interactive modes: