From ff6f048a4758be1cdff677d871f45116afa54367 Mon Sep 17 00:00:00 2001 From: Felix Zimmermann Date: Thu, 13 May 2021 13:43:16 -0700 Subject: [PATCH] fix sdist --- MANIFEST.in | 4 ++++ pyproject.toml | 2 ++ setup.py | 7 +++++-- 3 files changed, 11 insertions(+), 2 deletions(-) create mode 100644 MANIFEST.in diff --git a/MANIFEST.in b/MANIFEST.in new file mode 100644 index 0000000..f419c74 --- /dev/null +++ b/MANIFEST.in @@ -0,0 +1,4 @@ +include pyproject.toml +include autocorrelate3.pyx +include mkl_dfti.pxd +include README.md diff --git a/pyproject.toml b/pyproject.toml index e332d91..fedd31d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,3 +4,5 @@ requires-python = ">=3.6" [build-system] build-backend = "setuptools.build_meta" requires = ["setuptools", "oldest-supported-numpy", "Cython", "mkl==2019; sys_platform != 'win32'", "mkl-include==2019; sys_platform != 'win32'", "mkl-devel; sys_platform == 'win32'"] + +[tool] \ No newline at end of file diff --git a/setup.py b/setup.py index f2decb0..9371c13 100755 --- a/setup.py +++ b/setup.py @@ -82,9 +82,12 @@ def configuration(): sources = [join(srcdir, "reconstruction", "autocorrelate3.pyx")] have_cython = True - except ImportError as e: + if not exists(sources[0]): + print('pyx missing') + raise FileNotFoundError + except (ImportError, FileNotFoundError) as e: have_cython = False - sources = [join(srcdir, "reconstruction", "autocorrelate.c")] + sources = [join(srcdir, "reconstruction", "autocorrelate3.c")] if not exists(sources[0]): print("Cython is required to build ft autocorrelation") config.add_extension(