python-rasterstats
python-rasterstats copied to clipboard
missing `click` dependency
Hi,
this is more a proposal than a bug report.
Since python-rasterstats directly imports click:
https://github.com/perrygeo/python-rasterstats/blob/5da3110230df44e228ba21f16a9d31ab7e84e0d5/src/rasterstats/cli.py#L6
and since there's a known issue with click<7.1 (#254) , adding a click>=7.1 in requirements.txt would be great.
The following is a real case scenario in which it would come in handy:
on a centos8/rocky8 server:
$ python3 -mvenv --system-site-packages env
$ env/bin/pip install rasterstats
# ... various logs ...
$ env/bin/python -c "import rasterstats"
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/autofs/nfshomes/dbranchini/buttami/env/lib64/python3.6/site-packages/rasterstats/__init__.py", line 4, in <module>
from rasterstats import cli
File "/autofs/nfshomes/dbranchini/buttami/env/lib64/python3.6/site-packages/rasterstats/cli.py", line 28, in <module>
@cligj.use_rs_opt
File "/usr/lib/python3.6/site-packages/click/decorators.py", line 170, in decorator
_param_memo(f, OptionClass(param_decls, **attrs))
File "/usr/lib/python3.6/site-packages/click/core.py", line 1510, in __init__
raise TypeError('Got secondary option for non boolean flag.')
TypeError: Got secondary option for non boolean flag.
(then after some googling I saw #254 and forced the update of click)
I fixed this with pip install -U click
I also did the following, but you may not need it.
pip install -U requests cookiecutter
I had the same problem
pip install click fixed it for me as well
I can't reproduce this but, given we directly import click, it makes sense to include it as a dependency