-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathsetup.py.in
111 lines (91 loc) · 4.04 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
#!/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()
return description
except IOError:
return ''
# Author meta-data.
AUTHOR = 'Nico Curti, Lorenzo Squadrani, Simone Gasperini, Mattia Ceccarelli'
EMAIL = 'nico.curti2@unibo.it, lorenzo.squadrani@studio.unibo.it, simone.gasperini2@studio.unibo.it, mattia.ceccarelli5@unibo.it'
# Package meta-data.
REQUIRES_PYTHON = '>=3.5' # OpenCV requires >=3.5
KEYWORDS = 'neural-networks deep-neural-networks deep-learning image-classification'
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>=0.29'
'numpy>=1.16.0'
'cmake',
'cython'],
packages = find_packages(include=['plasticity', 'plasticity.*'], exclude=('test', 'testing')),
package_data = {'plasticity': ['lib/*.pxd', 'source/*.pyx'],},
include_package_data = True, # no absolute paths are allowed
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',
)