has2k1 / scikit-misc

Miscellaneous tools for data analysis and scientific computing
https://has2k1.github.io/scikit-misc/stable
BSD 3-Clause "New" or "Revised" License
39 stars 9 forks source link

scikit-misc fails to build with Python 3.13 #30

Closed penguinpee closed 5 months ago

penguinpee commented 8 months ago

Fedora is preparing for upgrading Python to version 3.13 (not yet released) in Fedora 41 (scheduled to be released in October). Part of that effort is rebuilding all packages using Python 3.13 pre-releases as they become available.

Currently scikit-misc fails to build using Python 3.13.0a4:

../skmisc/meson.build:22:15: ERROR: Command `/usr/bin/python3 -c 'import os
  os.chdir(os.path.join("..", "tools"))
  import numpy as np
  try:
    incdir = os.path.relpath(np.get_include())
  except Exception:
    incdir = np.get_include()
  print(incdir)
  '` failed with status 1.

I'm reporting this for awareness. I will also try to figure out what's causing the issue and, if I can, come up with a patch.

penguinpee commented 8 months ago

This turns out to be an issue with meson-python behaving differently with Python 3.12.

I executed above snippet in our build environment and it failed with:

Traceback (most recent call last):
  File "<string>", line 3, in <module>
    import numpy as np
ModuleNotFoundError: No module named 'numpy'

I could simply add numpy as a build dependency and the issue would go away. But since I didn't need to do that in Python 3.12, I asked the package maintainer of meson-python in Fedora to take a look. After all it will still be a while before 3.13 is actually going to be released.

I'll follow up once I know more.

penguinpee commented 5 months ago

I believe this can be closed. PR #31 has been merged.