Hi Mathias (2024.07.18_09:10:01_+0000)
> I have no clue why this is working for you.

I was testing locally, not in salsa CI. So I ran into the thing you ran
into after the build, not before it.

> I removed the patch, tried your proposal and the build just fails because
> setuptools-scm writes again a dev version to src/csb43/_version.py:

Yes, you need to add that to debian/clean. Sorry, I didn't mention that,
because it's the next step after getting the package to build.

> But SETUPTOOLS_SCM_PRETEND_VERSION like proposed by Thomas did the trick.
> https://salsa.debian.org/tryton-team/python-csb43/-/pipelines/703025
...
> May be pybuild doesn't handle correctly a version string like 0.10.0+dfsg-1?

Yeah, you shouldn't have to export that because pybuild does. But,
right, it's not removing +dfsg. Now that PEP-440 versions are strongly
enforced, that's no good.

Committed:
https://salsa.debian.org/python-team/tools/dh-python/-/commit/ae0facfd1216fd25185aa5f1db9f12b26e3dbcf1

Some more suggestions for your package:

You can use pybuild-plugin-pyproject. (just build-depend on it)

Something like this in debian/clean:
doc/build/
src/csb43.egg-info/
src/csb43/_version.py

And in debian/rules:
export PYBUILD_AFTER_BUILD=cd $(CURDIR); PYTHONPATH={build_dir} sphinx-build 
doc/source build/html
export PYBUILD_TEST_ARGS=$(CURDIR)/src/csb43/tests

Stefano

-- 
Stefano Rivera
  http://tumbleweed.org.za/
  +1 415 683 3272

Reply via email to