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


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

Re: Bug#1091197: ITP: python-genson -- user-friendly JSON Schema generator

From Carsten Schoenert <c.schoenert@t-online.de>
Newsgroups linux.debian.maint.python
Subject Re: Bug#1091197: ITP: python-genson -- user-friendly JSON Schema generator
Date 2024-12-26 08:50 +0100
Message-ID <JXQN3-2M2i-3@gated-at.bofh.it> (permalink)
References <JXJVf-2DHD-5@gated-at.bofh.it> <JXJVf-2DHD-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Hello Simon,

Am 26.12.24 um 02:23 schrieb Simon Josefsson:
> Hi.  I'm struggling with packaging for this package:
> 
> https://salsa.debian.org/python-team/packages/python-genson

...
> Why doesn't pybuild do the right thing by default?

on which base pybuild could make the right decision? pybuild is doing 
what it need and should do.

The missing installation of the subfolder looks to me like an upstream 
issue.
If the folder is needed for later usage it needs to get installed by 
setuptools.

> 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
> --- a/debian/rules
> +++ b/debian/rules
> @@ -3,6 +3,7 @@
>   include /usr/share/dpkg/pkg-info.mk # DEB_VERSION
>   
>   #export PYBUILD_NAME = genson
> +export PYBUILD_TEST_ARGS= -k 'not test_no_input'
>   
>   %:
>          dh $@ --buildsystem=pybuild
> @@ -10,8 +11,9 @@ include /usr/share/dpkg/pkg-info.mk # DEB_VERSION
>   B = $(CURDIR)/debian/tmp/usr/bin
>   M = $(CURDIR)/debian/tmp/usr/share/man/man1
>   
> -override_dh_auto_test:
> -       -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/
>   
>   execute_after_dh_auto_install:
>   ifeq (,$(filter nodoc,$(DEB_BUILD_PROFILES)))
> jas@kaka:~/dpkg/python-genson$

You can simplify this all by using the variable PYBUILD_BEFORE_TEST

> $ git diff debian/rules
> diff --git a/debian/rules b/debian/rules
> index a1954a9..77ab492 100755
> --- a/debian/rules
> +++ b/debian/rules
> @@ -2,7 +2,9 @@
>  
>  include /usr/share/dpkg/pkg-info.mk # DEB_VERSION
>  
> -#export PYBUILD_NAME = genson
> +export PYBUILD_NAME = genson
> +export PYBUILD_BEFORE_TEST = cp -rv {dir}/genson/schema {build_dir}/$(PYBUILD_NAME)
> +export PYBUILD_TEST_ARGS= -k 'not test_no_input'
>  
>  %:
>         dh $@ --buildsystem=pybuild
> @@ -10,9 +12,6 @@ include /usr/share/dpkg/pkg-info.mk # DEB_VERSION
>  B = $(CURDIR)/debian/tmp/usr/bin
>  M = $(CURDIR)/debian/tmp/usr/share/man/man1
>  
> -override_dh_auto_test:
> -       -dh_auto_test $(DH_BUILD_OPTS)
> -
>  execute_after_dh_auto_install:
>  ifeq (,$(filter nodoc,$(DEB_BUILD_PROFILES)))
>         mkdir -pv $(M)


And I personally would introduce another small package with just the 
binary genson. To mee it's totally fine it's serverd by the package 
python3-genson.
It's done very often within other Python binary packages.

And if you define and use own variables in the file d/rules please 
speaking namings. B and M are hard to read and for me using one 
character variable name is a bad habit.

I would drop them completely, they are used just one time!

-- 
Regards
Carsten Schönert

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


Thread

Re: Bug#1091197: ITP: python-genson -- user-friendly JSON Schema  generator Simon Josefsson <simon@josefsson.org> - 2024-12-26 01:30 +0100
  Re: Bug#1091197: ITP: python-genson -- user-friendly JSON Schema  generator Andrey Rakhmatullin <wrar@debian.org> - 2024-12-26 08:10 +0100
    Re: Bug#1091197: ITP: python-genson -- user-friendly JSON Schema  generator Simon Josefsson <simon@josefsson.org> - 2024-12-26 12:10 +0100
      Re: Bug#1091197: ITP: python-genson -- user-friendly JSON Schema  generator Andrey Rakhmatullin <wrar@debian.org> - 2024-12-26 13:00 +0100
        Re: Bug#1091197: ITP: python-genson -- user-friendly JSON Schema  generator Simon Josefsson <simon@josefsson.org> - 2024-12-26 13:50 +0100
        Re: Bug#1091197: ITP: python-genson -- user-friendly JSON Schema  generator Simon Josefsson <simon@josefsson.org> - 2025-01-27 11:20 +0100
          Re: Bug#1091197: ITP: python-genson -- user-friendly JSON Schema  generator Carsten Schoenert <c.schoenert@t-online.de> - 2025-01-27 15:10 +0100
          Re: Bug#1091197: ITP: python-genson -- user-friendly JSON Schema  generator Dmitry Shachnev <mitya57@debian.org> - 2025-01-27 15:20 +0100
  Re: Bug#1091197: ITP: python-genson -- user-friendly JSON Schema  generator Carsten Schoenert <c.schoenert@t-online.de> - 2024-12-26 08:50 +0100
  Re: Bug#1091197: ITP: python-genson -- user-friendly JSON Schema  generator Carsten Schoenert <c.schoenert@t-online.de> - 2024-12-26 08:50 +0100
    Re: Bug#1091197: ITP: python-genson -- user-friendly JSON Schema  generator Simon Josefsson <simon@josefsson.org> - 2024-12-26 12:50 +0100

csiph-web