Complete transition of setup and versioning from setup.py to pyproject.toml
Closed this issue · 0 comments
jeffjennings commented
See #36 (comment) :
`version.py` should be generated by `setuptools_scm` during the build process, so that file should be there by the time an import happens. But I think it's not configured correctly -- try adding:
[project]
dynamic = ["version"]
[tool.setuptools_scm]
version_file = "astropylibrarian/_version.py"
to the pyproject.toml
file. Then, the code in __init__.py
can be what @pllim suggested:
try:
from ._version import version as __version__
except ImportError:
__version__ = ""
Originally posted by @adrn in #36 (comment)