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


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

Re: Issues building the package 'python-asyncmy'

Path csiph.com!fu-berlin.de!bofh.it!news.nic.it!robomod
From Carsten Schoenert <c.schoenert@t-online.de>
Newsgroups linux.debian.maint.python
Subject Re: Issues building the package 'python-asyncmy'
Date Fri, 11 Oct 2024 13:30:02 +0200
Message-ID <Jwm0i-RsL-9@gated-at.bofh.it> (permalink)
References <Jwm0i-RsL-11@gated-at.bofh.it>
X-Original-To debian-python@lists.debian.org
X-Mailbox-Line From debian-python-request@lists.debian.org Fri Oct 11 11:21:42 2024
Old-Return-Path <c.schoenert@t-online.de>
X-Amavis-Spam-Status No, score=-6.997 tagged_above=-10000 required=5.3 tests=[BAYES_00=-2, FREEMAIL_FROM=0.001, LDO_WHITELIST=-5, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001] autolearn=ham autolearn_force=no
X-Policyd-Weight using cached result; rate: -5.5
MIME-Version 1.0
User-Agent Mozilla Thunderbird
Content-Language en-US
Autocrypt addr=c.schoenert@t-online.de; keydata= xsFNBFIDTk4BEACx6disb51q5rTdDmnkOayFDiLgOrZ4InnRmbTsgYJaigcRXjVtjFaxwL0M Qtzrt9srlLBReWD4JvoLP9/8z2C1ORaoOUatApssuKd32Qa80lBlduIQCfaZ6K5Ij0TXeqIb dWXMWSvpaOwt+ecBGSdEepgABtxO9Xel9zqDsAauFxBRHGzJs3bSG8QRtwnQA2+9J8UEtzAc dY69YAkF3Q6HIPP/0mbGiget/1WGR+8tPKlVMYcgZtGIP2J36GkDbfDvdbH5QLn2KtMuGXLv f1CTy+vvQL3mY4caKamCU7tLi8FSufNZpPChguNOHsbuO//ACrTFqGysVFvq25zEb60t9Hoq AXHIMlDJFnR7XBUCyAHV4NROMvGZlFbLuZpUA81Kukj72xifqk9ZFl9sxqKPgheqi+dT8peV LgvgCgMgQjvZ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poV8FwjNErex N+CUbA5inlT9oIP03LtwZoKKDuK2PojoTtGp7WZ4ryQX9i9ogUOGknAABxFg4iMBQVkyl9oF QSgHa0HlbjRj8uY1kqsO4FgrcoGiouNzEfhP5zpxvCg3BBuWngo9ApU+MXOAwuq1Gt4dzUg4 7Ir2s32nhiv5TErJzPdNrUSK/tOUZOSkOzXv1kOGbXAlhC/5a5VGfA99uFcYK899gpfB4q64 jrc3wewP0MXjVl8U004Px7sYT4BkAoCupRtmBoRWhttvbcv6T8uFMAF+j91ng0X1+n21fV+O 9wPRnD3/KJThRVMR8poUevmJbFgPfvGGmz1asVIK8tBamAZp5aCeqZ7HVkTmMbj1x07Ry7o0 iWLO
Content-Type text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding 7bit
X-Toi-Expurgateid 150726::1728645678-46FFB48D-6F4087EF/0/0 CLEAN NORMAL
X-Toi-Msgid 94bb83d3-0db1-4fd2-b377-458e9df9c9d2
X-Mailing-List <debian-python@lists.debian.org> archive/latest/22431
List-ID <debian-python.lists.debian.org>
List-URL <https://lists.debian.org/debian-python/>
List-Archive https://lists.debian.org/msgid-search/c482b138-26bb-4842-b097-7e776227c2e0@t-online.de
Approved robomod@news.nic.it
Lines 117
Organization linux.* mail to news gateway
Sender robomod@news.nic.it
X-Original-Date Fri, 11 Oct 2024 12:21:18 +0100
X-Original-Message-ID <c482b138-26bb-4842-b097-7e776227c2e0@t-online.de>
X-Original-References <d138d5ab-a9d0-4c9d-8809-2b4734f337dd@gmail.com>
Xref csiph.com linux.debian.maint.python:16366

Show key headers only | View raw


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 a build-backend?')
> -        with WheelFile.open(wheel) as source:
> -            install(
> -                source=source,
> -                destination=destination,
> -                additional_metadata={},
> -            )
> +        if self.built_wheel(context, args) is not None:
> +            wheel = Path(self.built_wheel(context, args))
> +            if wheel.name.startswith('UNKNOWN'):
> +                raise Exception(f'UNKNOWN wheel found: {wheel.name}. Does '
> +                                'pyproject.toml specify a build-backend?')
> +            with WheelFile.open(wheel) as source:
> +                install(
> +                    source=source,
> +                    destination=destination,
> +                    additional_metadata={},
> +                )
> +        else:
> +            raise Exception("No wheel could be found!")
>  
>      def install(self, context, args):
>          log.info('Copying package built for %s to destdir',

But this is only a fallout because no wheel was built.
I'd love to get some ideas or solutions so the wheel for this poetry 
based package can be build successfully by dh-python. Maybe we did 
simply forget (or upstream) to add some further build dependency?

The d/control file is visible here:

https://salsa.debian.org/kathara/python-asyncmy/-/blob/debian/master/debian/control?ref_type=heads

-- 
Regards
Carsten

Back to linux.debian.maint.python | Previous | Next | Find similar


Thread

Re: Issues building the package 'python-asyncmy' Carsten Schoenert <c.schoenert@t-online.de> - 2024-10-11 13:30 +0200

csiph-web