From a7dc1582f9a60b0efa7a58cb96ad45d529900649 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 | 39 +++++++++++++++++++++++++++++++++++++++ pyproject.toml | 2 ++ setup.py | 5 ++++- 3 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 MANIFEST.in diff --git a/MANIFEST.in b/MANIFEST.in new file mode 100644 index 0000000..34c2193 --- /dev/null +++ b/MANIFEST.in @@ -0,0 +1,39 @@ +pyproject.toml +setup.cfg +setup.py +./idi/__init__.py +./idi/reconstruction/__init__.py +./idi/reconstruction/autocorrelate3.pyx +./idi/reconstruction/mkl_dfti.pxd +./idi/reconstruction/common.py +./idi/reconstruction/cpucor.py +./idi/reconstruction/cpucorrad.py +./idi/reconstruction/cpusimple.py +./idi/reconstruction/cucor.py +./idi/reconstruction/cucorrad.py +./idi/reconstruction/cusimple.py +./idi/reconstruction/ft.py +./idi/reconstruction/hitcor.py +./idi/reconstruction/hitcorrad.py +./idi/reconstruction/singleshotnorm.py +./idi/simulation/__init__.py +./idi/simulation/common.py +./idi/simulation/cpu.py +./idi/simulation/cuda.py +./idi/simulation/cutime.py +./idi/simulation/sim.cu +./idi/simulation/simobj.py +./idi/simulation/simple.py +./idi/simulation/simtime.cu +./idi/simulation/time.py +./idi/util/__init__.py +./idi/util/accum.py +./idi/util/datasetreader.py +./idi/util/filters.py +./idi/util/funchelper.py +./idi/util/h5util.py +./idi/util/poissondisk.py +./idi/util/random.py +./idi/util/submitmagic.py +scripts/idi_sim.py +scripts/idi_simrecon.py 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..14a2904 100755 --- a/setup.py +++ b/setup.py @@ -82,7 +82,10 @@ 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")] if not exists(sources[0]):