the-siesta-group / edfio

Read and write EDF/EDF+ files.
Apache License 2.0
28 stars 4 forks source link

BUG: Installing from git source produces version 0.0.0 #43

Closed larsoner closed 6 months ago

larsoner commented 6 months ago

Typically pip install git+<whatever> should produce a reasonably versioned module, e.g., 0.5.0.dev<something> is what I'd expect for edfio given your current release is 0.4.0. But:

$ pip install git+https://github.com/the-siesta-group/edfio
Collecting git+https://github.com/the-siesta-group/edfio
...
Building wheels for collected packages: edfio
  Building wheel for edfio (pyproject.toml) ... done
  Created wheel for edfio: filename=edfio-0.0.0-py3-none-any.whl size=25459 sha256=bdd837f2488be161d9f3e83203b24e3cc956dbc2837a3b4c50d44e462f78743d
...
Installing collected packages: edfio
  Attempting uninstall: edfio
    Found existing installation: edfio 0.4.0
    Uninstalling edfio-0.4.0:
      Successfully uninstalled edfio-0.4.0
Successfully installed edfio-0.0.0

And indeed

$ python
>>> import edfio
>>> print(edfio.__version__)
0.0.0

Not sure what the proper fix is but in MNE-Python we have some magic involving .git_archival.txt. We currently use hatch-vcs but I think this also worked when using setuptools_scm. Not sure what the right fix is for poetry.

hofaflo commented 6 months ago

Thank you for bringing this up, I'll look into making it work with pip.