I've been struggling for a day to figure out why in some cases, a custom setup.py with a call to setup(use_scm_version...), the custom version function I have is called, and others, it's ignored. I'm sure it'll be obvious, but I'm stumped.
If I run python -m setuptools_scm, it looks like setup.py is never even loaded, so I've only been able to get it to work from an installer (I'm using uv, but pip seems to have the same behavior). Unfortunately, the installer creates an ephemeral isolated virtual environment, so I can't tweak the code in either setuptools or setuptools_scm to help debug.
It works in my primary development environment on my laptop, as well as in a freshly cloned repo on the same machine, even in a different shell. I also created a fresh repo with just the bare minimum of things in it for the installer to run, and it works there as well. Presumably this means there's something installed on this machine that's making it work.
It works in GitLab CI, in a job using nikolaik/python-nodejs:python3.10-nodejs20-bullseye as the image (Debian based), as well in this image in a container on my laptop (the container is x86_64, the laptop is apple silicon).
It fails in GitLab CI, in a job using ubuntu:22.04, as well as a VM of my own running the same.
I've tried to eliminate all the variables between different experiments, so I'm reasonably confident that the difference lies in what's installed on the machine, but that's pretty big and I don't know where to start to narrow that down.
Can anyone suggest what my next step should be?
I've been struggling for a day to figure out why in some cases, a custom
setup.pywith a call tosetup(use_scm_version...), the custom version function I have is called, and others, it's ignored. I'm sure it'll be obvious, but I'm stumped.If I run
python -m setuptools_scm, it looks likesetup.pyis never even loaded, so I've only been able to get it to work from an installer (I'm usinguv, butpipseems to have the same behavior). Unfortunately, the installer creates an ephemeral isolated virtual environment, so I can't tweak the code in eithersetuptoolsorsetuptools_scmto help debug.It works in my primary development environment on my laptop, as well as in a freshly cloned repo on the same machine, even in a different shell. I also created a fresh repo with just the bare minimum of things in it for the installer to run, and it works there as well. Presumably this means there's something installed on this machine that's making it work.
It works in GitLab CI, in a job using
nikolaik/python-nodejs:python3.10-nodejs20-bullseyeas the image (Debian based), as well in this image in a container on my laptop (the container is x86_64, the laptop is apple silicon).It fails in GitLab CI, in a job using
ubuntu:22.04, as well as a VM of my own running the same.I've tried to eliminate all the variables between different experiments, so I'm reasonably confident that the difference lies in what's installed on the machine, but that's pretty big and I don't know where to start to narrow that down.
Can anyone suggest what my next step should be?