-
Notifications
You must be signed in to change notification settings - Fork 4
/
setup.py
56 lines (51 loc) · 1.4 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
import setuptools
import re
VERSION = None
with open('nutshell/__init__.py') as f:
VERSION = re.search(r"^__version__\s*=\s*'(\d+\.\d+\.\d+\w*)'", f.read(), re.MULTILINE).group(1)
if VERSION is None:
raise RuntimeError('Missing or invalid version number')
class PackageLister:
def __getitem__(self, args):
if not isinstance(args, tuple):
args = [args]
ret = []
for i in args:
if isinstance(i, slice):
ret.append(i.start)
ret.extend(map(f'{i.start}.'.__add__, i.stop))
else:
ret.append(i)
return ret
f = PackageLister()
# setuptools.find_packages() misses quite a few
# Easier just to maintain this
PACKAGES = f[
'nutshell': f[
'tools': f['icons'],
'common',
'segment_types': f[
'colors',
'icons',
'nutshell',
'table': f['lark_assets', 'inline_rulestring']
]
]
]
setuptools.setup(
name='nutshell',
author='Wright',
license='GPL',
version=VERSION,
packages=PACKAGES,
include_package_data=True,
url='https://github.com/supposedly/nutshell',
description="Transpiler from a powerful alternative cellular-automaton-specification language to Golly's",
install_requires=['bidict', 'joffrey>=0.5.1'], #, 'lark-parser'],
python_requires='>=3.6',
entry_points={
'console_scripts': [
'nutshell-ca=nutshell.main:main'
]
}
)