Remove 'short_subst'. Use 'substitutions' instead.
[fpdb-dooglus.git] / setup.py
blobba59cd783492ee42a8a0f4f585cb79f26bcf03d1
1 #!/usr/bin/env python
2 # -*- coding: utf-8 -*-
4 #Created by Mika Bostrom, released into the public domain as far as legally possible.
6 #This program is distributed in the hope that it will be useful,
7 #but WITHOUT ANY WARRANTY; without even the implied warranty of
8 #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
10 # Python packaging for fpdb
12 from distutils.core import setup
13 from distutils.command.install_data import install_data as INST
15 import glob, string, os
18 class inst_translations(INST):
20 # Return triples for installations
21 def __locales(self, rootdir):
22 _globstr = '%s/*/*/*.mo' % rootdir
23 paths = glob.glob(_globstr)
24 _locales = []
25 for p in paths:
26 rp = string.split(p, '/', 2)
27 (lang, loc, mo) = string.split(rp[2], '/')
28 _locales.append( (lang, loc, mo) )
29 return _locales
31 def run(self):
32 locales = self.__locales('pyfpdb/locale')
33 for (lang, loc, mo_file) in locales:
34 lang_dir = os.path.join('share', 'locale', lang, loc)
35 lang_file = os.path.join('pyfpdb/locale', lang, loc, mo_file)
36 self.data_files.append( (lang_dir, [lang_file]) )
37 INST.run(self)
40 commands = {
41 'install_data': inst_translations
44 setup(name = 'fpdb',
45 description = 'Free Poker Database',
46 version = '0.20',
47 author = 'FPDB team',
48 author_email = 'fpdb-main@lists.sourceforge.net',
49 packages = ['fpdb'],
50 package_dir = { 'fpdb' : 'pyfpdb' },
51 cmdclass = commands,
52 data_files = [
53 ('/usr/share/pixmaps',
54 ['gfx/fpdb-icon.png', 'gfx/fpdb-icon2.png',
55 'gfx/fpdb-cards.png'
56 ]),
57 ('/usr/share/applications',
58 ['files/fpdb.desktop']),
59 ('/usr/share/python-fpdb',
60 ['pyfpdb/logging.conf', 'pyfpdb/Cards01.png',
61 'pyfpdb/HUD_config.xml.example'