Closed segasai closed 3 years ago
Done, thanks for the suggestion. Close this if the new tagged release solves the issue?
I think it's not yet solved, because I thinkn now the latest commit has two tags, and setuptools_scm somehow still picks up the the May13_2020 one...
(pyenv3) koposov@fortune:/tmp$ git clone git@github.com:keflavich/imf.git
Cloning into 'imf'...
cd imfX11 forwarding request failed on channel 0
remote: Enumerating objects: 4, done.
remote: Counting objects: 100% (4/4), done.
remote: Compressing objects: 100% (4/4), done.
remote: Total 676 (delta 0), reused 1 (delta 0), pack-reused 672
Receiving objects: 100% (676/676), 2.59 MiB | 1.51 MiB/s, done.
Resolving deltas: 100% (419/419), done.
(pyenv3) koposov@fortune:/tmp$ cd imf
(pyenv3) koposov@fortune:/tmp/imf$ python setup.py build
/home/koposov/pyenv3/lib/python3.6/site-packages/setuptools_scm/version.py:88: UserWarning: tag 'May13_2020' no version found
warnings.warn("tag {!r} no version found".format(tag))
Traceback (most recent call last):
File "setup.py", line 78, in <module>
'write_to_template': VERSION_TEMPLATE})
File "/home/koposov/pyenv3/lib/python3.6/site-packages/setuptools/__init__.py", line 153, in setup
return distutils.core.setup(**attrs)
File "/usr/lib/python3.6/distutils/core.py", line 108, in setup
_setup_distribution = dist = klass(attrs)
File "/home/koposov/pyenv3/lib/python3.6/site-packages/setuptools/dist.py", line 424, in __init__
k: v for k, v in attrs.items()
File "/usr/lib/python3.6/distutils/dist.py", line 281, in __init__
self.finalize_options()
File "/home/koposov/pyenv3/lib/python3.6/site-packages/setuptools/dist.py", line 695, in finalize_options
ep(self)
File "/home/koposov/pyenv3/lib/python3.6/site-packages/setuptools/dist.py", line 702, in _finalize_setup_keywords
ep.load()(self, ep.name, value)
File "/home/koposov/pyenv3/lib/python3.6/site-packages/setuptools_scm/integration.py", line 26, in version_keyword
dist.metadata.version = _get_version(config)
File "/home/koposov/pyenv3/lib/python3.6/site-packages/setuptools_scm/__init__.py", line 173, in _get_version
parsed_version = _do_parse(config)
File "/home/koposov/pyenv3/lib/python3.6/site-packages/setuptools_scm/__init__.py", line 127, in _do_parse
version = _version_from_entrypoints(config) or _version_from_entrypoints(
File "/home/koposov/pyenv3/lib/python3.6/site-packages/setuptools_scm/__init__.py", line 65, in _version_from_entrypoints
version = _call_entrypoint_fn(root, config, ep.load())
File "/home/koposov/pyenv3/lib/python3.6/site-packages/setuptools_scm/__init__.py", line 46, in _call_entrypoint_fn
return fn(root, config=config)
File "/home/koposov/pyenv3/lib/python3.6/site-packages/setuptools_scm/git.py", line 139, in parse
branch=branch,
File "/home/koposov/pyenv3/lib/python3.6/site-packages/setuptools_scm/version.py", line 212, in meta
assert parsed_version is not None, "Can't parse version %s" % tag
AssertionError: Can't parse version May13_2020
(pyenv3) koposov@fortune:/tmp/imf$ git tag
2021.02.04
May13_2020
(pyenv3) koposov@fortune:/tmp/imf$ git tag 2021.02.05
(pyenv3) koposov@fortune:/tmp/imf$ python setup.py build
running build
running build_py
creating build
creating build/lib
creating build/lib/imf
copying imf/plf.py -> build/lib/imf
copying imf/version.py -> build/lib/imf
copying imf/cmf.py -> build/lib/imf
copying imf/distributions.py -> build/lib/imf
copying imf/imf.py -> build/lib/imf
copying imf/pmf.py -> build/lib/imf
copying imf/__init__.py -> build/lib/imf
creating build/lib/imf/tests
copying imf/tests/test_imf.py -> build/lib/imf/tests
copying imf/tests/test_distributions.py -> build/lib/imf/tests
copying imf/tests/__init__.py -> build/lib/imf/tests
creating build/lib/imf/data
copying imf/data/EEM_dwarf_UBVIJHK_colors_Teff.txt -> build/lib/imf/data
copying imf/data/pecaut2013_table_with_lyclum.txt -> build/lib/imf/data
(pyenv3) koposov@fortune:/tmp/imf$ git tag
2021.02.04
2021.02.05
May13_2020
When I tagged it locally, it didn't happen. So I think putting a new commit and then tagging it should work.
The 2021.02.04 tag points to a81986c847ca04c2d455e81987e74a427e2ec6c5, while May13_2020 points to 0986a41676d40b1e2e1dee4c35efd1b983687772, so it can't be that they're pointing at the same commit.
I think this is because you tagged the commit that is not in the master branch. I.e. if you go here https://github.com/keflavich/imf/commit/a81986c847ca04c2d455e81987e74a427e2ec6c5 It says: "This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository."
🤦 looks like I did git push --tags
but never did git push
. Try now?
Yep, it works now. Thanks!
Hi,
The current version tag breaks pip installs. Now pip enforces https://www.python.org/dev/peps/pep-0440/. Therefore when trying to install (in the cofiguration with recent pip) you get an error:
The easiest solution IMO is to tag a new version 2021.02.04 or something like that that satisfies PEP reqs.