Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

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

1 view
Skip to first unread message

Andreas Tille

unread,
Feb 3, 2023, 11:10:04 AM2/3/23
to
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

FC Stegerman

unread,
Feb 3, 2023, 12:00:07 PM2/3/23
to
* Andreas Tille <and...@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

FC Stegerman

unread,
Feb 3, 2023, 12:20:04 PM2/3/23
to
* FC Stegerman <f...@obfusk.net> [2023-02-03 17:58]:
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

FC Stegerman

unread,
Feb 3, 2023, 12:50:05 PM2/3/23
to
* Louis-Philippe Véronneau <po...@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

Dmitry Shachnev

unread,
Feb 3, 2023, 4:42:02 PM2/3/23
to
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
signature.asc

FC Stegerman

unread,
Feb 3, 2023, 5:20:04 PM2/3/23
to
* Dmitry Shachnev <mit...@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
0 new messages