Listed below are some documentation and references I collected over the course of
Python packing tools differences:
Uninstall a python package you installed with python setup.py install? See this stackoverflow thread
Python static code analyzing tool:
- Blog post on using pylint
- Pylint project page
- message codes => http://pylint-messages.wikidot.com/all-codes
- blog about using pylint => http://nedbatchelder.com/blog/200806/pylint.html
pylint not supporting property decorator: http://www.logilab.org/52020 http://stackoverflow.com/questions/9631666/pylint-e0202-false-positive-or-is-this-piece-of-code-wrong
- generate pylintrc file:
Python Standard Coding Style:
Updating your distribution
Down the road, after you’ve made updates to your distribution and wish to make a new release:
- increment the version number in your setup.py file,
- update your CHANGES.txt file,
- if necessary, update the “Contributors” and “Thanks also to” sections of your README.txt file. run python setup.py sdist upload again.
distributing a command line python application example:
(py27_venv)> twine upload ../dist/* KeyError: Missing 'None' section from the configuration file
how to make gnu make ignore/continue after errors? http://stackoverflow.com/questions/2188376/how-to-have-gnu-make-continue-after-error
To leave a python virtualenv:
The long_description field can be attached to a text file located in the package:
from distutils.core import setup with open('README.txt') as file: long_description = file.read() setup(name='Distutils', long_description=long_description)
In that case, README.txt is a regular reStructuredText text file located in the root of the package besides setup.py.
pip install docutils to have a front-end tool
rst2html.py tool installed before using it.
To prevent registering broken reStructuredText content, you can use the rst2html program that is provided by the docutils package and check the long_description from the command line:
$ python setup.py --long-description | rst2html.py > output.html
docutils will display a warning if there’s something wrong with your syntax. Because PyPI applies additional checks (e.g. by passing –no-raw to rst2html.py in the command above), being able to run the command above without warnings does not guarantee that PyPI will convert the content successfully.
Sphinx reST syntax for various code blocks: http://sphinx-doc.org/markup/code.html
Further about generate documentation with Sphinx and reST:
(Even Varnish project uses it!) https://www.varnish-cache.org/docs/trunk/phk/sphinx.html