Skip to content

Commit

Permalink
Update setup (#15)
Browse files Browse the repository at this point in the history
Update setup.py, include numpy later and string formatting
  • Loading branch information
dgoeries committed Mar 18, 2022
1 parent bfcdfc3 commit bfb04a4
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 20 deletions.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,3 @@ The ``downsample`` function takes an input for ``x`` and ``y`` in addition to th
assert len(ny) == THRESHOLD
assert nx.dtype == np.double
assert ny.dtype == np.double

42 changes: 23 additions & 19 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
import os.path as osp
import sys

import numpy
from setuptools import Extension, setup


Expand All @@ -14,40 +13,45 @@ def read(*parts):
return open(osp.join(get_script_path(), *parts)).read()


lttbc_py = Extension('lttbc', sources=['lttbc.c'],
class numpy_get_include:
def __str__(self):
import numpy
return numpy.get_include()


lttbc_py = Extension("lttbc", sources=["lttbc.c"],
define_macros=[
('NPY_NO_DEPRECATED_API', 'NPY_1_7_API_VERSION')],
include_dirs=[numpy.get_include(),
("NPY_NO_DEPRECATED_API", "NPY_1_7_API_VERSION")],
include_dirs=[numpy_get_include(),
get_script_path()],
)

setup(
name="lttbc",
author="European XFEL GmbH",
use_scm_version=True,
include_dirs=[numpy.get_include(), get_script_path()],
ext_modules=[lttbc_py],
author_email="[email protected]",
maintainer="Dennis Goeries",
url="https://github.com/dgoeries/lttbc/",
description="Largest triangle three buckets module for Python written in C",
long_description=read("README.txt"),
long_description_content_type='text/markdown',
long_description_content_type="text/markdown",
license="MIT",
install_requires=['numpy'],
setup_requires=['setuptools_scm'],
install_requires=["numpy"],
setup_requires=["setuptools_scm"],
python_requires=">=3.5",
classifiers=[
'Development Status :: 5 - Production/Stable',
'Environment :: Console',
'Intended Audience :: Developers',
'Intended Audience :: Science/Research',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: Implementation :: CPython',
'Topic :: Scientific/Engineering :: Information Analysis',
'Topic :: Scientific/Engineering :: Physics',
'Topic :: Scientific/Engineering :: Visualization',
"Development Status :: 5 - Production/Stable",
"Environment :: Console",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: Implementation :: CPython",
"Topic :: Scientific/Engineering :: Information Analysis",
"Topic :: Scientific/Engineering :: Physics",
"Topic :: Scientific/Engineering :: Visualization",
],
)

0 comments on commit bfb04a4

Please sign in to comment.