Dans mon fichier buildout.cfg j'ai un tel code:Comment configurer buildout pour créer des documents en utilisant sphynx bin/sphinxbuilder
parts =
...
sphinxbuilder
suivant dans la même fichier:
eggs=
...
jinja2
markupsafe
sphinx
puis, à la fin du fichier:
[sphinxbuilder]
recipe = collective.recipe.sphinxbuilder
source = ${buildout:directory}/docs-src
build = ${buildout:directory}/docs
que je fais:
bin/buildout
qui donne une sortie (en général: OK):
Updating sphinxbuilder.
collective.recipe.sphinxbuilder: writing MAKEFILE..
collective.recipe.sphinxbuilder: writing BATCHFILE..
collective.recipe.sphinxbuilder: writing custom sphinx-builder script..
Dans le dossier oeufs j'ai Sphinx
électroencéphalogramme.
Après buildout
, dans le répertoire du projet j'en ai un, nouveau catalogue: docs
. alors je cours commande:
bin/sphinx-quickstart
et comme root path for the documentation
je mis docs
puis-je modifier docs/conf.py
et uncomment
sys.path.insert(0, os.path.abspath('.'))
je lance la commande bin/sphinxbuilder
et obtenir l'erreur:
Makefile:12: *** The 'sphinx-build' command was not found.
Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the 'sphinx-build' executable.
Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/. Stop.
Problèmes principaux: (1) Comment faire fonctionner le sphinx automatiquement avec buildout? (2) Comment définir le bon chemin vers les modules de projet (applications) dans les fichiers .rst? (3) Où mettre le fichier conf.py
?
travaillez-vous sur Windows? Il y a un bug dans l'oeuf collectif 0.8.2 py27 collective.recipe.sphinxbuilder qui me cause une erreur (ligne 146 dans le sphinxbuilder/__ init__.py) qui m'empêche de construire. Je suis toujours capable d'utiliser les autres scripts, mais l'utilisation de "parts = sphinxbuilder" comme dans leurs documents ne fonctionne pas correctement. –
Non, sous Linux. Je vous remercie. –