Skip to content

Commit 7887b62

Browse files
committed
Library dirs too
1 parent 128ae68 commit 7887b62

File tree

3 files changed

+15
-7
lines changed

3 files changed

+15
-7
lines changed

.github/workflows/test.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,6 @@ jobs:
3131
activate-environment: suitesparse-graphblas
3232
- name: Build
3333
run: |
34-
conda info
35-
conda config --show-sources
36-
conda config --show
37-
conda list
38-
conda env list
3934
python setup.py build_ext --inplace
4035
python setup.py develop
4136
- name: Test
@@ -47,3 +42,12 @@ jobs:
4742
run: |
4843
black *py suitesparse_graphblas --check --diff
4944
flake8 *py suitesparse_graphblas
45+
- name: Create headers check
46+
# These shouldn't change, so make copies to compare to
47+
cp suitesparse_graphblas/suitesparse_graphblas.h .
48+
cp suitesparse_graphblas/suitesparse_graphblas_no_complex.h .
49+
cp suitesparse_graphblas/source.h .
50+
python suitesparse_graphblas/create_headers.py
51+
diff suitesparse_graphblas/suitesparse_graphblas.h suitesparse_graphblas.h
52+
diff suitesparse_graphblas/suitesparse_graphblas_no_complex.h suitesparse_graphblas_no_complex.h
53+
diff suitesparse_graphblas/source.h source.h

setup.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
import sys
1414
import versioneer
1515

16+
is_win = sys.platform.startswith("win")
1617
define_macros = [("NPY_NO_DEPRECATED_API", "NPY_1_7_API_VERSION")]
1718

1819
if use_cython:
@@ -50,7 +51,7 @@
5051
long_description = f.read()
5152

5253
package_data = {"suitesparse_graphblas": ["*.pyx", "*.pxd", "*.c", "*.h"]}
53-
if sys.platform == "win32":
54+
if is_win:
5455
package_data["suitesparse_graphblas"].append("*.dll")
5556

5657
setup(

suitesparse_graphblas/build.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,17 @@
1111
source = f.read()
1212

1313
include_dirs = [os.path.join(sys.prefix, "include")]
14-
if sys.platform == "win32":
14+
library_dirs = [os.path.join(sys.prefix, "lib")]
15+
if is_win:
1516
include_dirs.append(os.path.join(sys.prefix, "Library", "include"))
17+
library_dirs.append(os.path.join(sys.prefix, "Library", "lib"))
1618

1719
ffibuilder.set_source(
1820
"suitesparse_graphblas._graphblas",
1921
source,
2022
libraries=["graphblas"],
2123
include_dirs=include_dirs,
24+
library_dirs=library_dirs,
2225
)
2326

2427
header = "suitesparse_graphblas.h"

0 commit comments

Comments
 (0)