[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Discuss-gnuradio] Need help with docs/sphinx
From: |
Gisle Vanem |
Subject: |
[Discuss-gnuradio] Need help with docs/sphinx |
Date: |
Fri, 22 Jun 2018 07:17:28 +0200 |
User-agent: |
Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 |
I'm on Windows-10 trying to build the Python docs using
'sphinx-build -b html'. As the README says, it's really
best suited for Unix with it's run_sphinx_build.sh.
Anyway, I tried with this GNU-make snippet
in docs/my-doc.mak:
PY_PATH = $(SITE_DIR)
PYD_PATH = ... all the paths under $(SITE_DIR)/gnuradio here
define generate_sphinx
echo "Creating Sphinx documentation in: $(realpath $(2))."
export PYTHONPATH='$(PY_PATH);$(PYD_PATH);$(PYTHONPATH)' ; \
sphinx-build -q -T --no-color -b html $(1) $(2) 2> sphinx.log
endef
# And BTW, I need to export with PYTHONPATH in quotes, otherwise
# 'bash' complains.
sphinx/source/conf.py: sphinx/source/conf.py.in
sed -e 's|@VERSION@|$(VERSION)|g' \
-e 's|@CMAKE_CURRENT_SOURCE_DIR@|$(realpath sphinx)|g' \
-e 's|@CMAKE_INSTALL_PREFIX@|$(BUILD_DIR)|g' \
-e 's|@GR_PYTHON_DIR@|lib/site-packages|g' < $< >> $@
sphinx: sphinx/source/conf.py
$(call generate_sphinx, sphinx/source, sphinx/out)
--------------
It doesn't work; I get 15600 lines of traceback and errors in the
sphinx.log file; none (few?) of the .pyd files are found. I think
I'm invoking sphinx-build with the correct PYTHONPATH.
Here is one of those errors:
WARNING: F:\gv\dx-radio\gnuradio\docs\sphinx\source\analog.rst:4:
(WARNING/2) autodoc: failed to import class u'cpm' from module
u'gnuradio.analog';
the following exception was raised:
Traceback (most recent call last):
File "f:\programfiler\python27\lib\site-packages\sphinx\ext\autodoc.py", line
658, in import_object
__import__(self.modname)
File
"F:\gv\dx-radio\gnuradio\MSVC-build\lib\site-packages\gnuradio\analog\__init__.py",
line 33, in <module>
from analog_swig import *
File
"F:\gv\dx-radio\gnuradio\MSVC-build\lib\site-packages\gnuradio\analog\analog_swig.py",
line 26, in <module>
_analog_swig = swig_import_helper()
File "F:\gv\dx-radio\gnuradio\MSVC-build\lib\site-packages\gnuradio\analog\analog_swig.py", line 22, in
swig_import_helper
_mod = imp.load_module('_analog_swig', fp, pathname, description)
ImportError: DLL load failed: The given module was not found << translated from
Norwegian.
---
even though I have a
F:\gv\dx-radio\gnuradio\MSVC-build\lib\site-packages\gnuradio\analog\_analog_swig.pyd
and obviously a 'analog_swig.py' in the correct place, no?
Where is the Swig-generated code expecting the .pyd to exist?
And do I really need all these paths for Sphinx to find it's stuff?
It seems it wants more PATHS than that.
I'm not sure what '@GR_PYTHON_DIR@' should be substituted with.
But with the above, it writes this in the generated shpinx/source/conf.py:
sys.path.insert(0, os.path.abspath('F:/gv/dx-radio/gnuradio/docs/sphinx'))
sys.path.insert(0, 'F:/gv/dx-radio/gnuradio/MSVC-build/lib/site-packages')
Is that correct?
--
--gv
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Discuss-gnuradio] Need help with docs/sphinx,
Gisle Vanem <=