File tree Expand file tree Collapse file tree 2 files changed +17
-5
lines changed
Expand file tree Collapse file tree 2 files changed +17
-5
lines changed Original file line number Diff line number Diff line change @@ -62,10 +62,8 @@ CXXFLAGS = $(BASE_CXXFLAGS) $($(COMPILER)_FLAGS)
6262
6363# https://github.com/quantopian/libpy/pull/86/files#r309288697
6464INCLUDE_DIRS := include/ \
65- $(shell $(PYTHON ) -c "from distutils import sysconfig; \
66- print(sysconfig.get_config_var('INCLUDEPY') )") \
67- $(shell $(PYTHON ) -c "from distutils import sysconfig; \
68- print(sysconfig.get_config_var('INCLUDEDIR') )") \
65+ $(shell $(PYTHON ) -c "import sysconfig; \
66+ print(sysconfig.get_config_var('INCLDIRSTOMAKE') )") \
6967 $(shell $(PYTHON ) -c 'import numpy as np;print(np.get_include() )') \
7068 $(EXTRA_INCLUDE_DIRS )
7169INCLUDE := $(foreach d,$(INCLUDE_DIRS ) , -I$d)
9290 CXXFLAGS += -fstack-protector-strong
9391 SONAME_FLAG := soname
9492 SONAME_PATH := $(SONAME)
95- LDFLAGS += $(shell $(PYTHON)-config --ldflags )
93+ LDFLAGS += $(shell $(PYTHON) etc/ld_flags.py )
9694 LDFLAGS += -lstdc++fs
9795 LD_PRELOAD_VAR := LD_PRELOAD
9896endif
Original file line number Diff line number Diff line change 1+ # via https://github.com/python/cpython/blob/deb016224cc506503fb05e821a60158c83918ed4/Misc/python-config.in#L50 # noqa
2+
3+ import sysconfig
4+
5+ libs = []
6+ libpl = sysconfig .get_config_vars ('LIBPL' )
7+ if libpl :
8+ libs .append ("-L" + libpl [0 ])
9+
10+ libpython = sysconfig .get_config_var ('LIBPYTHON' )
11+ if libpython :
12+ libs .append (libpython )
13+ libs .extend (sysconfig .get_config_vars ("LIBS" , "SYSLIBS" ))
14+ print (' ' .join (libs ))
You can’t perform that action at this time.
0 commit comments