Path: csiph.com!1.us.feeder.erje.net!3.us.feeder.erje.net!2.eu.feeder.erje.net!feeder.erje.net!newsreader4.netcologne.de!news.netcologne.de!fu-berlin.de!bofh.it!news.nic.it!robomod From: FC Stegerman Newsgroups: linux.debian.maint.python,linux.debian.bugs.dist Subject: Re: python-param: FTBFS: TypeError: The only supported seed types are: None, Date: Fri, 03 Feb 2023 18:20:01 +0100 Message-ID: References: X-Original-To: debian-python@lists.debian.org, 1026514@bugs.debian.org X-Mailbox-Line: From debian-python-request@lists.debian.org Fri Feb 3 17:16:33 2023 Old-Return-Path: X-Amavis-Spam-Status: No, score=-6.98 tagged_above=-10000 required=5.3 tests=[BAYES_00=-2, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, LDO_WHITELIST=-5, MURPHY_DRUGS_REL8=0.02] autolearn=ham autolearn_force=no X-Policyd-Weight: using cached result; rate:hard: -4.6 Authentication-Results: ext-mx-out001.mykolab.com (amavisd-new); dkim=pass (4096-bit key) reason="pass (just generated, assumed good)" header.d=kolabnow.com Mail-Followup-To: FC Stegerman , debian-python@lists.debian.org, 1026514@bugs.debian.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Mailing-List: archive/latest/20769 List-ID: List-URL: List-Archive: https://lists.debian.org/msgid-search/Y91BVKynppdfPbEY@nihonium Approved: robomod@news.nic.it Lines: 46 Organization: linux.* mail to news gateway Sender: robomod@news.nic.it X-Original-Date: Fri, 3 Feb 2023 18:16:04 +0100 X-Original-Message-ID: X-Original-References: Xref: csiph.com linux.debian.maint.python:14882 linux.debian.bugs.dist:1136146 * FC Stegerman [2023-02-03 17:58]: > * Andreas Tille [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