-
Notifications
You must be signed in to change notification settings - Fork 26
/
Copy pathsetup.py
68 lines (60 loc) · 1.68 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
#!/usr/bin/env python
# coding: utf-8
import os
import sys
import re
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
requires = [
'docopt',
'flask',
'feedparser',
'lxml',
'itsdangerous',
'requests',
'celery',
'celery-with-mongodb',
'pymongo',
'anyjson'
]
if sys.version_info[0] == 3:
requires.append('py3k-bcrypt')
else:
requires.append('py-bcrypt')
def get_version():
VERSIONFILE = 'leselys/__init__.py'
initfile_lines = open(VERSIONFILE, 'rt').readlines()
VSRE = r"^__version__ = ['\"]([^'\"]*)['\"]"
for line in initfile_lines:
mo = re.search(VSRE, line, re.M)
if mo:
return mo.group(1)
raise RuntimeError('Unable to find version string in %s.' % (VERSIONFILE,))
if sys.argv[-1] == 'publish':
os.system('python setup.py sdist upload')
sys.exit()
setup(
name='leselys',
version=get_version(),
description="I'm Leselys, your very elegant RSS reader.",
long_description=open('README.rst').read(),
license=open('LICENSE').read(),
author='toxinu',
author_email='[email protected]',
url='https://github.com/toxinu/leselys',
keywords='rss reader greader',
zip_safe=False,
packages=['leselys'],
scripts=['scripts/leselys'],
install_requires=requires,
include_package_data=True,
classifiers=(
'Intended Audience :: Developers',
'Natural Language :: English',
'License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)',
'Programming Language :: Python',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7')
)