Closed tonykgill closed 2 months ago
Updating both pip and setuptools seems to have solved my crisis.
Just a further note. The error is caused by an older version of setuptools. However, pyproject.toml specifies that it requires a newer version, but older versions of pip don't know enough to honour this. So, the key here is to upgrade pip, and this then installs its own newer version of setuptools in the venv it uses to do the build.
There is a note at the top of pyproject.toml explaining that it needs at least version 23 of pip, but there is no way to enforce this.
Just wondering what behaviour you observe when you
pip install
the package, from version 2.0.1 onwards.The issue for me is that package version number isn't recognised when running 'pip install'. Example:
I see that the version is defined dynamically in pyproject.toml, referring to the rios.version attribute. Reading this documentation I would expect this to work.
I upgraded to setuptools 70.1.1 (latest), thinking my distro's version (59.x.y) might have been the problem. But, no, I get the same behaviour.
Just wondering if you are also observing the same behaviour?
If so, perhaps a workaround is to store the version number in a file called
rios/VERSION
. It has one line with the version number.Then modify pyproject.toml:
And update rios/init.py: