Skip to content

Commit

Permalink
fix sdist
Browse files Browse the repository at this point in the history
  • Loading branch information
fzimmermann89 committed May 13, 2021
1 parent 3ea94b9 commit ff6f048
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
4 changes: 4 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
include pyproject.toml
include autocorrelate3.pyx
include mkl_dfti.pxd
include README.md
2 changes: 2 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
7 changes: 5 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit ff6f048

Please sign in to comment.