Re: pybuild and setuptools_scm
On Friday, 12 July 2024 01:01:14 CEST Stefano Rivera wrote:
>
> Which source package is this?
This is the source for MoinMoin 2.0 which is currently unpackaged in Debian.
> Where did the source come from? Git or PyPI tarball?
It is actually an archive from the GitHub release page, integrated into my
packaging repository using the gbp import-orig command, although I have
previously tried the Git packaging approach using an upstream branch.
The weird thing is that I can run "python3 -m build", even with the options
that pybuild introduces, outside the gbp buildpackage environment, and it
seems that the package data is obtained using setuptools_scm. But as part of
the gbp invocation, the package data is limited to that mentioned in the
deficient pyproject.toml file.
> setuptools_scm gets stuff from SCM and uses it for metadata. During the
> package build, the SCM isn't available (no .git directory in the source
> package). So, it falls back to alternate modes:
> 1. The version gets put in an environment variable by pybuild.
> 2. The list of known files comes from the SOURCES.txt in egg-info. If
> you are using the upstream git for your source, you may be missing
> this. Try switching to a PyPI sdist.
This is very helpful to know! I had noticed that the egg-info metadata from
the PyPI source distribution might have been able to help the process along,
but I didn't know the mechanism through which that might occur. At one point,
the Debian tools were objecting to superfluous files that might have included
the egg-info metadata, but I imagine that if it is imported in the right way,
the tools are able to take advantage of it correctly.
Having tried to build once again, importing the PyPI sources instead, I see
that the missing files are now included in the package, so this is encouraging
progress.
Many thanks for the guidance!
Paul
Reply to: