You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Fail to install the dev version following the install instructions #856
However, the command doesn't work and gives me the following error:
...
LookupError: setuptools-scm was unable to detect version for '/private/var/folders/mz/d3wtwjtx4fg8qlds5lgt1c240000gn/T/pip-req-build-85cqz2ok'.
Make sure you're either building from a fully intact git repository or PyPI tarballs. Most other sources (such as GitHub's tarballs, a git checkout without the .git folder) don't contain the necessary metadata and will not work.
For example, if you're using pip, instead of https://github.com/user/proj/archive/master.zip use git+https://github.com/user/proj.git#egg=proj
...
I'm not sure how to go about fixing this, but I assume we want this fixed before v0.3 release. Should we consider this a big enough issue to delay the release if it's not fixed in time? I'm not sure how much of an impact this will cause if it is not corrected.
Activity
weiji14 commentedon Feb 9, 2021
We might need to have setuptools_scm as an install only dependency. I remember reading about it somewhere but need to check.
seisman commentedon Feb 9, 2021
Does the error message mean that
doesn't work because it doesn't contain git information, thus setuptools_scm can't determine the version?
willschlitzer commentedon Feb 10, 2021
I'm not sure how to go about fixing this, but I assume we want this fixed before v0.3 release. Should we consider this a big enough issue to delay the release if it's not fixed in time? I'm not sure how much of an impact this will cause if it is not corrected.
seisman commentedon Feb 10, 2021
Yes to me.
As I understand it, the easiest fix is changing it to
or we can encourage users to clone the repository:
weiji14 commentedon Feb 11, 2021
Yeah, this one-liner seems to be the easiest, though it does require
gitto be installed I think?seisman commentedon Feb 11, 2021
Yes, it clones the whole git repository, so much slower.
Another workaround is setting the parameter
fallback_versionto something like0.0.0+untagged(https://github.com/pypa/setuptools_scm/#configuration-parameters).weiji14 commentedon Feb 11, 2021
Right. I just read the thread at pypa/pip#2432 (don't), and it seems that
pipdoesn't support shallow clones for philosophical reasons.This looks good. I suppose we could reset the fallback version every release (e.g. users will get 0.3.0+untagged, 0.4.0+untagged)?
Alternatively (or in addition), we could just make use of the TestPyPI uploads and let people do
pip install --pre --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple pygmt. Based on https://stackoverflow.com/questions/34514703/pip-install-from-pypi-works-but-from-testpypi-fails-cannot-find-requirements.seisman commentedon Feb 11, 2021
Sounds good to me.
It sounds a good addition to me.
I'm wondering if we want to use the
tabbeddirective in the sphinx-panels extension, to show different ways to install pygmt.weiji14 commentedon Feb 11, 2021
Ok, I'll start a PR for this.
A bit hesitant with adding another extension. Maybe if it's used in more than one or two places, then we can start thinking about using
sphinx-panels.seisman commentedon Feb 11, 2021
I agree.
seisman commentedon Feb 12, 2021
Although #865 can fix the issue, I'm afraid users may still use
to install PyGMT, because it was a common way to install dev codes.
Perhaps we should still set the parameter
fallback_version? To avoid updating the parameter in each release, maybe settingfallback_versiontounknown,0+unknown(default version returned by versioneer: https://github.com/python-versioneer/python-versioneer#debugging) , or0+untagged?weiji14 commentedon Feb 12, 2021
I can add the fallback version to PR #685 if that helps.
seisman commentedon Feb 12, 2021
Good. I prefer
0+unknown, although it makes little difference for most users.