Re: Free-threaded python3.13t packaging in Debian?

2024-10-11 Thread Matthias Klose

On 07.10.24 19:28, 陈 晟祺 wrote:

Hi,

Python 3.13 is released with experimental free-threaded (or no-gil) mode [1].
Upstream calls it python3.13t. I wonder whether Debian plans to package it?

I have searched though d-python lists & some BTS bugs but got no similar
question. Please point out if I ask a duplicated one.

[1]: https://docs.python.org/3.13/whatsnew/3.13.html#free-threaded-cpython


See the discussion we had at DebConf in July/August.  My plan was not to 
use any of the features marked as experimental for the trixie release. 
We probably have a tight schedule to make 3.13 the default before the 
transition freeze.


Matthias



Re: Issues building the package 'python-asyncmy'

2024-10-11 Thread Carsten Schoenert

Hello,

Kathara and I still try to get this package build.

Am 19.08.24 um 23:01 schrieb Kathara Sasikumar:

Hellooo Python Team!

I was trying to package 'python-asyncmy',
Upstream: https://github.com/long2ice/asyncmy

This is my current working Salsa repo :
https://salsa.debian.org/kathara/python-asyncmy

There's no ITP yet. While building this package within the chroot, I got
this error message:


root@ivy:/build/python-asyncmy-0.2.9# pybuild --build -i python{version} -p 
3.12 -v
D: pybuild pybuild:602: version: 6.20240603
D: pybuild pybuild:603: ['/usr/bin/pybuild', '--build', '-i', 
'python{version}', '-p', '3.12', '-v']
D: pybuild pybuild:39: cfg: Namespace(verbose=True, quiet=False, 
really_quiet=False, detect_only=False, clean_only=False, configure_only=False, 
build_only=True, install_only=False, test_only=False, autopkgtest_only=False, 
list_systems=False, print_args=None, before_clean=None, clean_args=None, 
after_clean=None, before_configure=None, configure_args=None, 
after_configure=None, before_build=None, build_args=None, after_build=None, 
before_install=None, install_args=None, after_install=None, before_test=None, 
test_args=None, after_test=None, test_nose=False, test_nose2=False, 
test_pytest=False, test_tox=False, test_stestr=False, test_custom=False, 
dir='/build/python-asyncmy-0.2.9', destdir='debian/tmp', ext_destdir=None, 
ext_pattern='\\.so(\\.[^/]*)?$', ext_sub_pattern=None, ext_sub_repl=None, 
install_dir=None, name=None, system=None, versions=['3.12'], 
interpreter=['python{version}'], disable=None, custom_tests=False)
D: pybuild __init__:37: cannot initialize 'cmake' plugin: Missing command 
'cmake'
D: pybuild __init__:37: cannot initialize 'meson' plugin: Missing command 
'meson'
D: pybuild tools:231: invoking: /usr/bin/dpkg-architecture
D: pybuild debhelper:174: source=python-asyncmy, binary 
packages=['python3-asyncmy']
D: pybuild pybuild:151: detected build system: pyproject (certainty: 99%)
I: pybuild plugin_pyproject:129: Building wheel for python3.12 with "build" 
module
I: pybuild base:311: python3.12 -m build --skip-dependency-check --no-isolation 
--wheel --outdir /build/python-asyncmy-0.2.9/.pybuild/cpython3_3.12
D: pybuild tools:231: invoking: python3.12 -m build --skip-dependency-check 
--no-isolation --wheel --outdir 
/build/python-asyncmy-0.2.9/.pybuild/cpython3_3.12
I: pybuild plugin_pyproject:144: Unpacking wheel built for python3.12 with 
"installer" module
E: pybuild pybuild:389: build: plugin pyproject failed with: argument should be 
a str or an os.PathLike object where __fspath__ returns a str, not 'NoneType'
Traceback (most recent call last):
   File "/usr/bin/pybuild", line 387, in main
 run(func, i, version, c)
   File "/usr/bin/pybuild", line 325, in run
 result = func(context, args)
  ^^^
   File "/usr/share/dh-python/dhpython/build/plugin_pyproject.py", line 109, in 
build
 self.unpack_wheel(context, args)
   File "/usr/share/dh-python/dhpython/build/plugin_pyproject.py", line 166, in 
unpack_wheel
 wheel = Path(self.built_wheel(context, args))
 ^
   File "/usr/lib/python3.12/pathlib.py", line 1164, in __init__
 super().__init__(*args)
   File "/usr/lib/python3.12/pathlib.py", line 373, in __init__
 raise TypeError(
TypeError: argument should be a str or an os.PathLike object where __fspath__ 
returns a str, not 'NoneType'
root@ivy:/build/python-asyncmy-0.2.9#


I've dived a bit into the sources and the build process to find out what 
is going wrong in a first place.


It turned out that simply there is no wheel that could be used at this 
stage. So the seen output is happen because no wheel was build by dh-python.


The code in function built_wheel() in build/base.py is returning None in 
case no wheel could be found:


https://salsa.debian.org/python-team/tools/dh-python/-/blob/master/dhpython/build/base.py?ref_type=heads#L302

But in unpack_wheel() in build/plugin_pyproject.py there isn't doing a 
check if the call of wheel = Path(self.built_wheel(context, args)) could 
be ever successful. It is assumed there is a wheel found.


https://salsa.debian.org/python-team/tools/dh-python/-/blob/master/dhpython/build/plugin_pyproject.py?ref_type=heads#L166

So I think this needs a better catching if no wheels where build or 
found. I did hack for now this, but probably it's better to raise the 
Exception in build/base.py already?



$ git diff
diff --git a/dhpython/build/plugin_pyproject.py 
b/dhpython/build/plugin_pyproject.py
index 314f3c4..1791aa7 100644
--- a/dhpython/build/plugin_pyproject.py
+++ b/dhpython/build/plugin_pyproject.py
@@ -163,16 +163,19 @@ class BuildSystem(Base):
 script_kind='posix',
 )
 
-wheel = Path(self.built_wheel(context, args))

-if wheel.name.startswith('UNKNOWN'):
-raise Exception(f'UNKNOWN wheel found: {wheel.name}. Does '
-'pyproject.toml specify