I'm trying to package 'migen': http://www.contrib.andrew.cmu.edu/~somlo/python-migen-rpm/python-migen.spec
The sources come with a ./doc directory that uses sphinx-build to generate documentation, and a ./doc/conf.py file which imports the package being built, in order to automatically paste various code and doc bits from the module into the resulting documentation (see: https://github.com/m-labs/migen/blob/master/doc/conf.py, https://github.com/m-labs/migen/blob/master/doc/conf.py#L60, and https://github.com/m-labs/migen/blob/master/doc/conf.py#L259). Trouble is, I can't "BuildRequires:" the package I'm currently in the process of building, so the %make_build -C doc latexpdf man line under "%build" results in an error: make: Entering directory '/builddir/build/BUILD/migen-afe4405becdbc76539f0195c319367187012b05e/doc' sphinx-build -b man -d _build/doctrees . _build/man Running Sphinx v1.7.5 make: Leaving directory '/builddir/build/BUILD/migen-afe4405becdbc76539f0195c319367187012b05e/doc' Configuration error: There is a programable error in your configuration file: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/sphinx/config.py", line 161, in __init__ execfile_(filename, config) File "/usr/lib/python3.6/site-packages/sphinx/util/pycompat.py", line 150, in execfile_ exec_(code, _globals) File "conf.py", line 62, in <module> migen_version = pkg_resources.require("migen")[0].version File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 888, in require needed = self.resolve(parse_requirements(requirements)) File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 774, in resolve raise DistributionNotFound(req, requirers) pkg_resources.DistributionNotFound: The 'migen' distribution was not found and is required by the application make: *** [Makefile:112: man] Error 2 I've tried everything I can think of before running make on the doc directory: - adding "%{_builddir}/%{?buildsubdir}" to PYTHONPATH (contains the 'migen' module directory in the sources) - moving the call to make to %install and adding "%{buildroot}%{python3_sitelib}" to PYTHONPATH (where the 'migen' module is installed by %py3_install) - inserting "sys.path.insert(...)" and/or "sys.path.append(...)" statements (using sed) into doc/conf.py before running make during either %build or %install ... and nothing seems to help. Any clues as to what I may be missing much appreciated! Thanks, --Gabriel _______________________________________________ python-devel mailing list -- python-devel@lists.fedoraproject.org To unsubscribe send an email to python-devel-le...@lists.fedoraproject.org Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/python-devel@lists.fedoraproject.org