Skip to content

Commit

Permalink
i really should make a new branch shouldnt i
Browse files Browse the repository at this point in the history
  • Loading branch information
ZeroIntensity committed Jan 15, 2023
1 parent 9019833 commit 5806cc8
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions hatch_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def initialize(self, version: str, data: dict):

libpython_path = find_libpython()
if not libpython_path:
self.app.abort("failed to find libpython")
self.app.display_warning("failed to find libpython")

compiler.add_library_dir(str(Path(libpython_path).parent.absolute()))

Expand All @@ -55,7 +55,7 @@ def initialize(self, version: str, data: dict):
compiler.compile(
glob("./src/mod.c"),
output_dir=ext,
extra_preargs=["-fPIC", "-v"]
extra_preargs=["-fPIC", "-v"] if os.name != "nt" else [],
)
except Exception:
self.app.abort("failed to compile _pointers")
Expand All @@ -71,7 +71,12 @@ def initialize(self, version: str, data: dict):
files.append(os.path.join(root, i))

try:
compiler.link_shared_lib(files, "_pointers", output_dir=lib)
compiler.link_shared_lib(
files,
"_pointers",
output_dir=lib,
debug=True
)
except Exception:
self.app.abort("failed to link _pointers")

Expand Down

0 comments on commit 5806cc8

Please sign in to comment.