Path: csiph.com!news.mixmin.net!news2.arglkargh.de!news.karotte.org!fu-berlin.de!bofh.it!news.nic.it!robomod From: Jerome Kieffer Newsgroups: linux.debian.maint.python Subject: Migration from setuptools to pyproject Date: Wed, 03 May 2023 10:20:01 +0200 Message-ID: X-Mailbox-Line: From debian-python-request@lists.debian.org Wed May 3 08:13:52 2023 Old-Return-Path: X-Amavis-Spam-Status: No, score=-6.901 tagged_above=-10000 required=5.3 tests=[BAYES_00=-2, LDO_WHITELIST=-5, MURPHY_SCAM1=0.1, RCVD_IN_MSPIKE_H2=-0.001] autolearn=ham autolearn_force=no X-Policyd-Weight: using cached result; rate: -4.6 X-Greylist: delayed 437 seconds by postgrey-1.36 at bendel; Wed, 03 May 2023 08:13:33 UTC Ironport-Sdr: K+i9AT5fFDYwdjewCsgDKHaMU+wKHtvOtEvLZH8HdFqiYJCbbwkB2Nslnz2B9mrGtg+QgBL8bq X9UqpzXEIglw== X-Ironport-Av: E=Sophos;i="5.99,246,1677538800"; d="scan'208";a="87597462" X-Mailer: Claws Mail 4.1.1 (GTK 3.24.37; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Mailing-List: archive/latest/20918 List-ID: List-URL: List-Archive: https://lists.debian.org/msgid-search/20230503100611.2064003e@mac13.esrf.fr Approved: robomod@news.nic.it Lines: 49 Organization: linux.* mail to news gateway Sender: robomod@news.nic.it X-Original-Date: Wed, 3 May 2023 10:06:11 +0200 X-Original-Message-ID: <20230503100611.2064003e@mac13.esrf.fr> Xref: csiph.com linux.debian.maint.python:15009 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