-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
56 lines (48 loc) · 1.63 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
import setuptools
import typing as tp
import site
import os
AM_VERSION = "0.4.0"
with open("README.rst") as file:
LONG_DESCRIPTION = file.read()
def get_ext_dir(*components: tp.Iterable[str]) -> tp.Sequence[str]:
dirs = []
for sp in site.getsitepackages():
fp = os.path.join(sp, *components)
if os.path.exists(fp):
dirs.append(fp)
return dirs
extension = setuptools.Extension(
"arraymap",
["arraymap.c"],
include_dirs=get_ext_dir("numpy", "_core", "include"),
library_dirs=get_ext_dir("numpy", "_core", "lib"),
define_macros=[("AM_VERSION", AM_VERSION)],
libraries=["npymath"],
)
setuptools.setup(
name="arraymap",
version=AM_VERSION,
description="Dictionary-like lookup from NumPy array values to their integer positions",
long_description=LONG_DESCRIPTION,
python_requires=">=3.9",
install_requires=["numpy>=1.19.5"],
url="https://github.com/static-frame/arraymap",
author="Christopher Ariza, Brandt Bucher",
license="MIT",
classifiers=[
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Topic :: Software Development",
"License :: OSI Approved :: MIT License",
"Operating System :: MacOS :: MacOS X",
"Operating System :: Microsoft :: Windows",
"Operating System :: POSIX",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
],
ext_modules=[extension],
)