Skip to content

Commit 82491b9

Browse files
committed
i wish i knew how to use vms properly
1 parent e17a042 commit 82491b9

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

hatch_build.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,13 @@ def initialize(self, version: str, data: dict):
2626
ext = os.path.join(self.root, "ext")
2727
lib = os.path.join(ext, "./ext/lib")
2828

29-
compiler.add_library_dir(sysconfig.get_path("stdlib"))
30-
compiler.add_library_dir(sysconfig.get_path("platstdlib"))
29+
# logic taken from distutils
30+
if sysconfig.get_config_var('Py_ENABLE_SHARED'):
31+
if not sysconfig.is_python_build():
32+
compiler.add_library_dir(sysconfig.get_config_var('LIBDIR'))
33+
else:
34+
compiler.add_library_dir.append('.')
35+
3136
compiler.add_include_dir(sysconfig.get_path("include"))
3237
compiler.define_macro("PY_SSIZE_T_CLEAN")
3338

0 commit comments

Comments
 (0)