From 04fab838a453df3ac38f73f099e776d89e7f5e75 Mon Sep 17 00:00:00 2001 From: Isuru Fernando Date: Mon, 13 Jul 2020 23:34:58 -0500 Subject: [PATCH] Get rid of pyproject.toml --- aksetup_helper.py | 10 ++++++---- pyproject.toml | 2 -- setup.py | 3 +-- 3 files changed, 7 insertions(+), 8 deletions(-) delete mode 100644 pyproject.toml diff --git a/aksetup_helper.py b/aksetup_helper.py index f90d0852..73c0e4fe 100644 --- a/aksetup_helper.py +++ b/aksetup_helper.py @@ -36,10 +36,12 @@ def setup(*args, **kwargs): def get_numpy_incpath(): from imp import find_module - # avoid actually importing numpy, it screws up distutils - file, pathname, descr = find_module("numpy") - from os.path import join - return join(pathname, "core", "include") + # importing numpy will fail if numpy was installed by pip because of + # setup_requires. Doing the following should avoid that + # http://stackoverflow.com/questions/19919905/how-to-bootstrap-numpy-installation-in-setup-py + __builtins__.__NUMPY_SETUP__ = False + import numpy + return numpy.get_include() class NumpyExtension(Extension): diff --git a/pyproject.toml b/pyproject.toml deleted file mode 100644 index 948bc1db..00000000 --- a/pyproject.toml +++ /dev/null @@ -1,2 +0,0 @@ -[build-system] -requires = ["setuptools", "wheel", "numpy", "pybind11"] diff --git a/setup.py b/setup.py index aa8d70e1..4beca19a 100644 --- a/setup.py +++ b/setup.py @@ -232,7 +232,6 @@ def main(): ], include_dirs=INCLUDE_DIRS + [ get_pybind_include(), - get_pybind_include(user=True) ], library_dirs=conf["CL_LIB_DIR"], libraries=conf["CL_LIBNAME"], @@ -244,7 +243,7 @@ def main(): ], setup_requires=[ - "pybind11", + "pybind11>=2.5.0", "numpy", ], -- GitLab