sphinxcontrib-versioning
sphinxcontrib-versioning copied to clipboard
Sphinx-versioning and Setuptools integration
Thanks for an awesome and very useful project!
I have one issue that keeps creeping up. I noticed that sphinx-versioning
copies the source code directory to a temporary directory, and then runs sphinx-build
. Some projects do not exhibit a working run-time directory structure until setup.py
is run and the components are built. In this case, if you copy the source directory, many local imports will fail. For example, my Python package has large C/C++ components with Python classes auto-generated in this process. A much more rudimentary example would be projects that use setuptools
to generate a version.py
that is then imported locally in __init__.py
.
Can you offer an option to build each branch via setup.py
? Something along the lines of:
sphinx-versioning --build-cmd `python setup.py build install --prefix $prefixdir`
where $prefixdir
is a temp prefix directory that sphinx-versioning
runs sphinx-build
against for each branch?
Adding support for integration with setuptools
will make sphinx-versioning
work out of the box with a wider variety of Python projects.