mirror of
https://github.com/cheat/cheat.git
synced 2024-11-23 22:41:35 +01:00
Use setuptools if possible, add development docs
- If setuptools is available, use that. Setuptools can be very handy in development, because it provides `python setup.py develop`. - Add development documentation, explaining how to use setuptools' develop with a virtual environment to work on cheat. - Backwards compatibility with distutils is maintained. If setuptools is not available, distutils will be used.
This commit is contained in:
parent
eff042d50b
commit
ad6d567d87
1
.gitignore
vendored
1
.gitignore
vendored
@ -3,3 +3,4 @@ MANIFEST
|
|||||||
build
|
build
|
||||||
cheat.egg-info
|
cheat.egg-info
|
||||||
dist
|
dist
|
||||||
|
venv
|
||||||
|
23
README.md
23
README.md
@ -23,7 +23,7 @@ cheat tar
|
|||||||
You will be presented with a cheatsheet resembling:
|
You will be presented with a cheatsheet resembling:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
# To extract an uncompressed archive:
|
# To extract an uncompressed archive:
|
||||||
tar -xvf '/path/to/foo.tar'
|
tar -xvf '/path/to/foo.tar'
|
||||||
|
|
||||||
# To extract a .gz archive:
|
# To extract a .gz archive:
|
||||||
@ -117,6 +117,27 @@ enable this feature, set a `CHEATCOLORS` environment variable:
|
|||||||
export CHEATCOLORS=true
|
export CHEATCOLORS=true
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Development
|
||||||
|
-----------
|
||||||
|
|
||||||
|
Virtual environments and `setuptools` can be used to develop `cheat`:
|
||||||
|
|
||||||
|
Create a virtual environment with [virtualenv](http://docs.python-guide.org/en/latest/dev/virtualenvs/):
|
||||||
|
|
||||||
|
$ virtualenv venv
|
||||||
|
|
||||||
|
Activate it:
|
||||||
|
|
||||||
|
$ source venv/bin/activate
|
||||||
|
|
||||||
|
Install `cheat` in the venv in [development mode](http://setuptools.readthedocs.io/en/latest/setuptools.html#development-mode):
|
||||||
|
|
||||||
|
$ python setup.py develop
|
||||||
|
|
||||||
|
Now `cheat` can be run from inside the venv:
|
||||||
|
|
||||||
|
$ venv/bin/cheat
|
||||||
|
|
||||||
See Also:
|
See Also:
|
||||||
---------
|
---------
|
||||||
- [Enabling Command-line Autocompletion][autocompletion]
|
- [Enabling Command-line Autocompletion][autocompletion]
|
||||||
|
Loading…
Reference in New Issue
Block a user