- 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.
pypi responded with an HTTP 500 when uploading the last version of
`cheat`, and this seems to have caused some problems. No changes were
made in this commit other than incrementing the version number in an
attempt to resolve this.
* 'setup-improvements' of https://github.com/youtux/cheat:
Use entry_points instead of scripts in setup.py
Improve setup.py description
Exploit setuptools package_data to include cheats
Use find_packages from setuptools to identify packages
Use setuptools insted of distutils.
Now, whenever a cheatsheet is to be edited, if that cheatsheet does not
exist on the `DEFAULT_SHEET_PATH`, it is first copied there before being
opened for editing. This prevents system-wide cheatsheets from being
edited when using `cheat` as `root`.
- Solves issue whereby global cheatsheets fail to save after editing
- `cheat` no longer asks a user if a global cheatsheet should be copied
locally before editing, and instead just silently does so.
This allows a fine-grained control of the dependencies, because it generates a wrapper script
that calls the specifiend function (i.e., main inside cheat/app.py)
The `setup.py` script no longer attempts to install files to privileged
system directories. (Previously, it attempted to do this in order to
enable command-line autocompletion.) In lieu of doing this within the
installer directly, I have simply included brief instructions explaining
how to configure this manually.
Version bumped accordingly.
Previously, `sheets.print()` would query the filesystem every time it
was invoked. This was inelegant, because it is called multiple times
every time `cheat` is executed. Thus, unnecessary calls were being made
out to the filesystem.
Now the result of that function is being buffered into a module variable
when it is executed the first time, and served from there thereafter. I
broke the "functional" paradigm to a degree by doing this, but it wasn't
worth the complexity of implementing proper memoization (decorators,
etc) for such a trivial case.
Bumped the version number accordingly.