~epidermis/epidermis/debian

« back to all changes in this revision

Viewing changes to setup.py

  • Committer: David D Lowe
  • Date: 2009-10-31 23:12:46 UTC
  • Revision ID: daviddlowe.flimm@gmail.com-20091031231246-5gabya26arhlwue8
Tags: 0.4-0ubuntu0
* Added support for Xsplash themes.
* Removed support for Usplash themes.
* Added autogenerate button for Epidermis Creator so that previews of pigments can be automatically created.
* Help message is displayed if no skins are installed.
* License updated to GPLv3.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#!/usr/bin/env python
2
 
# 2008 copyright David D Lowe
3
 
# released under the GPL v2
 
2
# 2008-2009 copyright David D Lowe
 
3
# released under the GPL v3
4
4
 
5
5
from distutils.core import setup
6
6
import os, sys
17
17
    if os.path.exists(os.path.join(os.path.dirname(__file__),"convenience_scripts/translate.py")):
18
18
        if "build" in sys.argv[1:2]:
19
19
            # generate the .mo files from the existing .po files
20
 
            call(["python", "convenience_scripts/translate.py", "--generate-mo", "--ignore-bzr"])
 
20
            call(["python", "convenience_scripts/translate.py", "--generate-mo", "--ignore-bzr"],cwd=os.path.join(os.path.dirname(os.path.realpath(__file__))))
21
21
    else:
22
22
        print >> sys.stderr, "could not find %s" % os.path.join(os.path.dirname(__file__), "convenience_scripts/translate.py")
23
23
        raise()
 
24
    if "clean" in sys.argv[1:2]:
 
25
        for lang in os.listdir("po"):
 
26
            if os.path.isdir(os.path.join("po",lang,"LC_MESSAGES")):
 
27
                call(["rm","-r",os.path.join("po",lang)])
24
28
 
25
29
    mo_files = []
26
30
    # mo_files is a list of tuples, each tuple containing one string specifying the location and a list of files
28
32
    # eg: [('/usr/share/locale/en_GB/LC_MESSAGES', ['po/en_GB/LC_MESSAGES/epidermis.mo'])
29
33
    for lang in os.listdir("po"):
30
34
        if os.path.isdir(os.path.join("po", lang, "LC_MESSAGES")):
 
35
            if len(glob.glob(os.path.join("po",lang,"LC_MESSAGES","*.mo"))) <= 0:
 
36
                print >> sys.stderr, "could not find %s" % os.path.join("po",lang,"LC_MESSAGES","*.mo")
 
37
                raise()
31
38
            mo_files.append((os.path.join("/usr/share/locale", lang, "LC_MESSAGES"), glob.glob(os.path.join("po", lang, "LC_MESSAGES") + "/*.mo")))
32
39
    
 
40
    
33
41
    # similar to mo_files but for docbooks   
34
42
    docbooks = []
35
43
    omfs = []