ecmwf / eccodes-python

Python interface to the ecCodes GRIB/BUFR decoder/encoder

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

"python3 setup.py build_sphinx" gives an error

jdkloe opened this issue · comments

After switching to the renamed version eccodes (in stead of eccodes-python) for release 0.9.9 then
if I execute "python3 setup.py build_sphinx" after building the module I get the following error:

Running Sphinx v2.2.2

Configuration error:
There is a programmable error in your configuration file:

Traceback (most recent call last):
  File "/usr/lib/python3.8/site-packages/sphinx/config.py", line 361, in eval_config_file
    execfile_(filename, namespace)
  File "/usr/lib/python3.8/site-packages/sphinx/util/pycompat.py", line 81, in execfile_
    exec(code, _globals)
  File "/home/user_to_make_rpms/manual_install_test/eccodes-0.9.9/docs/conf.py", line 43, in <module>
    release = pkg_resources.get_distribution("eccodes-python").version
  File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 481, in get_distribution
    dist = get_provider(dist)
  File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 357, in get_provider
    return working_set.find(moduleOrReq) or require(str(moduleOrReq))[0]
  File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 900, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 786, in resolve
    raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'eccodes-python' distribution was not found and is required by the application

The problem seems to be in file docs/conf.py which still refers to the project as eccodes-python in stead of plain eccodes on lines 35 and 43.
If I manually edit this file, and replace the 2 occurrences of eccodes-python with eccodes, then the documentation generation runs as expected.