forked from pypingou/gitsync
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
64 lines (53 loc) · 1.62 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
#!/usr/bin/env python
"""
Setup script
"""
import os
import re
from setuptools import setup
gitsyncfile = os.path.join(os.path.dirname(__file__), 'gitsync.py')
# Thanks to SQLAlchemy:
# https://github.com/zzzeek/sqlalchemy/blob/master/setup.py#L104
with open(gitsyncfile) as stream:
__version__ = re.compile(
r".*__version__ = '(.*?)'", re.S
).match(stream.read()).group(1)
def get_requires():
''' Reads the requirements.txt and return its content in a list. '''
stream = open('requirements.txt')
content = stream.readlines()
stream.close()
deps = []
for row in content:
if row.startswith('#'):
continue
else:
deps.append(row.strip())
return deps
setup(
name='gitsync',
description='Keep your git folder always in sync with its server',
version=__version__,
author='Pierre-Yves Chibon',
author_email='[email protected]',
url='https://github.com/pypingou/gitsync',
download_url='https://pypi.python.org/pypi/gitsync',
license='GPLv3+',
py_modules=['gitsync'],
install_requires=get_requires(),
entry_points={
'console_scripts': [
"gitsync-cli=gitsync:main",
]
},
classifiers=[
'License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)',
'Operating System :: POSIX :: Linux',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Topic :: System :: Archiving',
'Topic :: Utilities',
]
)