roelderickx/ogr2osm

installation via pypi does not install requirements automatically

Closed this issue · 2 comments

Hello,

I just created a new python environment and installed ogr2osm via "pip3 install ogr2osm". The installation was successful but pip did not mention any installation of the requirements. I tried to convert a file and got the "ModuleNotFoundError: No module named 'lxml'". I think there are issues with the automatic installation of the requirements via PyPi. I did install GDAL manually before I installed ogr2osm, so there is probably another ModuleNotFoundError I just did not encounter on my setup.

I did a little research and it seems the setup.py needs to be modified like this:

setuptools.setup( ... install_requires=['lxml>=4.3.0', 'GDAL>=3.0.0'], ... )

more information on this topic can be found here.

I think it's better for the user if "install_requires" is used here.

Greetings

Thanks for your report 🙂

It's indeed a good idea to include this in the setup script, but allow me some time to test the modified package on an empty docker image.

However, it came to my attention there is currently no support for lxml on the apple M1 cpu. For now nobody complained and eventually M1 will be supported, but I may have to reinstate pnorman's fallback to ElementTree for apple users. In that case lxml would become strongly recommended in stead of required, I am not sure if this can be achieved with the install_requires parameter.

Fixed in version 1.1.1