hobuinc / mgrs

Python MGRS library
https://pypi.python.org/pypi/mgrs
MIT License
111 stars 36 forks source link

the installer will only work on python 3.5 32 bit unless the following is fixed #16

Closed amizan8653 closed 4 years ago

amizan8653 commented 7 years ago

in core.py, line 21, you have the following: rt = ctypes.PyDLL('libmgrs.cp35-win32.pyd')

this failed on my python 3.6 32 bit. I ended up changing it to this to get it to work: rt = ctypes.PyDLL('libmgrs.cp36-win32.pyd')

The file itself is located in:

\Lib\site-packages\libmgrs.cp36-win32.pyd I figure there should be some code that generates the libmgrs pyd file name based on the version of python installed and if it's 32 bit vs 64 bit. I don't know how to do this, but I figured I'd post this here incase someone knows how to and is willing to do so.
nhatbui commented 7 years ago

Commenting because I'm responsible for hard-coding the .pyd name.

The setup/distutils package is responsible for compiling the DLL so I imagine that it's also naming it. This method stands out to me as a way to get a portable solution.