Hi,

Alexis Simon <alexis.si...@runbox.com> writes:

> Hi Polyedre,
>
> I think having python-setuptools-scm in your native-inputs should be
> enough for building with the right version number.
> At least it was enough for me when I encountered this issue before.

It is if you build from a PyPI archive, which has some metadata
available.  If you build from a git checkout, it expects to compute/find
the version from git, and won't be able to do so in Guix (.git is
stripped for reproducibility).  In this case, you must set
SETUPTOOLS_SCM_PRETEND_VERSION, e.g. as done in python-scanpy:

--8<---------------cut here---------------start------------->8---
           (add-after 'unpack 'pretend-version
             (lambda _
               (setenv "SETUPTOOLS_SCM_PRETEND_VERSION" #$version)))
--8<---------------cut here---------------end--------------->8---

See also the relevant issue/feature request https://issues.guix.gnu.org/54899 I 
had
reported a long time ago.

Hope that helps,

-- 
Thanks,
Maxim

Reply via email to