-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathsetup.py
88 lines (77 loc) · 3.6 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
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# +---------------------------------------------------------------------------+
# | pylstar : Implementation of the LSTAR Grammatical Inference Algorithm |
# +---------------------------------------------------------------------------+
# | Copyright (C) 2015 Georges Bossert |
# | This program is free software: you can redistribute it and/or modify |
# | it under the terms of the GNU General Public License as published by |
# | the Free Software Foundation, either version 3 of the License, or |
# | (at your option) any later version. |
# | |
# | This program is distributed in the hope that it will be useful, |
# | but WITHOUT ANY WARRANTY; without even the implied warranty of |
# | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
# | GNU General Public License for more details. |
# | |
# | You should have received a copy of the GNU General Public License |
# | along with this program. If not, see <http://www.gnu.org/licenses/>. |
# +---------------------------------------------------------------------------+
# | @url : https://github.com/gbossert/pylstar |
# | @contact : [email protected] |
# +---------------------------------------------------------------------------+
# +----------------------------------------------------------------------------
# | Global Imports
# +----------------------------------------------------------------------------
import sys
from setuptools import setup, find_packages
sys.path.insert(0, 'src/')
from pylstar import release
from resources.sdist.test_command import test_command
from resources.sdist.utils import opj
# +----------------------------------------------------------------------------
# | Definition of the dependencies
# +----------------------------------------------------------------------------
dependencies = []
with open('requirements.txt', 'r') as fd_requirements:
for dependency in fd_requirements:
dependencies.append(dependency.strip())
extra_dependencies = {
'docs': ['Sphinx>=1.1.3']
}
dependency_links = []
data_files = []
# Extract the long description from README.rst and NEWS.rst files
README = open('README.rst', 'rt').read()
NEWS = open('CHANGELOG.rst', 'rt').read()
# +----------------------------------------------------------------------------
# | Extensions in the build operations (test, ...)
# +----------------------------------------------------------------------------
CMD_CLASS = {
'test': test_command
}
# +----------------------------------------------------------------------------
# | Definition of the package
# +----------------------------------------------------------------------------
setup(
name=release.name,
packages=find_packages(where='src'),
package_dir={
"": "src"
},
data_files=data_files,
install_requires=dependencies,
extras_require=extra_dependencies,
dependency_links=dependency_links,
version=release.version,
license=release.licenseName,
description=release.description,
platforms=release.platforms,
author=release.author,
author_email=release.author_email,
url=release.url,
download_url=release.download_url,
keywords=release.keywords,
long_description=README + '\n' + NEWS,
cmdclass=CMD_CLASS,
)