[gnoduino] Run the Pixmaps command if pixmaps not found
- From: Lucian Langa <lucilanga src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnoduino] Run the Pixmaps command if pixmaps not found
- Date: Fri, 9 Sep 2011 20:50:12 +0000 (UTC)
commit e8f42bbe5f61ab350c9fba59af281e502f2861f2
Author: Claude Paroz <claude 2xlibre net>
Date: Thu Sep 8 20:40:23 2011 +0200
Run the Pixmaps command if pixmaps not found
setup.py | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/setup.py b/setup.py
index a8f0c1e..06e65a0 100644
--- a/setup.py
+++ b/setup.py
@@ -60,7 +60,6 @@ class installSchema(_install):
print "Installing schema has failed."
print "%s: %s" % (type(e), e)
sys.exit(1)
- _install.run(self)
class Pixmaps(cmd.Command):
"""Command to build pixmaps from svg sources."""
@@ -78,7 +77,10 @@ class Pixmaps(cmd.Command):
def run(self):
"""Build pixmap from svg sources."""
if not self.dry_run:
- subprocess.call("scripts/gen-pixmaps.sh")
+ retcode = subprocess.call("scripts/gen-pixmaps.sh")
+ if retcode != 0:
+ print "Error: Unable to convert images to PNG"
+ sys.exit(1)
compline = "scripts/gen_boards.py"
(run, sout) = runProg(compline)
@@ -101,11 +103,10 @@ data_files = [('share/gnoduino/ui', ['ui/main.ui', 'ui/arduino.xml']),
class install(_install):
def run(self):
if len(glob.glob('pixmaps/*.png')) == 0:
- print "Couldn't find pixmaps files."
- print "Please run 'python setup.py pixmaps' to build pixmap files."
- sys.exit(1)
+ Pixmaps(self.distribution).run()
# Run all sub-commands (at least those that need to be run)
_install.run(self)
+ installSchema(self.distribution).run()
"""we ship hardware module"""
for r,d,f in os.walk("hardware"):
@@ -136,7 +137,6 @@ setup(name='gnoduino',
cmdclass={
"pixmaps": Pixmaps,
"install": install,
- "install": installSchema
}
)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]