forked from scikit-sparse/scikit-sparse
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsetup.py
More file actions
99 lines (88 loc) · 3.26 KB
/
setup.py
File metadata and controls
99 lines (88 loc) · 3.26 KB
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
# Copyright (C) 2008-2017 The scikit-sparse developers:
#
# 2008 David Cournapeau <cournape@gmail.com>
# 2009-2015 Nathaniel Smith <njs@pobox.com>
# 2010 Dag Sverre Seljebotn <dagss@student.matnat.uio.no>
# 2014 Leon Barrett <lbarrett@climate.com>
# 2015 Yuri <yuri@tsoft.com>
# 2016-2017 Antony Lee <anntzer.lee@gmail.com>
# 2016 Alex Grigorievskiy <alex.grigorievskiy@gmail.com>
# 2016-2017 Joscha Reimer <jor@informatik.uni-kiel.de>
# 2021- Justin Ellis <justin.ellis18@gmail.com>
"""Sparse matrix tools.
This is a home for sparse matrix code in Python that plays well with
scipy.sparse, but that is somehow unsuitable for inclusion in scipy
proper. Usually this will be because it is released under the GPL.
So far we have a wrapper for the CHOLMOD library for sparse Cholesky
decomposition. Further contributions are welcome!
"""
import os
import sys
import numpy as np
from Cython.Build import cythonize
from setuptools import Extension, find_packages, setup
DISTNAME = "scikit-sparse"
DESCRIPTION = "Scikit sparse matrix package"
LONG_DESCRIPTION = __doc__
MAINTAINER = "Justin Ellis"
MAINTAINER_EMAIL = "justin.ellis18@gmail.com"
URL = "https://github.com/scikit-sparse/scikit-sparse"
LICENSE = "BSD"
INCLUDE_DIRS = [
np.get_include(),
sys.prefix + "/include",
# Debian's suitesparse-dev installs to
# /usr/include/suitesparse
"/usr/include/suitesparse",
]
LIBRARY_DIRS = []
user_include_dir = os.getenv("SUITESPARSE_INCLUDE_DIR")
user_library_dir = os.getenv("SUITESPARSE_LIBRARY_DIR")
if user_include_dir:
INCLUDE_DIRS.append(user_include_dir)
if user_library_dir:
LIBRARY_DIRS.append(user_library_dir)
setup(
install_requires=["numpy>=1.13.3", "scipy>=0.19"],
python_requires=">=3.6, <3.12",
packages=find_packages(),
package_data={
"": ["test_data/*.mtx.gz"],
},
name=DISTNAME,
version="0.4.12", # remember to update __init__.py
maintainer=MAINTAINER,
maintainer_email=MAINTAINER_EMAIL,
description=DESCRIPTION,
license=LICENSE,
url=URL,
long_description=LONG_DESCRIPTION,
classifiers=[
"Development Status :: 3 - Alpha",
"Environment :: Console",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: BSD License",
"Programming Language :: Cython",
"Topic :: Scientific/Engineering",
"Topic :: Scientific/Engineering :: Mathematics",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
],
# You may specify the directory where CHOLMOD is installed using the
# library_dirs and include_dirs keywords in the lines below.
ext_modules=cythonize(
Extension(
"sksparse.cholmod",
["sksparse/cholmod.pyx"],
include_dirs=INCLUDE_DIRS,
library_dirs=LIBRARY_DIRS,
libraries=["cholmod"],
)
),
)