Skip to content

Commit

Permalink
Patch libsaw.py to add find_library
Browse files Browse the repository at this point in the history
This appears to be needed for Windows
  • Loading branch information
xylar committed Feb 14, 2020
1 parent 6b1825f commit b8d1bc4
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
33 changes: 33 additions & 0 deletions recipes/jigsawpy/0001-add-find-library.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
From e0176c73d9e4cb5ead10c075123bc54385ebd148 Mon Sep 17 00:00:00 2001
From: Xylar Asay-Davis <xylarstorm@gmail.com>
Date: Fri, 14 Feb 2020 14:06:19 -0700
Subject: [PATCH] Add call to find_library for Windows

This seems to be necessary, at least for conda-forge CI.
---
jigsawpy/libsaw.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/jigsawpy/libsaw.py b/jigsawpy/libsaw.py
index 278ee7c..94b80ae 100644
--- a/jigsawpy/libsaw.py
+++ b/jigsawpy/libsaw.py
@@ -1,5 +1,6 @@

import ctypes as ct
+import ctypes.util
import numpy as np
import inspect
import platform
@@ -61,7 +62,7 @@ if (JLIBNAME == Path()):
if (JLIBNAME == Path()):
#---------------------------- search machine path for binary
if (platform.system() == WIN):
- JLIBNAME = Path("jigsaw.dll")
+ JLIBNAME = ctypes.util.find_library("jigsaw.dll")

elif (platform.system() == LNX):
JLIBNAME = Path("libjigsaw.so")
--
2.23.0

2 changes: 2 additions & 0 deletions recipes/jigsawpy/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ package:
source:
url: https://github.com/dengwirda/jigsaw-python/archive/v{{ version }}.tar.gz
sha256: 36901576cee361d8ee0d2977e9022626b37801f47aebd234f8a008c74557e711
patches:
- 0001-add-find-library.patch

build:
noarch: python
Expand Down

0 comments on commit b8d1bc4

Please sign in to comment.