Package: dh-python
Version: 4.20200925
Followup-For: Bug #970524
Control: affects -1 src:h5py

This issue is preventing h5py 3.0.0 from building successfully.

pybuild with distutils generates a .pydistutils.cfg in the .pybuild
build dirs for h5py.

The .pydistutils.cfg file contains
  allow_hosts=None
  
which triggers the error message

  I: pybuild base:217: /usr/bin/python3 setup.py build 
  Traceback (most recent call last):
    File "setup.py", line 158, in <module>
      setup(
    File "/usr/lib/python3/dist-packages/setuptools/__init__.py", line 152, in 
setup
      _install_setup_requires(attrs)
    File "/usr/lib/python3/dist-packages/setuptools/__init__.py", line 147, in 
_install_setup_requires
      dist.fetch_build_eggs(dist.setup_requires)
    File "/usr/lib/python3/dist-packages/setuptools/dist.py", line 673, in 
fetch_build_eggs
      resolved_dists = pkg_resources.working_set.resolve(
    File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 764, 
in resolve
      dist = best[req.key] = env.best_match(
    File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 1049, 
in best_match
      return self.obtain(req, installer)
    File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 1061, 
in obtain
      return installer(requirement)
    File "/usr/lib/python3/dist-packages/setuptools/dist.py", line 732, in 
fetch_build_egg
      return fetch_build_egg(self, req)
    File "/usr/lib/python3/dist-packages/setuptools/installer.py", line 81, in 
fetch_build_egg
      raise DistutilsError('the `allow-hosts` option is not supported '
  distutils.errors.DistutilsError: the `allow-hosts` option is not supported 
when using pip to install requirements.
  E: pybuild pybuild:352: build: plugin distutils failed with: exit code=1: 
/usr/bin/python3 setup.py build 
  dh_auto_build: error: pybuild --build --test-pytest -i python{version} -p 
"3.9 3.8" --dir build-h5py_mpi returned exit code 13

during the pybuild build step.

For h5py it can be worked around by setting H5PY_SETUP_REQUIRES=0, but
that is not a general solution, and it ignores configuration
declarations of required packages, which is not desirable (we want to
detect at buildtime if any dependency is missing).


Related links:
https://github.com/pypa/setuptools/issues/1916

Reply via email to