Bug 31919 - sphinx-build loads .py from the system pkg, not the built one
Summary: sphinx-build loads .py from the system pkg, not the built one
Status: CLOSED FIXED
Alias: None
Product: Sisyphus
Classification: Development
Component: python-module-zope.container (show other bugs)
Version: unstable
Hardware: all Linux
: P3 normal
Assignee: Ivan Zakharyaschev
QA Contact: qa-sisyphus
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-03-24 13:16 MSK by Ivan Zakharyaschev
Modified: 2023-05-24 14:01 MSK (History)
20 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ivan Zakharyaschev 2016-03-24 13:16:34 MSK
sphinx-build doesn't read the new sources.

I suspect that the problem is with zope being a namespace package; its subpackages can only be imported when they are inside /usr/lib64/pythonN/site-packages/zope/ (as our practice shows: when we moved the modules from /usr/lib64/python3.3/site-packages/ into /usr/lib64/python3/site-packages/ without the minor version, there were problems importing zope subpkgs which remained under the old path although there were no problems importing normal python modules).

Hence, sphinx-build seems to be unable to import the new zope.container files from RPM buildroot because zope forces them to be searched in its subdirectories. (That's my guess only. A fix could be to set up a zope namespace in the buildroot by cpio-ing the base python-module-zope package's files.)

I'll post the logs from filereq with TRACE_PACKAGES=python-module-zope.container which demonstrate this problem a bit later.

Exporting PYTHONPATH doesn't help.

[builder@localhost .in]$ cd ~/RPM/BUILD/python-module-zope.container-4.1.1/docs/
[builder@localhost docs]$ export PYTHONPATH=/usr/src/tmp/python-module-zope.container-buildroot/usr/lib64/python2.7/site-packages
[builder@localhost docs]$ make clean; TRACE_PACKAGES=python-module-zope.container filereq filereqs-pickle make pickle
rm -rf _build/*
sphinx-build -b pickle -d _build/doctrees   . _build/pickle
Running Sphinx v1.4a0+
making output directory...
loading pickled environment... not yet created
loading intersphinx inventory from objects.inv...
building [mo]: targets for 0 po files that are out of date
building [pickle]: targets for 4 source files that are out of date
updating environment: 4 added, 0 changed, 0 removed
reading sources... [ 25%] api                                                                                                                                                                                                                                                
	*** spp: stat /usr/lib64/python2.7/site-packages/zope/container/__init__.py

	*** spp: open /usr/lib64/python2.7/site-packages/zope/container/__init__.py

	*** spp: open /usr/lib64/python2.7/site-packages/zope/container/__init__.pyc

	*** spp: open /usr/lib64/python2.7/site-packages/zope/container/interfaces.py

	*** spp: open /usr/lib64/python2.7/site-packages/zope/container/interfaces.pyc

	*** spp: open /usr/lib64/python2.7/site-packages/zope/container/i18n.py

	*** spp: open /usr/lib64/python2.7/site-packages/zope/container/i18n.pyc

	*** spp: stat /usr/lib64/python2.7/site-packages/zope/container/interfaces.py

	*** spp: stat /usr/lib64/python2.7/site-packages/zope/container/interfaces.py

	*** spp: open /usr/lib64/python2.7/site-packages/zope/container/interfaces.py
reading sources... [100%] narrative                                                                                                                                                                                                                                          
looking for now-outdated files... none found
pickling environment... done
checking consistency... done
preparing documents... done
writing output... [100%] narrative                                                                                                                                                                                                                                           
generating indices... genindex py-modindex
highlighting module code... [100%] zope.container.interfaces                                                                                                                                                                                                                 
writing additional pages... search opensearch
copying static files... WARNING: html_static_path entry u'/usr/src/RPM/BUILD/python-module-zope.container-4.1.1/docs/_static' does not exist
done
copying extra files... done
dumping search index in English (code: en) ... done
dumping object inventory... done
build succeeded, 1 warning.

Build finished; now you can process the pickle files.
filereq: weak-only access files:
/usr/bin/base64
/usr/bin/gettext
/usr/bin/locale
/usr/bin/python
/usr/bin/python2.7
/usr/bin/time
/usr/lib/python2.7/site-packages/cssselect-0.9.1-py2.7.egg-info
/usr/lib/python2.7/site-packages/docutils-0.13-py2.7.egg-info
/usr/lib/python2.7/site-packages/docutils/writers/html4css1/html4css1.css
/usr/lib/python2.7/site-packages/enum34-1.0.4-py2.7.egg-info
/usr/lib/python2.7/site-packages/html5lib-0.999999-py2.7.egg-info
/usr/lib/python2.7/site-packages/pyasn1-0.1.8-py2.7.egg-info
/usr/lib/python2.7/site-packages/pyserial-2.7-py2.7.egg-info
/usr/lib/python2.7/site-packages/pytz-2015.4-py2.7.egg-info
/usr/lib/python2.7/site-packages/snowballstemmer-1.2.0-py2.7.egg-info
/usr/lib/python2.7/site-packages/sphinx/pycode/Grammar-py2.txt
/usr/lib64/python2.7/lib-dynload/Python-2.7.11-py2.7.egg-info
/usr/lib64/python2.7/site-packages/PyStemmer-1.0.1-py2.7.egg-info
/usr/lib64/python2.7/site-packages/Twisted-15.3.0-py2.7.egg-info
/usr/lib64/python2.7/site-packages/floatint-0.0.0-py2.7.egg-info
/usr/lib64/python2.7/site-packages/mimeparse-0.1.4-py2.7.egg-info
/usr/lib64/python2.7/site-packages/numpy-1.11.0.dev0_e12c692-py2.7.egg-info
/usr/src/RPM/BUILD/python-module-zope.container-4.1.1/docs/Makefile
/usr/src/RPM/BUILD/python-module-zope.container-4.1.1/docs/conf.py
/usr/src/RPM/BUILD/python-module-zope.container-4.1.1/docs/filereqs-pickle
/usr/src/RPM/BUILD/python-module-zope.container-4.1.1/docs/make.bat
[builder@localhost docs]$
Comment 1 Grigory Ustinov 2023-05-24 14:01:08 MSK
Нет пакета - нет ошибки.