Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pip install fails with setuptools error #65

Open
iamdonovan opened this issue Mar 2, 2023 · 4 comments
Open

pip install fails with setuptools error #65

iamdonovan opened this issue Mar 2, 2023 · 4 comments

Comments

@iamdonovan
Copy link

rgitools fails to install using pip in environments with newer versions of setuptools, due to a conflict with PEP440:

image

I was able to fix this by changing changing line 86 from this:

FULLVERSION = rev.lstrip('v').replace(VERSION + '-', VERSION + '+')

to this:

FULLVERSION = rev.lstrip('v').replace(VERSION + '-', VERSION + '+').replace('-', '+', 1)

This fixes the version number error, and rgitools installs as expected:

image

@jhkennedy
Copy link

It looks like the setup.py has a bunch of logic to build version string from the git repo -- I'd suggest stripping that out entirely and instead using: https://github.com/pypa/setuptools_scm

setuptools_scm should provide all the features you'd need, and will comply with PEP440 as well. And, after an admittedly quick glance, that would let you move entirely to setup.cfg or pyproject.toml in line with setuptools best practices.

@fmaussion
Copy link
Contributor

Thanks all! Yeah this package is old - I'm not sure I'll continue to use it or simply move the useful scripts to https://github.com/GLIMS-RGI/rgi7_scripts

What did you need from it?

@iamdonovan
Copy link
Author

@fmaussion
Copy link
Contributor

@iamdonovan RGItools was an over-engineered attempt to generalize workflows, I think you would be much faster in grabbing the code you need here: https://github.com/GLIMS-RGI/rgitools/blob/master/rgitools/funcs.py#L194-L375

One thing I am unhappy about in the current version of the code is that we have a hardcoded buffer in which we search for intersects: https://github.com/GLIMS-RGI/rgitools/blob/master/rgitools/funcs.py#L242 . For RGI7 I wondered if we could work in projection space (intead of LatLon space) and use a threshold in meter instead...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants