Path: csiph.com!weretis.net!feeder8.news.weretis.net!news.samoylyk.net!gothmog.csi.it!bofh.it!news.nic.it!robomod From: Simon Josefsson Newsgroups: linux.debian.maint.python Subject: Re: Bug#1091197: ITP: python-genson -- user-friendly JSON Schema generator Date: Thu, 26 Dec 2024 01:30:01 +0100 Message-ID: References: X-Mailbox-Line: From debian-python-request@lists.debian.org Thu Dec 26 00:24:05 2024 Old-Return-Path: X-Amavis-Spam-Status: No, score=-14.4 tagged_above=-10000 required=5.3 tests=[BAYES_00=-2, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FOURLA=0.1, LDO_WHITELIST=-5, PGPSIGNATURE=-5, RCVD_IN_DNSWL_MED=-2.3] autolearn=ham autolearn_force=no X-Policyd-Weight: using cached result; rate: -4.6 X-Hashcash: 1:23:241226:debian-python@lists.debian.org::4c5/HucSQQXXFXX/:iFj/ Openpgp: id=B1D2BD1375BECB784CF4F8C4D73CF638C53C06BE; url=https://josefsson.org/key-20190320.txt X-Hashcash: 1:23:241226:1091197@bugs.debian.org::E0MOA/+SLhQk6nt+:1iZr X-Hashcash: 1:23:241226:submit@bugs.debian.org::tYjKmmXAEl/YvG5+:0oPO+ User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-Mailing-List: archive/latest/22720 List-ID: List-URL: List-Archive: https://lists.debian.org/msgid-search/87o70zwauh.fsf@kaka.sjd.se Approved: robomod@news.nic.it Lines: 121 Organization: linux.* mail to news gateway Sender: robomod@news.nic.it X-Original-Date: Thu, 26 Dec 2024 01:23:50 +0100 X-Original-Message-ID: <87o70zwauh.fsf@kaka.sjd.se> X-Original-References: <87jzbqsjq4.fsf__16847.3339335591$1734954690$gmane$org@kaka.sjd.se> Xref: csiph.com linux.debian.maint.python:16626 --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Hi. I'm struggling with packaging for this package: https://salsa.debian.org/python-team/packages/python-genson On the 'debian/latest' branch there is a "normal" packaging (except that it ignore self-check errors), and there are two related problems: https://salsa.debian.org/python-team/packages/python-genson/-/jobs/6818093 1) Self-checks cannot find the 'genson.schema' module. E ModuleNotFoundError: No module named 'genson.schema' 2) The resulting package doesn't have the genson/schema sub-directory: jas@kaka:~/dpkg/python-genson$ curl --silent 'https://salsa.debian.org/pyth= on-team/packages/python-genson/-/jobs/6818096/artifacts/raw/aptly/pool/main= /p/python-genson/python3-genson_1.3.0-1+salsaci+20241226+4_all.deb'|dpkg -c= -|grep dist-packages/genson/ drwxr-xr-x root/root 0 2024-12-23 12:52 ./usr/lib/python3/dist-pack= ages/genson/ =2Drw-r--r-- root/root 347 2024-12-23 12:52 ./usr/lib/python3/dist-pa= ckages/genson/__init__.py =2Drw-r--r-- root/root 5877 2024-12-23 12:52 ./usr/lib/python3/dist-pa= ckages/genson/__main__.py jas@kaka:~/dpkg/python-genson$=20 On the 'hack' branch I made a crude attempt at resolving this, and indeed self-checks are happy, even autopkgtest, and the package contains the sub-directory: https://salsa.debian.org/python-team/packages/python-genson/-/pipelines/786= 628 jas@kaka:~/dpkg/python-genson$ curl --silent 'https://salsa.debian.org/pyth= on-team/packages/python-genson/-/jobs/6818159/artifacts/raw/aptly/pool/main= /p/python-genson/python3-genson_1.3.0-1+salsaci+20241226+6_all.deb'|dpkg -c= -|grep dist-packages/genson/ drwxr-xr-x root/root 0 2024-12-23 12:52 ./usr/lib/python3/dist-pack= ages/genson/ =2Drw-r--r-- root/root 347 2024-12-23 12:52 ./usr/lib/python3/dist-pa= ckages/genson/__init__.py =2Drw-r--r-- root/root 5877 2024-12-23 12:52 ./usr/lib/python3/dist-pa= ckages/genson/__main__.py drwxr-xr-x root/root 0 2024-12-23 12:52 ./usr/lib/python3/dist-pack= ages/genson/schema/ =2Drw-r--r-- root/root 0 2024-12-23 12:52 ./usr/lib/python3/dist-pa= ckages/genson/schema/__init__.py =2Drw-r--r-- root/root 5423 2024-12-23 12:52 ./usr/lib/python3/dist-pa= ckages/genson/schema/builder.py =2Drw-r--r-- root/root 4741 2024-12-23 12:52 ./usr/lib/python3/dist-pa= ckages/genson/schema/node.py drwxr-xr-x root/root 0 2024-12-23 12:52 ./usr/lib/python3/dist-pack= ages/genson/schema/strategies/ =2Drw-r--r-- root/root 522 2024-12-23 12:52 ./usr/lib/python3/dist-pa= ckages/genson/schema/strategies/__init__.py =2Drw-r--r-- root/root 2109 2024-12-23 12:52 ./usr/lib/python3/dist-pa= ckages/genson/schema/strategies/array.py =2Drw-r--r-- root/root 2196 2024-12-23 12:52 ./usr/lib/python3/dist-pa= ckages/genson/schema/strategies/base.py =2Drw-r--r-- root/root 3276 2024-12-23 12:52 ./usr/lib/python3/dist-pa= ckages/genson/schema/strategies/object.py =2Drw-r--r-- root/root 1891 2024-12-23 12:52 ./usr/lib/python3/dist-pa= ckages/genson/schema/strategies/scalar.py jas@kaka:~/dpkg/python-genson$=20 But the patch is really ugly! See below. It copies files from the source direcory into the pybuild internal path, including hard coded version numbers. Pybuild should have copied these files by itself. Why doesn't pybuild do the right thing by default? Any ideas how to resolve? Feel free to clone the project and/or push to it to experiment. I'll take a little break from this package now... jas@kaka:~/dpkg/python-genson$ git diff debian/latest..hack diff --git a/debian/rules b/debian/rules index a1954a9..1658f7b 100755 =2D-- a/debian/rules +++ b/debian/rules @@ -3,6 +3,7 @@ include /usr/share/dpkg/pkg-info.mk # DEB_VERSION =20 #export PYBUILD_NAME =3D genson +export PYBUILD_TEST_ARGS=3D -k 'not test_no_input' =20 %: dh $@ --buildsystem=3Dpybuild @@ -10,8 +11,9 @@ include /usr/share/dpkg/pkg-info.mk # DEB_VERSION B =3D $(CURDIR)/debian/tmp/usr/bin M =3D $(CURDIR)/debian/tmp/usr/share/man/man1 =20 =2Doverride_dh_auto_test: =2D -dh_auto_test $(DH_BUILD_OPTS) +execute_before_dh_auto_test: + cp -rv genson/schema .pybuild/cpython3_3.12/build/genson/ + cp -rv genson/schema .pybuild/cpython3_3.13/build/genson/ =20 execute_after_dh_auto_install: ifeq (,$(filter nodoc,$(DEB_BUILD_PROFILES))) jas@kaka:~/dpkg/python-genson$=20 /Simon --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iIoEARYIADIWIQSjzJyHC50xCrrUzy9RcisI/kdFogUCZ2yiFxQcc2ltb25Aam9z ZWZzc29uLm9yZwAKCRBRcisI/kdFoosvAPkBj8EzymSoTcUztgHPc7tniDbHMcbW 31QEcv+juBBRiwD/c+cJsGtaGAFjVFm5B2/Nhdcffj7hI5CvnVT40c0hVw8= =d+of -----END PGP SIGNATURE----- --=-=-=--