pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: python version confusion with cython (Re: math/py-scipy)



On Thu, 12 Oct 2023 at 12:47:04 +0200, "Dr. Thomas Orgis" wrote:
Am Thu, 12 Oct 2023 11:00:19 +0200
schrieb "Dr. Thomas Orgis" <thomas.orgis%uni-hamburg.de@localhost>:

OK, I am trying to test this and stumble over something along

https://github.com/scipy/scipy/issues/17808

I don't have cython or cython3 in my pkgsrc prefix. I do have
$PREFIX/bin/cython-3.10 (and cythonize-3.10). We have cython handled
along with all usual python cruft with multiversion support.

I tried to adapt some SUBST_SED that we already have for pythran, but
cython is different, as it appears both as language and compiler name
in meson.build.

How does that build for anyone? Is a cython in /usr/bin found on Linux?
I consistently get something along

===> Building for py310-scipy-1.11.3
* Building wheel...
+ meson setup /data/projekte/pkgsrc/work/math/py-scipy/work/scipy-1.11.3 /data/projekte/pkgsrc/work/math/py-scipy/work/scipy-1.11.3/.mesonpy-ps9ehs0i/build -Dbuildtype=release -Db_ndebug=if-release -Db_vscrt=md -Dblas=openblas_openmp -Dlapack=openblas_openmp --native-file=/data/projekte/pkgsrc/work/math/py-scipy/work/scipy-1.11.3/.mesonpy-ps9ehs0i/build/meson-python-native-file.ini
The Meson build system
Version: 1.1.0
Source dir: /data/projekte/pkgsrc/work/math/py-scipy/work/scipy-1.11.3
Build dir: /data/projekte/pkgsrc/work/math/py-scipy/work/scipy-1.11.3/.mesonpy-ps9ehs0i/build
Build type: native build
Project name: SciPy
Project version: 1.11.3
C compiler for the host machine: cc (gcc 11.4.0 "gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0")
C linker for the host machine: cc ld.bfd 2.38
C++ compiler for the host machine: c++ (gcc 11.4.0 "g++ (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0")
C++ linker for the host machine: c++ ld.bfd 2.38

../../meson.build:1:0: ERROR: Unknown compiler(s): [['cython'], ['cython3']]
The following exception(s) were encountered:
Running `cython -V` gave "[Errno 2] No such file or directory: 'cython'" Running `cython3 -V` gave "[Errno 2] No such file or directory: 'cython3'"

A full log can be found at /data/projekte/pkgsrc/work/math/py-scipy/work/scipy-1.11.3/.mesonpy-ps9ehs0i/build/meson-logs/meson-log.txt

ERROR Backend subprocess exited when trying to invoke build_wheel
*** Error code 1


Why not everyone?

Short answer: the version of Meson from pkgsrc you're using is too old.
Please update to at least meson-1.2.1nb3. This handles pkgsrc's idea of
versioned Cython. (Yes, there's a separate packaging bug at present
that py-scipy and py-pandas should both specify they need a newer
patched version of meson at minimum. That's a miss on my part, sorry.)

This has been discussed in a couple of email threads, e.g., see
http://mail-index.netbsd.org/tech-pkg/2023/09/29/msg028251.html

There are several possibilities to handle this differently. You touched
on one I didn't mention, using Cython as an unversioned tool.

Regards,

Dave


Home | Main Index | Thread Index | Old Index