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

Let get_clib_path find the path to libgmt on Windows #285

Merged
merged 6 commits into from
Jan 26, 2019

Conversation

seisman
Copy link
Member

@seisman seisman commented Jan 25, 2019

Description of proposed changes
The name of the shared library is gmt_w64.dll for 64-bit Windows, and gmt_w32.dll for 32-bit Windows, and the library is located in C:\programs\gmt6\bin by default. This PR changes get_clib_path so that it can return the correct library name for Windows.

I've tried to install pygmt on Windows and run the test. The GMT6 binary is the one provided by Joaquim.

The tests give 19 failures. Most of the failures are due to different image size, which may be caused by slightly different ghostscript (the version I use is 9.22). Other failures seems related to the slightly different behaviors of Python packages for different system, and permission issues. See the attached log for details. pytest.log

Although currently we don't have CI tests on Windows, I think we can at least merge this PR into master, so that Windows users can have a try and help us find bugs on Windows.

Working towards #46

Reminders

  • Run make format and make check to make sure the code follows the style guide.
  • Add tests for new features or tests that would have caught the bug that you're fixing.
  • Add new public functions/methods/classes to doc/api/index.rst.
  • Write detailed docstrings for all functions/methods.
  • If adding new functionality, add an example to docstrings or tutorials.

Copy link
Member

@leouieda leouieda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@seisman thanks for reporting these! We can merge these changes in and work towards fixing those issues in other PRs until we can get Windows working.

pygmt/clib/loading.py Show resolved Hide resolved
pygmt/tests/test_clib.py Outdated Show resolved Hide resolved
pygmt/tests/test_clib.py Outdated Show resolved Hide resolved
@leouieda leouieda changed the title WIP: Let get_clib_path find the path to the gmt shared library on Windows Let get_clib_path find the path to libgmt on Windows Jan 26, 2019
@leouieda leouieda merged commit 7004aa0 into master Jan 26, 2019
@leouieda leouieda deleted the support-windows branch January 26, 2019 16:29
@seisman seisman mentioned this pull request Jun 21, 2019
5 tasks
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.

2 participants