tkrajina / srtm.py

Geo elevation data parser for "The Shuttle Radar Topography Mission" data
Apache License 2.0
245 stars 57 forks source link

Add python 3 support #44

Closed jgliss closed 4 years ago

jgliss commented 5 years ago

Hi,

thank you for developing srtm.py. I find it very useful and I am using it in one of my packages geonum, which I intend to make available soon via conda using conda-forge. Problem here is that the current setup.py file of srtm.py supports only Python 2.x (but the code itself runs without problems on Python 3 for me). The currently available recipe at:

https://anaconda.org/conda-forge/srtm.py

seems to be based on the PyPi release 0.3.4:

https://pypi.org/project/SRTM.py/

which states in setup.py that only Python 2 is supported. This leads to a conflict when installing the package into a Python 3 environment using conda. That means, that I cannot setup my recipe for geonum on conda-forge at the moment. I used and tested the current version 0.3.4 with Python 3 and it seems to work fine (at least for my use cases).

I think, if you just add Python 3 support under classifiers in your setup.py and draft a new release on PyPi and conda-forge, I could easily build on that for geonum. I would appreciate that very much. If you like, I can also do this and send you a PR. Please let me know in the latter case.

Cheers, Jonas

jgliss commented 5 years ago

Short comment to correct myself: I just saw that the current version that is available via conda-forge is 0.3.1 rather than 0.3.4 (PyPi).

Please let me know if you plan to update the conda installation via conda-forge soon (including Python 3 support), or if I can help in anything.

Thanks again! Jonas

jgliss commented 5 years ago

@tkrajina, just wanted to follow up on this. Are you planning to release srtm.py with python 3 support on PyPi, or even conda-forge?

tkrajina commented 5 years ago

Yes, I plan to not only add python 3 support, but to completely drop the python 2 support (it's about time to do so). But, I can't promise when.

As for conda, I'm not the maintainer of the conda srtm.py package, only the pypi one.

jgliss commented 5 years ago

Great, thanks! I think it is actually not too much work, since it already seems to work without problems in python 3. I think the only thing is to specify python 3 support in setup.py and publish on pypi. I could do that and test and send you an PR, if you don't have time for it. Should I do that?

Cheers, Jonas

tkrajina commented 5 years ago

Oh, yes, that would be a help. Just go ahead, and thanks!

jgliss commented 5 years ago

Any specific branch that you want me to base my work upon? If not, I use master.

jgliss commented 5 years ago

Seems like this issue has been resolved by itself due to recent update of conda-forge package. Managed to successfully install srtm.py via conda-forge package both on Windows 10 and Ubuntu OS in Python 3.7 without any problems, via:

 conda install -c conda-forge srtm.py 

I will close this issue.

tkrajina commented 5 years ago

Well, I'll keep this issue opened because it's fixed for you. But Python 3 is still a "to do" for me (or for somebody else who wants to do it) :)