-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
79 lines (71 loc) · 2.63 KB
/
setup.py
File metadata and controls
79 lines (71 loc) · 2.63 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
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
from setuptools import setup, find_packages
# To use a consistent encoding
from codecs import open
from os import path
import json
here = path.abspath(path.dirname(__file__))
# Get the long description from the README file
with open(path.join(here, 'README.md'), encoding='utf-8') as f:
long_description = f.read()
# Get the package details from the SMEDL about.json file
with open(path.join(here, 'smedl', 'about.json'), encoding='utf-8') as f:
__about__ = json.load(f)
setup(
name=__about__['title'],
version=__about__['version'],
description=__about__['summary'],
long_description=long_description,
url=__about__['uri'],
author=__about__['author'],
author_email=__about__['author_email'],
maintainer=__about__['maintainer'],
maintainer_email=__about__['maintainer_email'],
classifiers=[
'Intended Audience :: Developers',
'Intended Audience :: Science/Research',
'Programming Language :: Python :: 3',
'Programming Language :: C',
'Topic :: Scientific/Engineering',
'Topic :: Software Development :: Code Generators',
'Topic :: Software Development :: Quality Assurance',
'License :: OSI Approved :: MIT License',
],
keywords='runtime-verification',
packages=find_packages(include=['smedl', 'smedl.*']),
package_data={
'': ['*.c', '*.cpp', '*.h'],
'smedl': ['about.json'],
'smedl.parser': ['*.ebnf'],
'smedl.codegen': ['Makefile'],
'smedl.codegen.rabbitmq': ['*.cfg'],
'smedl.codegen.ros': ['*.inc', '*.msg', 'CMakeLists.txt', '*.xml'],
},
install_requires=[
'tatsu>=4.4,<5;python_version<"3.8"',
'tatsu>=5;python_version>="3.8"',
'Jinja2>=3.0',
'importlib_resources>=1.1;python_version<"3.7"',
],
python_requires='>=3.6',
extras_require={
'test': [
'pytest',
'flake8',
'pika', # For RabbitMQ testing
# Consider adding the flake8-docstrings plugin
],
},
#TODO Set it up to automatically generate the parsers from ebnf files after
# installation. This may help:
# https://stackoverflow.com/questions/1321270/how-to-extend-distutils-with-a-simple-post-install-script/1321345#1321345
# which was linked to from:
# https://stackoverflow.com/questions/14441955/how-to-perform-custom-build-steps-in-setup-py
# Or it could potentially be done during the build step instead (see second
# answer at second link)
# Be careful not to break pip -e if possible
entry_points={
'console_scripts': [
'mgen=smedl.mgen:main',
],
},
)