-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathsetup.py
More file actions
executable file
·48 lines (40 loc) · 1.29 KB
/
setup.py
File metadata and controls
executable file
·48 lines (40 loc) · 1.29 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
#!/usr/bin/python
"""A setuptools-based script for distributing and installing bandmat."""
# Copyright 2013, 2014, 2015, 2016, 2017, 2018 Matt Shannon
# This file is part of bandmat.
# See `License` for details of license and warranty.
import numpy as np
from setuptools import setup
from setuptools.extension import Extension
from Cython.Build import cythonize
cython_locs = [
('bandmat', 'full'),
('bandmat', 'core'),
('bandmat', 'tensor'),
('bandmat', 'linalg'),
('bandmat', 'misc'),
('bandmat', 'overlap'),
]
with open('README.rst') as readme_file:
long_description = readme_file.read()
requires = [ line.rstrip('\n') for line in open('requirements.txt') ]
ext_modules = cythonize([
Extension('.'.join(loc), ['/'.join(loc)+'.pyx'],
extra_compile_args=['-O3'],
include_dirs=[np.get_include()])
for loc in cython_locs
])
setup(
name='bandmat',
version='0.8.dev1',
description='A banded matrix library for python.',
url='http://github.com/MattShannon/bandmat',
author='Matt Shannon',
author_email='matt.shannon@cantab.net',
license='3-clause BSD (see License file)',
packages=['bandmat'],
python_requires='>=3.9',
install_requires=requires,
long_description=long_description,
ext_modules=ext_modules,
)