This repository has been archived by the owner on Jun 21, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 33
/
Copy pathsetup.py
57 lines (51 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
#!/usr/bin/env python
from distutils.core import setup
from setuptools import find_packages
import os
import subprocess
def create_mo_files():
# http://stackoverflow.com/questions/34070103/how-to-compile-po-gettext-translations-in-setup-py-python-script/37906830#37906830
data_files = []
localedir = 'ulakbus/locale'
po_dirs = [localedir + '/' + l + '/LC_MESSAGES/'
for l in next(os.walk(localedir))[1]]
for d in po_dirs:
mo_files = []
po_files = [f
for f in next(os.walk(d))[2]
if os.path.splitext(f)[1] == '.po']
for po_file in po_files:
filename, extension = os.path.splitext(po_file)
mo_file = filename + '.mo'
msgfmt_cmd = 'msgfmt {} -o {}'.format(d + po_file, d + mo_file)
subprocess.call(msgfmt_cmd, shell=True)
mo_files.append(d + mo_file)
data_files.append((d, mo_files))
return data_files
setup(
name='Ulakbus',
version='0.9.5',
description='Ulakbus Butunlesik Universite Sistemi',
author='Zetaops',
license='GPL v3',
author_email='[email protected]',
install_requires=[
'zengine==0.8.1',
'requests',
'boto',
'reportlab',
'six',
'lxml',
'streamingxmlwriter',
'dateutils'
],
url='https://github.com/zetaops/ulakbus',
packages=find_packages(exclude=['tests', 'tests.*']),
download_url='https://github.com/zetaops/ulakbus/archive/master.zip',
package_data={
'ulakbus': ['diagrams/*.bpmn'],
},
data_files=create_mo_files(),
keywords=['academic erp', 'universty automation system'],
classifiers=[]
)