Closed tonigi closed 1 year ago
To fix this the following section should be added in setup.cfg
[metadata]
name = moleculekit
version = 1.1.1
As @duerrsimon's answer implied, I think the issue is that we use the old setup.py way of using setuptools. They moved now to toml
and cfg
files instead. The issues is that we determine the package version dynamically in the setup.py
try:
version = (
subprocess.check_output(["git", "describe", "--abbrev=0", "--tags"])
.strip()
.decode("utf-8")
)
except Exception as e:
print("Could not get version tag. Defaulting to version 0")
version = "0"
which is great for not bothering to update the version at every release but when you install it via pypi it will try to run setup.py, there are no tags defined (since it's not a git repo), default to version=0 and throw the error. I'll need to eventually take a look at the new setuptools methodology but pip installation of moleculekit is not officially supported anyway so I'm not in a big hurry.
Perhaps the version change can be done with bump2version and a post commit hook?
I don't like hooks because they need to be set up on every machine I develop on. But I don't believe it's necessary either with bump2version. The other issue why I have not bothered with it because I don't want to keep duplicate dependency lists. I currently use a single file which contains the deps to build both pypi and conda packages. I will probably have to do some refactoring there. But it's probably for the good since the current pipeline is a bit messy
Finally got around to fixing pip installation of moleculekit and updating the whole building pipeline. Versions >=1.4.6 should be fixed. Thanks for reporting this.
The current pip doesn't like the package's metadata:
results in
The explanation may be in the new dependency resolver. In fact, this workaround seems to work: