scikit-hep / hist

Histogramming for analysis powered by boost-histogram

Home Page:https://hist.readthedocs.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[BUG] ModuleNotFoundError: No module named 'hist.version'

yurivict opened this issue · comments

Traceback (most recent call last):
  File "/disk-samsung/freebsd-ports/misc/py-hist/x.py", line 1, in <module>
    from hist import Hist
  File "/usr/local/lib/python3.9/site-packages/hist/__init__.py", line 25, in <module>
    from .version import version as __version__
ModuleNotFoundError: No module named 'hist.version'

Is this from FreeBSD or pip? Maybe, if it’s a FreeBSD package, they forgot to generate the version.py with setuptools-scm.

This error is in the (pending) FreeBSD port misc/py-hist,
The file version.py exists:

$ cat ./work-py39/hist-2.6.1-31-g9d6543a/src/hist/version.py
__version__ = '2.6.1-31'

Ahh, is this the latest main (31 commits past 2.6.1)? I think we are accidentally missing the version.py file due to it being in the .gitignore. Edit: no, that's not it. Do you have any more info about the procedure? Note that it is listed in .gitignore but hatchling will pick it up because it's listed in the vcs plugin config.

There should be a version that can be used to make the version.py even in the git tarball now.