Skip to content

Commit 04ea4eb

Browse files
committed
setup: ugly hack to include our AWOL CI python lib path
This is wrong bad bad bad, but it makes the Win64 build work again for now, which is what matters.
1 parent 4e51b21 commit 04ea4eb

1 file changed

Lines changed: 11 additions & 2 deletions

File tree

setup.py

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
from distutils.command.sdist import sdist
1919
from distutils.cmd import Command
2020
from distutils.dir_util import remove_tree
21-
from distutils.sysconfig import get_python_inc
21+
from distutils.sysconfig import get_python_inc, get_python_lib
2222
from distutils import log
2323
import os, os.path
2424
import glob
@@ -183,7 +183,13 @@ def recursive_package_data(src, package_dir='overviewer_core'):
183183
c_overviewer_files = ['overviewer_core/src/' + s for s in c_overviewer_files]
184184
c_overviewer_includes = ['overviewer_core/src/' + s for s in c_overviewer_includes]
185185

186-
setup_kwargs['ext_modules'].append(Extension('overviewer_core.c_overviewer', c_overviewer_files, include_dirs=['.', numpy_include] + pil_include, depends=c_overviewer_includes, extra_link_args=[]))
186+
setup_kwargs['ext_modules'].append(Extension(
187+
'overviewer_core.c_overviewer',
188+
c_overviewer_files,
189+
include_dirs=['.', numpy_include] + pil_include,
190+
depends=c_overviewer_includes,
191+
extra_link_args=[]
192+
))
187193

188194

189195
# tell build_ext to build the extension in-place
@@ -290,6 +296,9 @@ def build_extensions(self):
290296
e.extra_link_args.append("/MANIFEST")
291297
e.extra_link_args.append("/DWINVER=0x060")
292298
e.extra_link_args.append("/D_WIN32_WINNT=0x060")
299+
# workaround for our extremely shitty build system
300+
# yeet this into a fire once we move to github actions
301+
e.extra_link_args.append("/LIBPATH:C:\Python37\Libs")
293302
if c == "unix":
294303
# customize the build options for this compilier
295304
for e in self.extensions:

0 commit comments

Comments
 (0)