Browse Source

skip data files install on windows

283
ThomasV 13 years ago
parent
commit
8af3e689fc
  1. 25
      setup.py

25
setup.py

@ -4,23 +4,24 @@
from distutils.core import setup from distutils.core import setup
from lib.version import ELECTRUM_VERSION as version from lib.version import ELECTRUM_VERSION as version
import os, sys import os, sys, platform
if sys.version_info[:3] < (2,6,0): if sys.version_info[:3] < (2,6,0):
print "Electrum requires Python version >= 2.6.0... exiting" print "Electrum requires Python version >= 2.6.0... exiting"
sys.exit(1) sys.exit(1)
data_files=[ data_files = []
('/usr/share/applications/',['electrum.desktop']),
('/usr/share/app-install/icons/',['electrum.png']) if platform.system() != 'Windows':
] data_files += [
('/usr/share/applications/',['electrum.desktop']),
if not os.path.exists('locale'): ('/usr/share/app-install/icons/',['electrum.png'])
os.mkdir('locale') ]
if not os.path.exists('locale'):
for lang in os.listdir('locale'): os.mkdir('locale')
if os.path.exists('locale/%s/LC_MESSAGES/electrum.mo'%lang): for lang in os.listdir('locale'):
data_files.append( ('/usr/share/locale/%s/LC_MESSAGES'%lang, ['locale/%s/LC_MESSAGES/electrum.mo'%lang]) ) if os.path.exists('locale/%s/LC_MESSAGES/electrum.mo'%lang):
data_files.append( ('/usr/share/locale/%s/LC_MESSAGES'%lang, ['locale/%s/LC_MESSAGES/electrum.mo'%lang]) )
setup(name = "Electrum", setup(name = "Electrum",
version = version, version = version,

Loading…
Cancel
Save