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


Groups > linux.debian.maint.python > #14880 > unrolled thread

Bug#1026514: python-param: FTBFS: TypeError: The only supported seed types are: None,

Started byAndreas Tille <andreas@an3as.eu>
First post2023-02-03 17:10 +0100
Last post2023-02-03 23:20 +0100
Articles 7 — 4 participants

Back to article view | Back to linux.debian.maint.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Bug#1026514: python-param: FTBFS: TypeError: The only supported seed types are: None, Andreas Tille <andreas@an3as.eu> - 2023-02-03 17:10 +0100
    Re: python-param: FTBFS: TypeError: The only supported seed types  are: None, FC Stegerman <flx@obfusk.net> - 2023-02-03 18:00 +0100
      Re: python-param: FTBFS: TypeError: The only supported seed types  are: None, FC Stegerman <flx@obfusk.net> - 2023-02-03 18:20 +0100
      Re: python-param: FTBFS: TypeError: The only supported seed types  are: None, Louis-Philippe Véronneau <pollo@debian.org> - 2023-02-03 18:20 +0100
        Re: python-param: FTBFS: TypeError: The only supported seed types  are: None, FC Stegerman <flx@obfusk.net> - 2023-02-03 18:50 +0100
          Re: python-param: FTBFS: TypeError: The only supported seed types  are: None, Dmitry Shachnev <mitya57@debian.org> - 2023-02-03 22:40 +0100
            Re: python-param: FTBFS: TypeError: The only supported seed types  are: None, FC Stegerman <flx@obfusk.net> - 2023-02-03 23:20 +0100

#14880 — Bug#1026514: python-param: FTBFS: TypeError: The only supported seed types are: None,

FromAndreas Tille <andreas@an3as.eu>
Date2023-02-03 17:10 +0100
SubjectBug#1026514: python-param: FTBFS: TypeError: The only supported seed types are: None,
Message-ID<FV6Nr-3b7p-1@gated-at.bofh.it>
Control: tags -1 help

Hi,

I've bumped upstream version to 1.12.3 which basically has the
suggested patches applied but the issue remains as you can see
in Salsa CI

   https://salsa.debian.org/science-team/python-param/-/jobs/3891083

Do you have any further hints?

Kind regards
    Andreas.

-- 
http://fam-tille.de

[toc] | [next] | [standalone]


#14881 — Re: python-param: FTBFS: TypeError: The only supported seed types are: None,

FromFC Stegerman <flx@obfusk.net>
Date2023-02-03 18:00 +0100
SubjectRe: python-param: FTBFS: TypeError: The only supported seed types are: None,
Message-ID<FV7zS-3bnt-31@gated-at.bofh.it>
In reply to#14880
* Andreas Tille <andreas@an3as.eu> [2023-02-03 17:01]:
> I've bumped upstream version to 1.12.3 which basically has the
> suggested patches applied but the issue remains as you can see
> in Salsa CI
> 
>    https://salsa.debian.org/science-team/python-param/-/jobs/3891083
> 
> Do you have any further hints?

That looks like a different issue: get_setup_version() in setup.py
seems to be trying to get the version from git, which of course fails
when building the Debian package without the .git directory present.

Presumably there is a way to get the version from e.g.
"dpkg-parsechangelog -S Version" (minus the -1 revision) instead.  I'm
not sure how other packages handle this.

- FC

[toc] | [prev] | [next] | [standalone]


#14882 — Re: python-param: FTBFS: TypeError: The only supported seed types are: None,

FromFC Stegerman <flx@obfusk.net>
Date2023-02-03 18:20 +0100
SubjectRe: python-param: FTBFS: TypeError: The only supported seed types are: None,
Message-ID<FV7Tb-3bJl-3@gated-at.bofh.it>
In reply to#14881
* FC Stegerman <flx@obfusk.net> [2023-02-03 17:58]:
> * Andreas Tille <andreas@an3as.eu> [2023-02-03 17:01]:
> > I've bumped upstream version to 1.12.3 which basically has the
> > suggested patches applied but the issue remains as you can see
> > in Salsa CI
> > 
> >    https://salsa.debian.org/science-team/python-param/-/jobs/3891083
> > 
> > Do you have any further hints?
> 
> That looks like a different issue: get_setup_version() in setup.py
> seems to be trying to get the version from git, which of course fails
> when building the Debian package without the .git directory present.
> 
> Presumably there is a way to get the version from e.g.
> "dpkg-parsechangelog -S Version" (minus the -1 revision) instead.  I'm
> not sure how other packages handle this.

Again, I'm not sure what is considered best practice here, but
something like this should work:

adding this to debian/rules

  export PARAM_PACKAGE_VERSION := $(shell dpkg-parsechangelog -S Version)

and patching setup.py to change

  def get_setup_version(reponame):
      """Use autover to get up to date version."""
      # importing self into setup.py is unorthodox, but param has no
      # required dependencies outside of python
      from param.version import Version
      return Version.setup_version(os.path.dirname(__file__),reponame,archive_commit="$Format:%h$")

to e.g.

  def get_setup_version(reponame):
      """Use autover to get up to date version."""
      if version := os.environ.get("PARAM_PACKAGE_VERSION"):
          return version.split("-", 1)[0]
      # importing self into setup.py is unorthodox, but param has no
      # required dependencies outside of python
      from param.version import Version
      return Version.setup_version(os.path.dirname(__file__),reponame,archive_commit="$Format:%h$")

- FC

[toc] | [prev] | [next] | [standalone]


#14883 — Re: python-param: FTBFS: TypeError: The only supported seed types are: None,

FromLouis-Philippe Véronneau <pollo@debian.org>
Date2023-02-03 18:20 +0100
SubjectRe: python-param: FTBFS: TypeError: The only supported seed types are: None,
Message-ID<FV7Tb-3bJl-1@gated-at.bofh.it>
In reply to#14881
On 2023-02-03 11 h 58, FC Stegerman wrote:
> Presumably there is a way to get the version from e.g.
> "dpkg-parsechangelog -S Version" (minus the -1 revision) instead.  I'm
> not sure how other packages handle this.

You can get those values via the variables provided by 
/usr/share/dpkg/pkg-info.mk

You can "source" those in your d/rules makefile by using:

include /usr/share/dpkg/pkg-info.mk

-- 
   ⢀⣴⠾⠻⢶⣦⠀
   ⣾⠁⢠⠒⠀⣿⡁  Louis-Philippe Véronneau
   ⢿⡄⠘⠷⠚⠋   pollo@debian.org / veronneau.org
   ⠈⠳⣄

[toc] | [prev] | [next] | [standalone]


#14884 — Re: python-param: FTBFS: TypeError: The only supported seed types are: None,

FromFC Stegerman <flx@obfusk.net>
Date2023-02-03 18:50 +0100
SubjectRe: python-param: FTBFS: TypeError: The only supported seed types are: None,
Message-ID<FV8md-3bSY-5@gated-at.bofh.it>
In reply to#14883
* Louis-Philippe Véronneau <pollo@debian.org> [2023-02-03 18:15]:
> On 2023-02-03 11 h 58, FC Stegerman wrote:
> > Presumably there is a way to get the version from e.g.
> > "dpkg-parsechangelog -S Version" (minus the -1 revision) instead.  I'm
> > not sure how other packages handle this.
> 
> You can get those values via the variables provided by
> /usr/share/dpkg/pkg-info.mk
> 
> You can "source" those in your d/rules makefile by using:
> 
> include /usr/share/dpkg/pkg-info.mk

Thanks!

Updating my previous suggestion based on this new information, it
becomes:

adding this to debian/rules

  include /usr/share/dpkg/pkg-info.mk

and patching setup.py to change

  def get_setup_version(reponame):
      """Use autover to get up to date version."""
      # importing self into setup.py is unorthodox, but param has no
      # required dependencies outside of python
      from param.version import Version
      return Version.setup_version(os.path.dirname(__file__),reponame,archive_commit="$Format:%h$")

to e.g.

  def get_setup_version(reponame):
      """Use autover to get up to date version."""
      if version := os.environ.get("DEB_VERSION_UPSTREAM"):
          return version
      # importing self into setup.py is unorthodox, but param has no
      # required dependencies outside of python
      from param.version import Version
      return Version.setup_version(os.path.dirname(__file__),reponame,archive_commit="$Format:%h$")

- FC

[toc] | [prev] | [next] | [standalone]


#14885 — Re: python-param: FTBFS: TypeError: The only supported seed types are: None,

FromDmitry Shachnev <mitya57@debian.org>
Date2023-02-03 22:40 +0100
SubjectRe: python-param: FTBFS: TypeError: The only supported seed types are: None,
Message-ID<FVbWN-3e2C-13@gated-at.bofh.it>
In reply to#14884

[Multipart message — attachments visible in raw view] — view raw

On Fri, Feb 03, 2023 at 06:45:56PM +0100, FC Stegerman wrote:
> Thanks!
>
> Updating my previous suggestion based on this new information, it
> becomes:
>
> adding this to debian/rules
>
>   include /usr/share/dpkg/pkg-info.mk

I think one more line is needed in debian/rules:

  export DEB_VERSION_UPSTREAM

> and patching setup.py to change
>
>   def get_setup_version(reponame):
>       """Use autover to get up to date version."""
>       # importing self into setup.py is unorthodox, but param has no
>       # required dependencies outside of python
>       from param.version import Version
>       return Version.setup_version(os.path.dirname(__file__),reponame,archive_commit="$Format:%h$")
>
> to e.g.
>
>   def get_setup_version(reponame):
>       """Use autover to get up to date version."""
>       if version := os.environ.get("DEB_VERSION_UPSTREAM"):
>           return version
>       # importing self into setup.py is unorthodox, but param has no
>       # required dependencies outside of python
>       from param.version import Version
>       return Version.setup_version(os.path.dirname(__file__),reponame,archive_commit="$Format:%h$")

--
Dmitry Shachnev

[toc] | [prev] | [next] | [standalone]


#14886 — Re: python-param: FTBFS: TypeError: The only supported seed types are: None,

FromFC Stegerman <flx@obfusk.net>
Date2023-02-03 23:20 +0100
SubjectRe: python-param: FTBFS: TypeError: The only supported seed types are: None,
Message-ID<FVczv-3evd-1@gated-at.bofh.it>
In reply to#14885
* Dmitry Shachnev <mitya57@debian.org> [2023-02-03 22:34]:
> I think one more line is needed in debian/rules:
> 
>   export DEB_VERSION_UPSTREAM

Indeed; thanks for pointing that out!

- FC

[toc] | [prev] | [standalone]


Back to top | Article view | linux.debian.maint.python


csiph-web