[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Upstream build system, Sphinx autodoc, Python import path



Howdy all,

What advice can we give to upstream for their build system, so that
in a Debian build environment the Sphinx ‘autodoc’ can import upstream's
code modules?

Our wiki page on Library Style Guide advises the Debian packaging
override the Python import path:

    If you need to build the Sphinx documentation (usually from .rst or
    .md files), add:

        override_dh_auto_build:
            dh_auto_build
            PYTHONPATH=. sphinx-build -N -bhtml docs/ build/html # HTML generator
            PYTHONPATH=. sphinx-build -N -bman docs/ build/man # Manpage generator

    <URL:https://wiki.debian.org/Python/LibraryStyleGuide#Sphinx_documentation>

This is surely not ideal, though. Better would be to not need
‘PYTHONPATH’ override at all, and just call the build program.

What information do our build tools look for, and what variables are
set, when running upstream's build system?

What can we advise to upstream so their build system will work correctly
in our build environment *without* that override in every Sphinx-using
package?

-- 
 \         “For a sentimentalist is simply one who desires to have the |
  `\    luxury of an emotion without paying for it.” —Oscar Wilde, _De |
_o__)                                                 Profundis_, 1897 |
Ben Finney


Reply to: