Skip to content

Commit

Permalink
fix setup.py after tommyod#89 (tommyod#137)
Browse files Browse the repository at this point in the history
  • Loading branch information
snowdrop4 authored May 22, 2023
1 parent 66128c5 commit 6319c4f
Showing 1 changed file with 6 additions and 26 deletions.
32 changes: 6 additions & 26 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,11 @@
https://github.com/pypa/sampleproject
"""

from setuptools import Extension, setup
import os
import re


try:
from Cython.Distutils import build_ext
import numpy as np
except ImportError:
can_build_ext = False
else:
can_build_ext = True
import numpy as np
from Cython.Distutils import build_ext
from setuptools import Extension, setup

HERE = os.path.abspath(os.path.dirname(__file__))

Expand All @@ -27,19 +20,6 @@ def read(fname):
return open(os.path.join(HERE, fname)).read()


cmdclass = {}
ext_modules = []
include_dirs = []

if can_build_ext:
cmdclass["build_ext"] = build_ext
ext_modules.append(Extension("cutils", ["KDEpy/cutils.pyx"]))
include_dirs.append(np.get_include())
else:
# Build extension with previously Cython generated source.
ext_modules.append(Extension("cutils", ["KDEpy/cutils.c"]))


setup(
# name="KDEpy",
# version=VERSION,
Expand All @@ -61,7 +41,7 @@ def read(fname):
],
packages=["KDEpy"],
install_requires=["numpy>=1.14.2", "scipy>=1.0.1", "matplotlib>=2.2.0"],
cmdclass=cmdclass,
include_dirs=include_dirs,
ext_modules=ext_modules,
cmdclass={"build_ext": build_ext},
include_dirs=[np.get_include()],
ext_modules=[Extension("cutils", ["KDEpy/cutils.pyx"])],
)

0 comments on commit 6319c4f

Please sign in to comment.