Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.maint.python > #15009

Migration from setuptools to pyproject

From Jerome Kieffer <jerome.kieffer@esrf.fr>
Newsgroups linux.debian.maint.python
Subject Migration from setuptools to pyproject
Date 2023-05-03 10:20 +0200
Message-ID <GrfSp-6e3w-1@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


Dear Debian Packager

I am the upstream developer of a few debian packages (fabio, pyfai...) and
those packages used to rely on numpy.distutils. Since setuptools 60,
this is not more possible so I changed the build system to use mesonpy
(pep517 compliant).

I found it easy to tell the debian packaging helper pybuild to use the `pyproject.toml` file to build the software instead of the `setup.py`:
`export PYBUILD_SYSTEM=pyproject` in the debian/rules file.

But later on, the meson configuration finds cython as cython3 but complains the compiler was not found:

```
dh build --with python3,sphinxdoc --buildsystem=pybuild
   dh_update_autotools_config -O--buildsystem=pybuild
   dh_autoreconf -O--buildsystem=pybuild
   dh_auto_configure -O--buildsystem=pybuild
	pybuild --configure -i python{version} -p 3.11
   dh_auto_build -O--buildsystem=pybuild
	pybuild --build -i python{version} -p 3.11
I: pybuild plugin_pyproject:107: Building wheel for python3.11 with "build" module
I: pybuild base:240: python3.11 -m build --skip-dependency-check --no-isolation --wheel --outdir /home/kieffer/workspace/pyFAI/build/debian12/pyFAI-2023.5.1a0/.pybuild/cpython3_3.11_pyfai 
* Building wheel...
+ meson setup --prefix=/usr /home/kieffer/workspace/pyFAI/build/debian12/pyFAI-2023.5.1a0 /home/kieffer/workspace/pyFAI/build/debian12/pyFAI-2023.5.1a0/.mesonpy-0rgp966m/build --native-file=/home/kieffer/workspace/pyFAI/build/debian12/pyFAI-2023.5.1a0/.mesonpy-native-file.ini -Ddebug=false -Doptimization=2
The Meson build system
Version: 1.0.1
Source dir: /home/kieffer/workspace/pyFAI/build/debian12/pyFAI-2023.5.1a0
Build dir: /home/kieffer/workspace/pyFAI/build/debian12/pyFAI-2023.5.1a0/.mesonpy-0rgp966m/build
Build type: native build
Project name: pyFAI
Project version: 2023.5.1a0
C compiler for the host machine: ccache cc (gcc 12.2.0 "cc (Debian 12.2.0-14) 12.2.0")
C linker for the host machine: cc ld.bfd 2.40
Cython compiler for the host machine: cython3 (cython 0.29.32)
Host machine cpu family: x86_64
Host machine cpu: x86_64
Program cython found: NO

../../meson.build:17:0: ERROR: Program 'cython' not found or not executable

```

I had a similar problem for python3 and it was solved by installing `python-is-python3`. But there is no such trick for cython ...

Nota: `sudo ln -s /usr/bin/cython3 /usr/bin/cython` addresses the bug but I am looking for a solution which is compliant with debian packaging !

Thanks for your help.

Jerome

Back to linux.debian.maint.python | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

Migration from setuptools to pyproject Jerome Kieffer <jerome.kieffer@esrf.fr> - 2023-05-03 10:20 +0200
  Re: Migration from setuptools to pyproject Jerome Kieffer <Jerome.Kieffer@esrf.fr> - 2023-05-04 08:40 +0200

csiph-web