-
Notifications
You must be signed in to change notification settings - Fork 50
/
setup.py
executable file
·50 lines (46 loc) · 1.42 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
#!/usr/bin/env python
# encoding: utf8
"""Adapted from virtualenv's setup.py
"""
import os
try:
from setuptools import setup
kw = {'entry_points':
"""[console_scripts]\na2po = android2po:run\n""",
'zip_safe': False}
except ImportError:
from distutils.core import setup
kw = {'scripts': ['scripts/a2po']}
import re
here = os.path.dirname(os.path.abspath(__file__))
# Figure out the version
version_re = re.compile(
r'__version__ = (\(.*?\))')
fp = open(os.path.join(here, 'android2po/__init__.py'))
version = None
for line in fp:
match = version_re.search(line)
if match:
exec("version = %s" % match.group(1))
version = ".".join(map(str, version))
break
else:
raise Exception("Cannot find version in android2po.py")
fp.close()
setup(name='android2po',
version=version,
description="Convert between Android string resources and gettext .po files.",
classifiers=[
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Topic :: Software Development :: Localization',
],
author='Michael Elsdoerfer',
author_email='[email protected]',
url='http://github.com/miracle2k/android2po',
license='BSD',
packages=['android2po'],
package_dir = {'android2po': 'android2po'},
install_requires = ['lxml', 'argparse', 'babel', 'termcolor', 'colorama'],
**kw
)