-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py.in
115 lines (97 loc) · 4.43 KB
/
setup.py.in
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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
#!/usr/bin/env python
# -*- coding: utf-8 -*-
try:
from setuptools import setup
from setuptools import find_packages
except ImportError:
from distutils.core import setup
from distutils.core import find_packages
def get_requires (requirements_filename):
'''
What packages are required for this module to be executed?
Parameters
----------
requirements_filename : str
filename of requirements (e.g requirements.txt)
Returns
-------
requirements : list
list of required packages
'''
with open(requirements_filename, 'r') as fp:
requirements = fp.read()
return list(filter(lambda x: x != '', requirements.split()))
def read_description (readme_filename):
'''
Description package from filename
Parameters
----------
readme_filename : str
filename with readme information (e.g README.md)
Returns
-------
description : str
str with description
'''
try:
with open(readme_filename, 'r') as fp:
description = '\n'
description += fp.read()
except Exception:
return ''
# Package meta-data.
AUTHOR = 'Nico Curti, Enrico Giampieri, Daniel Remondini'
REQUIRES_PYTHON = '>=3.4'
KEYWORDS = 'feature-selection machine-learning-algorithm classification-algorithm genomics rna mirna'
setup(
name = '@CMAKE_PROJECT_NAME@',
version = '@CMAKE_PROJECT_VERSION@',
description = '@CMAKE_PROJECT_DESCRIPTION@',
long_description = read_description('@CMAKE_SOURCE_DIR@/README.md'),
long_description_content_type = 'text/markdown',
author = AUTHOR,
author_email = EMAIL,
maintainer = AUTHOR,
maintainer_email = EMAIL,
python_requires = REQUIRES_PYTHON,
install_requires = get_requires('@CMAKE_SOURCE_DIR@/requirements.txt'),
url = '@CMAKE_PROJECT_HOMEPAGE_URL@',
download_url = '@CMAKE_PROJECT_HOMEPAGE_URL@',
keywords = KEYWORDS,
setup_requires = [# Setuptools 18.0 properly handles Cython extensions.
'setuptools>=18.0',
'cython',
'numpy>=1.16.0'
'Cython>=0.29'
'cmake',],
packages = find_packages(include=['DNetPRO', 'DNetPRO.*'], exclude=('test', 'testing', 'example')),
package_data = {'DNetPRO': ['lib/*.pxd', 'source/*.pyx', 'source/*.cpp'],},
include_package_data = True, # no absolute paths are allowed
data_files = [('', ['CMakeLists.txt', 'README.md', 'LICENSE', 'setup.py.in', 'DNetPRO.pc.in', 'DNetPROConfig.cmake.in']),
('example', ['example/DNetPRO_couples.cpp']),
('cmake', ['cmake/modules/FindCython.cmake', 'cmake/modules/FindSphinx.cmake', 'cmake/modules/UseCython.cmake']),
],
platforms = 'any',
classifiers = [
#'License :: OSI Approved :: GPL License',
'Natural Language :: English',
'Operating System :: MacOS :: MacOS X',
'Operating System :: POSIX',
'Operating System :: POSIX :: Linux',
'Operating System :: Microsoft :: Windows',
'Programming Language :: Python',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: Implementation :: CPython',
'Programming Language :: Python :: Implementation :: PyPy'
],
license = 'MIT',
entry_points={'console_scripts': [
'dnetpro = DNetPRO.__main__:main',
],
},
)