Skip to content

Commit 41872fc

Browse files
committed
Revert prints
1 parent e5ccb16 commit 41872fc

File tree

2 files changed

+3
-54
lines changed

2 files changed

+3
-54
lines changed

.github/workflows/wheels.yml

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -160,21 +160,12 @@ jobs:
160160
CIBW_ENVIRONMENT_PASS_LINUX: SUITESPARSE_FAST_BUILD SUITESPARSE_FASTEST_BUILD
161161

162162
# CMAKE_GNUtoMS=ON asks suitesparse.sh to build libraries in MSVC style on Windows.
163-
CIBW_ENVIRONMENT_WINDOWS: GRAPHBLAS_PREFIX="C:/GraphBLAS" CMAKE_GNUtoMS=ON
163+
CIBW_ENVIRONMENT_WINDOWS: CMAKE_GNUtoMS=ON GRAPHBLAS_PREFIX="C:/GraphBLAS"
164164

165165
# macOS libomp requires special configs. BREW_LIBOMP=1 asks suitesparse.sh to include them.
166166
# SUITESPARSE_MACOS_ARCH asks to build a particular architecture. Either x86 or arm64.
167167
CIBW_ENVIRONMENT_MACOS: BREW_LIBOMP="1" SUITESPARSE_MACOS_ARCH=${{ matrix.cibw_archs }}
168168

169-
# CIBW_ENVIRONMENT_LINUX: GRAPHBLAS_PREFIX="graphblas"
170-
171-
#### TEST: GRAPHBLAS_PREFIX="{package}"
172-
# CIBW_REPAIR_WHEEL_COMMAND_MACOS: >
173-
# pwd &&
174-
# ls -lh &&
175-
# find . -type d &&
176-
# delocate-wheel --require-archs {delocate_archs} -w {dest_dir} -v {wheel}
177-
178169
# Uncomment to only build CPython wheels
179170
# CIBW_BUILD: "cp*"
180171

build_graphblas_cffi.py

Lines changed: 2 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -5,33 +5,6 @@
55
from cffi import FFI
66
from setuptools import Extension
77

8-
###### TEST
9-
from pathlib import Path
10-
11-
# prefix components:
12-
space = ' '
13-
branch = '│ '
14-
# pointers:
15-
tee = '├── '
16-
last = '└── '
17-
18-
19-
def tree(dir_path: Path, prefix: str=''):
20-
"""A recursive generator, given a directory Path object
21-
will yield a visual tree structure line by line
22-
with each line prefixed by the same characters
23-
"""
24-
contents = list(dir_path.iterdir())
25-
# contents each get pointers that are ├── with a final └── :
26-
pointers = [tee] * (len(contents) - 1) + [last]
27-
for pointer, path in zip(pointers, contents):
28-
yield prefix + pointer + path.name
29-
if path.is_dir(): # extend the prefix and recurse:
30-
extension = branch if pointer == tee else space
31-
# i.e. space because last, └── , above so no more |
32-
yield from tree(path, prefix=prefix+extension)
33-
#####
34-
358
is_win = sys.platform.startswith("win")
369
ss_g = Path(__file__).parent / "suitesparse_graphblas"
3710

@@ -41,27 +14,12 @@ def tree(dir_path: Path, prefix: str=''):
4114
# Expected subdirectories: include/ (contains GraphBLAS.h), lib/, and bin/ (on Windows only)
4215
# Otherwise fallback to default system folders.
4316
graphblas_root = os.environ.get("GraphBLAS_ROOT", None)
44-
if not graphblas_root:
45-
graphblas_root = os.environ.get("GRAPHBLAS_PREFIX", None)
46-
47-
# if not graphblas_root:
48-
# graphblas_root = Path(__file__).parent
49-
#
50-
# if "{package}" in graphblas_root:
51-
# graphblas_root = graphblas_root.replace("{package}", str(Path(__file__).parent))
5217

5318
if not graphblas_root:
5419
# Windows wheels.yml configures suitesparse.sh to install GraphBLAS to "C:\\GraphBLAS".
5520
graphblas_root = "C:\\GraphBLAS" if is_win else "/usr/local"
5621

57-
include_dirs = [os.path.join(graphblas_root, "include")]
58-
#### TEST
59-
# for i, line in enumerate(tree(Path(graphblas_root))):
60-
# print(line)
61-
# if i > 30:
62-
# break
63-
#### TEST
64-
include_dirs.append(os.path.join(graphblas_root, "include", "suitesparse"))
22+
include_dirs = [os.path.join(graphblas_root, "include"), os.path.join(graphblas_root, "include", "suitesparse")]
6523
library_dirs = [os.path.join(graphblas_root, "lib"), os.path.join(graphblas_root, "lib64")]
6624
if is_win:
6725
include_dirs.append(os.path.join(sys.prefix, "Library", "include"))
@@ -113,7 +71,7 @@ def get_extension(apply_msvc_patch: bool = None, extra_compile_args=()):
11371
msvc_code = msvc_code.replace("double _Complex", "_Dcomplex")
11472
code_path.write_text(msvc_code)
11573

116-
# tell GraphBLAS.h that we need MSVC-style complex values
74+
# Hack: tell GraphBLAS.h that we need MSVC-style complex values
11775
extra_compile_args = list(extra_compile_args) + ["-DGxB_HAVE_COMPLEX_MSVC"]
11876

11977
return Extension(

0 commit comments

Comments
 (0)