forked from muhasturk/gitim
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
26 lines (22 loc) · 753 Bytes
/
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
from setuptools import setup, find_packages
try:
from itertools import imap, ifilter
except ImportError:
imap = map
ifilter = filter
from os import path
from ast import parse
if __name__ == '__main__':
package_name = 'gitim'
get_vals = lambda var0, var1: imap(lambda buf: next(imap(lambda e: e.value.s, parse(buf).body)),
ifilter(lambda line: line.startswith(var0) or line.startswith(var1), f))
with open('gitim.py') as f:
__author__, __version__ = get_vals('__version__', '__author__')
setup(
name=package_name,
author=__author__,
version=__version__,
license='MIT',
install_requires=['pygithub'],
py_modules=['gitim']
)