collective.checkdocs
raw JSON → 0.2 verified Fri May 01 auth: no python maintenance
A distutils command to view and validate reStructuredText in a package's long_description. Current version 0.2, last released in 2012 (in maintenance mode).
pip install collective.checkdocs Common errors
error Command 'checkdocs' not found ↓
cause Missing setup_requires or not installed in the current environment.
fix
Add 'setup_requires=["collective.checkdocs"]' in setup.py and run 'pip install collective.checkdocs'.
error ImportError: No module named 'collective' ↓
cause Trying to import the command module directly instead of using it as a distutils command.
fix
Do not import collective.checkdocs in your code; use 'python setup.py checkdocs' after adding to setup_requires.
error AttributeError: 'str' object has no attribute 'decode' ↓
cause Python 3 incompatibility: code uses str.decode() which was removed.
fix
Use 'twine check dist/*' instead; or patch the source manually (not recommended).
Warnings
deprecated collective.checkdocs is unmaintained since 2012; consider using 'twine check' instead. ↓
fix Use 'twine check dist/*' after building your package.
gotcha The package is installed as a setup_requires dependency, not a regular runtime dependency. Adding it to install_requires will break deployments. ↓
fix Only add to setup_requires in setup.py, never to install_requires.
gotcha Python 3 compatibility was never officially released; may fail on Python 3.6+. ↓
fix Use 'twine check' or 'rstcheck' for modern Python versions.
Imports
- checkdocs wrong
from collective.checkdocs import checkdocscorrectfrom setuptools import setup # no direct import needed; use setup.py check -r
Quickstart
# In setup.py:
from setuptools import setup
setup(
name='mypackage',
version='0.1',
description='My package',
long_description=open('README.rst').read(),
setup_requires=['collective.checkdocs'],
# ...
)
# Then run: python setup.py checkdocs