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

Windows support #25

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Windows support #25

wants to merge 4 commits into from

Conversation

AeroXuk
Copy link

@AeroXuk AeroXuk commented Nov 25, 2017

Added conditional library name selection as required for Windows compilation. Removed -Wno-unused-function which causes errors with msvc compiler.

@AeroXuk
Copy link
Author

AeroXuk commented Nov 25, 2017

Amended setup.py to pull all windows dependencies from a build path local libpostal directory that needs to contain: libpostal.h, libpostal.lib & libpostal.dll.

On Windows, this could be automated by pulling down the AppVeyor build and extracting into a libpostal directory.

@albarrentine
Copy link
Contributor

Hey @AeroXuk, I've added the project to AppVeyor and merged in the latest from master. Any chance you can add an appveyor.yml? Here's travis.yml for reference.

@luisdelatorre012
Copy link

Sorry to ask a stupid question, but at this point there is still no way to install pypostal on Windows, right? I'm assuming that either from the master branch of this repo, or with https://github.com/AeroXuk/pypostal it's not possible. (I hope you don't take this as impatience or demand. I just want to make sure that I'm not missing something and this is still not possible.)

@albarrentine
Copy link
Contributor

Hi @luisdelatorre012, haven't heard of anyone getting this to work on Windows yet. I'd like to get this PR tested on AppVeyor and then it should be ready to merge, but essentially it requires both the changes from https://github.com/AeroXuk/pypostal and the changes from the master branch.

@jocelynjyl
Copy link

jocelynjyl commented Aug 10, 2018

I did get this PR working on a Win10 machine with Python 3.5/3.6 but with some difficulty.

I was having some issues installing libpostal (the data download wouldn't work for me 9 times out of 10 and I'm still not sure why) until I finally was able to get a successful make / make install. I also followed the instructions regarding using lib.exe to compile the .lib and .dll files.

Then, I git cloned the PR and used the developer command prompt for VS 2017. I had to change the dirs in setup.py to point to my local libpostal dir before running python setup.py install. However, I was getting frequent linker errors (LNK2001 followed by LNK1120). For some reason the .def file was missing some of the required declarations so once I manually added them in and regenerated the .lib files it started working.

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

Successfully merging this pull request may close these issues.

4 participants