test
This commit is contained in:
parent
4c84939ef9
commit
dc6b805fe6
2 changed files with 13 additions and 7 deletions
14
setup.py
14
setup.py
|
|
@ -3,11 +3,12 @@
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
from glob import glob
|
from glob import glob
|
||||||
from distutils.core import setup
|
from setuptools import setup
|
||||||
|
|
||||||
try:
|
try:
|
||||||
from distutils import dep_util
|
from setuptools import dep_util
|
||||||
except:
|
except:
|
||||||
|
print("No")
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -36,7 +37,7 @@ def get_data_files():
|
||||||
# translations must be always in /usr/share because Gtk.builder only
|
# translations must be always in /usr/share because Gtk.builder only
|
||||||
# search there. If someone knows how to fix this...
|
# search there. If someone knows how to fix this...
|
||||||
# share/locale/fr/LC_MESSAGES/
|
# share/locale/fr/LC_MESSAGES/
|
||||||
target = os.path.join('/usr', 'share', 'locale',
|
target = os.path.join('share', 'locale',
|
||||||
lang_name, 'LC_MESSAGES')
|
lang_name, 'LC_MESSAGES')
|
||||||
data_files.append((target, [mofile]))
|
data_files.append((target, [mofile]))
|
||||||
|
|
||||||
|
|
@ -63,10 +64,9 @@ def compile_translations():
|
||||||
if not os.path.isdir(modir):
|
if not os.path.isdir(modir):
|
||||||
os.makedirs(modir)
|
os.makedirs(modir)
|
||||||
|
|
||||||
if not os.path.isfile(mofile) or dep_util.newer(pofile, mofile):
|
os.system("msgfmt \"" + pofile + "\" -o \"" + mofile + "\"")
|
||||||
# msgfmt.make(pofile, mofile)
|
|
||||||
os.system("msgfmt \"" + pofile + "\" -o \"" + mofile + "\"")
|
|
||||||
except:
|
except:
|
||||||
|
print("Error")
|
||||||
pass
|
pass
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
|
@ -132,5 +132,5 @@ setup(
|
||||||
scripts=['src/devede_ng.py', 'src/copy_files_verbose.py'],
|
scripts=['src/devede_ng.py', 'src/copy_files_verbose.py'],
|
||||||
)
|
)
|
||||||
|
|
||||||
if (len(sys.argv) == 2) and (sys.argv[1] == "install"):
|
if (len(sys.argv) >= 2) and (sys.argv[1] == "install"):
|
||||||
os.system("gtk-update-icon-cache")
|
os.system("gtk-update-icon-cache")
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,12 @@ import devedeng.project
|
||||||
import devedeng.configuration_data
|
import devedeng.configuration_data
|
||||||
import devedeng.choose_disc_type
|
import devedeng.choose_disc_type
|
||||||
|
|
||||||
|
import pkg_resources
|
||||||
|
|
||||||
|
print(pkg_resources.resource_dir)
|
||||||
|
print(pkg_resources.resource_filename("devedeng", 'data/devede_ng.py.desktop'))
|
||||||
|
|
||||||
|
|
||||||
config_data = devedeng.configuration_data.configuration.get_config()
|
config_data = devedeng.configuration_data.configuration.get_config()
|
||||||
|
|
||||||
if config_data is None:
|
if config_data is None:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue