I tried removing PYBUILD_AFTER_INSTALL from debian/rules and patching
pyproject.toml, this works when I build with regular debuild, but fails using
sbuild. Not figure out what is causing the sbuild failure yet.

 pyproject.toml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/pyproject.toml b/pyproject.toml
index 46749e9..715522c 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -22,7 +22,7 @@ dependencies = [
 ]

 [tool.setuptools.packages.find]
-exclude = ["tests", "tests.*"]
+include = ["zigpy_zigate"]

 [project.optional-dependencies]
 testing = [
@@ -62,4 +62,4 @@ ignore = [
     "W503", "E203", "E501", "D202",
     "D103", "D102", "D101",  # TODO: remove these once docstrings are added
 ]


Here's the sbuild failure:
...
    dh_auto_build -O--buildsystem=pybuild
I: pybuild plugin_pyproject:129: Building wheel for python3.13 with "build" 
module
I: pybuild base:311: python3.13 -m build --skip-dependency-check --no-isolation 
--wheel --outdir 
/build/reproducible-path/zigpy-zigate-0.13.2/.pybuild/cpython3_3.13
* Building wheel...
running bdist_wheel
running build
running build_py
creating build/lib/zigpy_zigate
copying zigpy_zigate/uart.py -> build/lib/zigpy_zigate
copying zigpy_zigate/types.py -> build/lib/zigpy_zigate
copying zigpy_zigate/common.py -> build/lib/zigpy_zigate
copying zigpy_zigate/api.py -> build/lib/zigpy_zigate
copying zigpy_zigate/__init__.py -> build/lib/zigpy_zigate
running egg_info
creating zigpy_zigate.egg-info
writing zigpy_zigate.egg-info/PKG-INFO
writing dependency_links to zigpy_zigate.egg-info/dependency_links.txt
writing requirements to zigpy_zigate.egg-info/requires.txt
writing top-level names to zigpy_zigate.egg-info/top_level.txt
writing manifest file 'zigpy_zigate.egg-info/SOURCES.txt'
reading manifest file 'zigpy_zigate.egg-info/SOURCES.txt'
adding license file 'LICENSE'
adding license file 'COPYING'
writing manifest file 'zigpy_zigate.egg-info/SOURCES.txt'
installing to build/bdist.linux-x86_64/wheel
running install
running install_lib
creating build/bdist.linux-x86_64/wheel
creating build/bdist.linux-x86_64/wheel/zigpy_zigate
copying build/lib/zigpy_zigate/__init__.py -> 
build/bdist.linux-x86_64/wheel/./zigpy_zigate
copying build/lib/zigpy_zigate/api.py -> 
build/bdist.linux-x86_64/wheel/./zigpy_zigate
copying build/lib/zigpy_zigate/common.py -> 
build/bdist.linux-x86_64/wheel/./zigpy_zigate
copying build/lib/zigpy_zigate/types.py -> 
build/bdist.linux-x86_64/wheel/./zigpy_zigate
copying build/lib/zigpy_zigate/uart.py -> 
build/bdist.linux-x86_64/wheel/./zigpy_zigate
running install_egg_info
Copying zigpy_zigate.egg-info to 
build/bdist.linux-x86_64/wheel/./zigpy_zigate-0.0.0.egg-info
running install_scripts
creating build/bdist.linux-x86_64/wheel/zigpy_zigate-0.0.0.dist-info/WHEEL
creating 
'/build/reproducible-path/zigpy-zigate-0.13.2/.pybuild/cpython3_3.13/.tmp-ocqw1w4g/zigpy_zigate-0.0.0-py3-none-any.whl'
 and adding 'build/bdist.linux-x86_64/wheel' to it
adding 'zigpy_zigate/__init__.py'
adding 'zigpy_zigate/api.py'
adding 'zigpy_zigate/common.py'
adding 'zigpy_zigate/types.py'
adding 'zigpy_zigate/uart.py'
adding 'zigpy_zigate-0.0.0.dist-info/COPYING'
adding 'zigpy_zigate-0.0.0.dist-info/LICENSE'
adding 'zigpy_zigate-0.0.0.dist-info/METADATA'
adding 'zigpy_zigate-0.0.0.dist-info/WHEEL'
adding 'zigpy_zigate-0.0.0.dist-info/top_level.txt'
adding 'zigpy_zigate-0.0.0.dist-info/RECORD'
removing build/bdist.linux-x86_64/wheel
Successfully built zigpy_zigate-0.0.0-py3-none-any.whl
I: pybuild plugin_pyproject:144: Unpacking wheel built for python3.13 with 
"installer" module
   dh_auto_test -O--buildsystem=pybuild
I: pybuild base:311: cd 
/build/reproducible-path/zigpy-zigate-0.13.2/.pybuild/cpython3_3.13/build; 
python3.13 -m pytest --ignore=test_uart.py -k "not test_connect"
/usr/lib/python3/dist-packages/pytest_asyncio/plugin.py:207: 
PytestDeprecationWarning: The configuration option 
"asyncio_default_fixture_loop_scope" is unset.
The event loop scope for asynchronous fixtures will default to the fixture 
caching scope. Future versions of pytest-asyncio will default the loop scope 
for asynchronous fixtures to function scope. Set the default fixture loop scope 
explicitly in order to avoid unexpected behavior in the future. Valid fixture 
loop scopes are: "function", "class", "module", "package", "session"
  warnings.warn(PytestDeprecationWarning(_DEFAULT_FIXTURE_LOOP_SCOPE_UNSET))
============================= test session starts ==============================
platform linux -- Python 3.13.2, pytest-8.3.5, pluggy-1.5.0
rootdir: 
/build/reproducible-path/zigpy-zigate-0.13.2/.pybuild/cpython3_3.13/build
configfile: pyproject.toml
plugins: timeout-2.3.1, mock-3.14.0, cov-5.0.0, asyncio-0.25.1, typeguard-4.4.2
asyncio: mode=Mode.AUTO, asyncio_default_fixture_loop_scope=None
collected 34 items / 1 error / 4 deselected / 30 selected
==================================== ERRORS ====================================
__________________ ERROR collecting tests/test_application.py __________________
ImportError while importing test module 
'/build/reproducible-path/zigpy-zigate-0.13.2/.pybuild/cpython3_3.13/build/tests/test_application.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.13/importlib/__init__.py:88: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/test_application.py:11: in <module>
    import zigpy_zigate.zigbee.application
E   ModuleNotFoundError: No module named 'zigpy_zigate.zigbee'
=========================== short test summary info ============================
ERROR tests/test_application.py
!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!
======================== 4 deselected, 1 error in 0.16s ========================
E: pybuild pybuild:389: test: plugin pyproject failed with: exit code=2: cd 
/build/reproducible-path/zigpy-zigate-0.13.2/.pybuild/cpython3_3.13/build; 
python3.13 -m pytest --ignore=test_uart.py -k "not test_connect"
dh_auto_test: error: pybuild --test --test-pytest -i python{version} -p 3.13 
returned exit code 13
make: *** [debian/rules:5: binary] Error 25
dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2

Reply via email to