diff options
author | Code Raguet <ignacio.code@gmail.com> | 2013-07-25 18:47:38 (GMT) |
---|---|---|
committer | Code Raguet <ignacio.code@gmail.com> | 2013-07-25 18:47:38 (GMT) |
commit | b4ead7311827cf9e035687b4841e1a85a3c54a8d (patch) | |
tree | b18b95a9d41529a708e9b87db70c97077d620bd0 | |
parent | f7d18490894ca9f23fbeb66a9f20b6b9599d24eb (diff) |
Revert "Setup files for gtk dist"
This reverts commit 6daaf11eb9ba0c9b99b8ed06c5b549112346a023.
-rw-r--r-- | CeibalEncuesta/gtk2/CeibalEncuesta/CeibalEncuestaUninstall.py | 29 | ||||
-rw-r--r-- | CeibalEncuesta/gtk2/CeibalEncuesta/__init__.py | 0 | ||||
-rw-r--r-- | CeibalEncuesta/gtk2/MANIFEST | 55 | ||||
-rwxr-xr-x | CeibalEncuesta/gtk2/scripts/ceibalencuesta | 3 | ||||
-rwxr-xr-x | CeibalEncuesta/gtk2/scripts/ceibalencuestauninstall | 3 | ||||
-rw-r--r-- | CeibalEncuesta/gtk2/setup.cfg | 2 | ||||
-rw-r--r-- | CeibalEncuesta/gtk2/setup.py | 63 |
7 files changed, 155 insertions, 0 deletions
diff --git a/CeibalEncuesta/gtk2/CeibalEncuesta/CeibalEncuestaUninstall.py b/CeibalEncuesta/gtk2/CeibalEncuesta/CeibalEncuestaUninstall.py new file mode 100644 index 0000000..fc537fa --- /dev/null +++ b/CeibalEncuesta/gtk2/CeibalEncuesta/CeibalEncuestaUninstall.py @@ -0,0 +1,29 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- +import os +import commands +import site + + +USER_SITE_PACKAGES = site.getusersitepackages() +USER_BASE = site.getuserbase() +USER_HOME = "%s/../" % USER_BASE +ESCRITORIO_PATH = '%sEscritorio/' % USER_HOME +DESKTOP_PATH = '%sDesktop/' % USER_HOME + +out = "" +out += "\n" + commands.getoutput('rm -r ' + USER_SITE_PACKAGES + '/CeibalEncuesta') +out += "\n" + commands.getoutput('rm -r ' + USER_SITE_PACKAGES + '/CeibalEncuesta-*.egg-info') +out += "\n" + commands.getoutput('rm ' + USER_BASE + '/share/applications/CeibalEncuesta.desktop') +out += "\n" + commands.getoutput('rm ' + USER_BASE + '/bin/ceibalencuesta') +commands.getoutput('rm ' + USER_BASE + '/bin/ceibalencuestauninstall') + +if os.path.exists('%sCeibalEncuesta.desktop' % ESCRITORIO_PATH): + commands.getstatusoutput('rm %sCeibalEncuesta.desktop' % ESCRITORIO_PATH) + +if os.path.exists('%sCeibalEncuesta.desktop' % DESKTOP_PATH): + commands.getstatusoutput('rm %sCeibalEncuesta.desktop' % DESKTOP_PATH) + +success = out.strip("\n") + +print out if len(success) != 0 else "InstalaciĆ³n finalizada con exito." diff --git a/CeibalEncuesta/gtk2/CeibalEncuesta/__init__.py b/CeibalEncuesta/gtk2/CeibalEncuesta/__init__.py new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/CeibalEncuesta/gtk2/CeibalEncuesta/__init__.py diff --git a/CeibalEncuesta/gtk2/MANIFEST b/CeibalEncuesta/gtk2/MANIFEST new file mode 100644 index 0000000..d549746 --- /dev/null +++ b/CeibalEncuesta/gtk2/MANIFEST @@ -0,0 +1,55 @@ +scripts/ceibalencuesta +scripts/ceibalencuestauninstall +MANIFEST +setup.py +setup.cfg +data/.empty +CeibalEncuesta/CeibalEncuestaUninstall.py +CeibalEncuesta/__init__.py +CeibalEncuesta/CeibalEncuesta.py +CeibalEncuesta/Widgets.py +CeibalEncuesta/Globales.py +CeibalEncuesta/Iconos/ceibal.png +CeibalEncuesta/Iconos/screen.png +CeibalEncuesta/Iconos/next-page-active.png +CeibalEncuesta/Iconos/next-page-down.png +CeibalEncuesta/Iconos/next-page-inactive.png +CeibalEncuesta/Iconos/next-page-over.png +CeibalEncuesta/Iconos/prev-page-active.png +CeibalEncuesta/Iconos/prev-page-down.png +CeibalEncuesta/Iconos/prev-page-over.png +CeibalEncuesta/chardet/big5freq.py +CeibalEncuesta/chardet/big5prober.py +CeibalEncuesta/chardet/chardistribution.py +CeibalEncuesta/chardet/charsetgroupprober.py +CeibalEncuesta/chardet/charsetprober.py +CeibalEncuesta/chardet/codingstatemachine.py +CeibalEncuesta/chardet/constants.py +CeibalEncuesta/chardet/escprober.py +CeibalEncuesta/chardet/escsm.py +CeibalEncuesta/chardet/eucjpprober.py +CeibalEncuesta/chardet/euckrfreq.py +CeibalEncuesta/chardet/euckrprober.py +CeibalEncuesta/chardet/euctwfreq.py +CeibalEncuesta/chardet/euctwprober.py +CeibalEncuesta/chardet/gb2312freq.py +CeibalEncuesta/chardet/gb2312prober.py +CeibalEncuesta/chardet/hebrewprober.py +CeibalEncuesta/chardet/__init__.py +CeibalEncuesta/chardet/jisfreq.py +CeibalEncuesta/chardet/jpcntx.py +CeibalEncuesta/chardet/langbulgarianmodel.py +CeibalEncuesta/chardet/langcyrillicmodel.py +CeibalEncuesta/chardet/langgreekmodel.py +CeibalEncuesta/chardet/langhebrewmodel.py +CeibalEncuesta/chardet/langhungarianmodel.py +CeibalEncuesta/chardet/langthaimodel.py +CeibalEncuesta/chardet/latin1prober.py +CeibalEncuesta/chardet/mbcharsetprober.py +CeibalEncuesta/chardet/mbcsgroupprober.py +CeibalEncuesta/chardet/mbcssm.py +CeibalEncuesta/chardet/sbcharsetprober.py +CeibalEncuesta/chardet/sbcsgroupprober.py +CeibalEncuesta/chardet/sjisprober.py +CeibalEncuesta/chardet/universaldetector.py +CeibalEncuesta/chardet/utf8prober.py diff --git a/CeibalEncuesta/gtk2/scripts/ceibalencuesta b/CeibalEncuesta/gtk2/scripts/ceibalencuesta new file mode 100755 index 0000000..94f645e --- /dev/null +++ b/CeibalEncuesta/gtk2/scripts/ceibalencuesta @@ -0,0 +1,3 @@ +#!/bin/sh + +exec "/usr/bin/python" "$HOME/.local/lib/python2.7/site-packages/CeibalEncuesta/CeibalEncuesta.py" "$@" diff --git a/CeibalEncuesta/gtk2/scripts/ceibalencuestauninstall b/CeibalEncuesta/gtk2/scripts/ceibalencuestauninstall new file mode 100755 index 0000000..76771f8 --- /dev/null +++ b/CeibalEncuesta/gtk2/scripts/ceibalencuestauninstall @@ -0,0 +1,3 @@ +#!/bin/sh + +exec "/usr/bin/python" "$HOME/.local/lib/python2.7/site-packages/CeibalEncuesta/CeibalEncuestaUninstall.py" "$@" diff --git a/CeibalEncuesta/gtk2/setup.cfg b/CeibalEncuesta/gtk2/setup.cfg new file mode 100644 index 0000000..38f0401 --- /dev/null +++ b/CeibalEncuesta/gtk2/setup.cfg @@ -0,0 +1,2 @@ +[install] +user=1 diff --git a/CeibalEncuesta/gtk2/setup.py b/CeibalEncuesta/gtk2/setup.py new file mode 100644 index 0000000..a05e390 --- /dev/null +++ b/CeibalEncuesta/gtk2/setup.py @@ -0,0 +1,63 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- +import os +import site +import codecs +import commands + +from distutils.core import setup + +APP_VERSION = "4.8" + + +USER_BASE = site.getuserbase() +USER_HOME = "%s/../" % USER_BASE +USER_SITE_PACKAGES = site.getusersitepackages() +APLICATION_PATH = USER_BASE + '/share/applications/' +ESCRITORIO_PATH = '%sEscritorio/' % USER_HOME +DESKTOP_PATH = '%sDesktop/' % USER_HOME + + +desktop_entry = """[Desktop Entry] +Version=%s +Type=Application +Terminal=false +Exec=%s/bin/ceibalencuesta +Name=CeibalEncuesta +Icon=%s/CeibalEncuesta/Iconos/ceibal.png +""" % (APP_VERSION, USER_BASE, USER_SITE_PACKAGES) + + +with codecs.open("data/CeibalEncuesta.desktop", "w", "utf-8") as f: + f.write(desktop_entry) + f.close() + + +setup( + name="CeibalEncuesta", + version=APP_VERSION, + + scripts=["scripts/ceibalencuesta", "scripts/ceibalencuestauninstall"], + + packages=["CeibalEncuesta"], + package_dir={'CeibalEncuesta': 'CeibalEncuesta'}, + package_data={'CeibalEncuesta': ['Iconos/*', 'chardet/*']}, + + data_files=[ + (APLICATION_PATH, ["data/CeibalEncuesta.desktop"]), + ] +) + + +DESKTOP_ENTRY_PATH = "%sCeibalEncuesta.desktop" % APLICATION_PATH + +commands.getoutput('chmod -R 755 %s/ceibalencuesta' % USER_BASE) +commands.getoutput('chmod 755 %s' % DESKTOP_ENTRY_PATH) + +if os.path.exists(ESCRITORIO_PATH): + status, out = commands.getstatusoutput( + 'cp %s %s' % (DESKTOP_ENTRY_PATH, ESCRITORIO_PATH)) + +if os.path.exists(DESKTOP_PATH): + status, out = commands.getstatusoutput( + 'cp %s %s' % (DESKTOP_ENTRY_PATH, DESKTOP_PATH)) |