-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
88 lines (69 loc) · 2.07 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
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
# -*- coding: utf-8 -*-
import setuptools
import pathlib
def get_data_files():
# Final list of files to return.
data_files = []
# List of directories to look into
data_dirs = ['restore/MatlabCodes/']
for directory in data_dirs:
p = pathlib.Path('inpystem/' + directory)
for file in p.rglob('*'):
if file.suffix != '.mat' and not file.is_dir():
data_files += [str(file)[9:]]
data_files += ['restore/MatlabCodes/ITKrMM/InOut',
'restore/MatlabCodes/BPFA/InOut']
return data_files
def get_long_description():
# Long description at README
with open("README.md", "r") as fh:
long_description = fh.read()
return long_description
# Load versioning data
version = {}
with open("inpystem/version.py") as fp:
exec(fp.read(), version)
# Packages that are required for inpystem
install_req = ['numpy',
'scipy',
'matplotlib',
'hyperspy',
'scikit-learn',
'scikit-image>=0.16'
]
setuptools.setup(
# Name and version
#
name='inpystem',
version=version['version'],
package_dir={'inpystem': 'inpystem'},
# Required installations
install_requires=install_req,
packages=['inpystem',
'inpystem.restore',
'inpystem.tools',
'inpystem.tests',
'inpystem.tests.tools'],
package_data={
'inpystem': get_data_files()
},
include_package_data=True,
python_requires='>=3.6',
# Metadata to display on PyPI
#
author=version['author']['name'],
author_email=version['author']['mail'],
# Descriptions
description=version['description'],
long_description=get_long_description(),
long_description_content_type="text/markdown",
# Locations
url=version['url']["Source Code"],
project_urls=version['url'],
license=version['license'],
keywords=version['keywords'],
platforms=version['platforms'],
# Classifiers
#
classifiers=version['classifiers'],
)