Skip to content

Commit

Permalink
Rearranged code
Browse files Browse the repository at this point in the history
  • Loading branch information
radarhere committed Apr 10, 2023
1 parent d94239a commit fe4e52d
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -473,17 +473,15 @@ def build_extensions(self):
lib_root = include_root = root

if lib_root is not None:
if isinstance(lib_root, str):
_add_directory(library_dirs, lib_root)
else:
for lib_dir in lib_root:
_add_directory(library_dirs, lib_dir)
if not isinstance(lib_root, (tuple, list)):
lib_root = (lib_root,)
for lib_dir in lib_root:
_add_directory(library_dirs, lib_dir)
if include_root is not None:
if isinstance(include_root, str):
_add_directory(include_dirs, include_root)
else:
for include_dir in include_root:
_add_directory(include_dirs, include_dir)
if not isinstance(include_root, (tuple, list)):
include_root = (include_root,)
for include_dir in include_root:
_add_directory(include_dirs, include_dir)

# respect CFLAGS/CPPFLAGS/LDFLAGS
for k in ("CFLAGS", "CPPFLAGS", "LDFLAGS"):
Expand Down

0 comments on commit fe4e52d

Please sign in to comment.