-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
42 lines (32 loc) · 1.11 KB
/
setup.py
File metadata and controls
42 lines (32 loc) · 1.11 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
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import setuptools
short_description = "Delfation preconditioner"
minimun_requirements = ['numpy>=1.11', 'scipy>=0.17']
def get_data(filename, default_data, action_data=lambda x: x):
data = ""
try:
with open(filename, "r") as fhandle:
data = action_data(fhandle.read())
except IOError:
data = default_data
return data
def get_long_description():
return get_data(filename='README.md',
default_data=short_description)
def get_requirements():
return get_data(filename='requirements.txt',
default_data=minimun_requirements,
action_data=lambda x: x.strip().split('\n'))
setuptools.setup(
name="Deflation",
version="1.0.0",
author="Reinaldo Astudillo",
author_email="R.A.Astudillo@tudelft.nl",
description=short_description,
long_description=get_long_description(),
long_description_content_type="text/markdown",
url="https://github.com/astudillor/idrs",
install_requires=get_requirements(),
packages=setuptools.find_packages(),
)