Package: python3-numpy
Version: 1:1.17.4-3
Control: affects -1 src:casacore

Dear numpy maintainers,

the numpy package depends on all possible Python 3 versions at the same
time:

* python
* python3.7
* python3.8

There is no need to depend on the individual Python versions; any
supported version should be sufficient. Otherwise both versions are
pulled, even when they are not used.

My specific problem with that is that CMake fails to find the Python 3.7
development libraries when Python 3.8 is installed without development
libs. This happens in the "casacore" package:

Build-Depends: [...], python3-dev, python3-numpy, [...]

This pulls python3.7, python3.8, python3.7-dev, but not (on purpose)
python3.8-dev, which makes the following CMake fail:

 find_package(Python3 REQUIRED COMPONENTS Interpreter Development NumPy)

results in

CMake Error at
/usr/share/cmake-3.15/Modules/FindPackageHandleStandardArgs.cmake:137
(message):
  Could NOT find Python3 (missing: Python3_LIBRARY Python3_INCLUDE_DIR
  Development NumPy) (found version "3.8.0")
Call Stack (most recent call first):
  /usr/share/cmake-3.15/Modules/FindPackageHandleStandardArgs.cmake:378
(_FPHSA_FAILURE_MESSAGE)
  /usr/share/cmake-3.15/Modules/FindPython/Support.cmake:1653
(find_package_handle_standard_args)
  /usr/share/cmake-3.15/Modules/FindPython3.cmake:215 (include)
  python3/CMakeLists-cmake3.14.txt:3 (find_package)
  python3/CMakeLists.txt:4 (include)

While this is probably a bug in cmake, it would help if one could avoid
installing a Python version that is not standard for the moment.

Best regards

Ole

Reply via email to