-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
executable file
·61 lines (46 loc) · 1.7 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
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
from setuptools import setup
from baulrename.appdata import *
import os, polib
m_lstDataFiles = []
for strRoot, lstDirnames, lstFilenames in os.walk('po'):
for strFilename in lstFilenames:
if not strFilename.endswith('.po'): continue
strLocale = os.path.splitext(strFilename)[0]
strLocaleDir = 'data/usr/share/locale/' + strLocale + '/LC_MESSAGES/'
if not os.path.isdir(strLocaleDir):
os.makedirs(strLocaleDir)
polib.pofile('po/' + strFilename).save_as_mofile(strLocaleDir + APPNAME + '.mo')
for strRoot, lstDirnames, lstFilenames in os.walk('data'):
for strFilename in lstFilenames:
if strFilename == '.gitkeep':
continue
strPath = os.path.join(strRoot, strFilename)
m_lstDataFiles.append((os.path.dirname(strPath).lstrip('data'), [strPath]))
setup(
name = APPNAME,
version = APPVERSION,
description = APPDESCRIPTION,
long_description = APPLONGDESCRIPTION,
url = APPURL,
author = APPAUTHOR,
author_email = APPMAIL,
maintainer = APPAUTHOR,
maintainer_email = APPMAIL,
license = 'GPL-3',
classifiers = [
'Development Status :: 5 - Production/Stable',
'Environment :: X11 Applications :: CTK',
'Intended Audience :: End Users/Desktop',
'License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)',
'Natural Language :: English',
'Operating System :: POSIX :: Linux',
'Programming Language :: Python :: 3 :: Only',
'Topic :: Utilities'
],
keywords = APPKEYWORDS,
packages = [APPNAME],
data_files = m_lstDataFiles,
platforms = 'UNIX'
)