Re: pybuild and setuptools_scm
* Stefano Rivera: " Re: pybuild and setuptools_scm" (Thu, 11 Jul 2024 23:01:14
+0000):
Hi Stefano,
> > I have been struggling to get some software packaged that relies on
> > setuptools_scm. It seems to effectively ignore the package data section in
> > a pyproject.toml file and to include a broader collection of files when
> > being
>
> Which source package is this?
> Where did the source come from? Git or PyPI tarball?
>
> 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.
I had a similar problem when setuptools_scm kicked in during the build process
and produced versions different from the orig tarball. Packaging is in git and
tarballs are imported from PyPI.
I disabled the automatic versioning with
https://salsa.debian.org/tryton-team/python-csb43/-/commit/e8788e09818948231a48cc1472a5f54444b65fcc
Could you confirm this is the right approach or is there a more elegant way?
Thanks,
Mathias
--
Mathias Behrle
PGP/GnuPG key availabable from any keyserver, ID: 0xD6D09BE48405BBF6
AC29 7E5C 46B9 D0B6 1C71 7681 D6D0 9BE4 8405 BBF6
Reply to: