- Removed bloated debian patches
- Modified debian/rules to create both relational and relational-cli from the same python file - Modified relational_gui to have different behavior depending on its name - Do not try to pack examples directory for relational package - Edited make source target git-svn-id: http://galileo.dmi.unict.it/svn/relational/trunk@274 014f5005-505e-4b48-8d0a-63407b615a7c
This commit is contained in:
parent
f33d534fd1
commit
4b7a9272f6
5
Makefile
5
Makefile
@ -19,6 +19,7 @@ install:
|
|||||||
|
|
||||||
source: clean
|
source: clean
|
||||||
rm -rf /tmp/relational/
|
rm -rf /tmp/relational/
|
||||||
|
rm -rf /tmp/relational-*
|
||||||
mkdir /tmp/relational/
|
mkdir /tmp/relational/
|
||||||
cp -R * /tmp/relational/
|
cp -R * /tmp/relational/
|
||||||
rm -rf /tmp/relational/windows
|
rm -rf /tmp/relational/windows
|
||||||
@ -33,7 +34,9 @@ source: clean
|
|||||||
rm -rf /tmp/relational/relational_readline/.svn/
|
rm -rf /tmp/relational/relational_readline/.svn/
|
||||||
rm -rf /tmp/relational/test/.svn
|
rm -rf /tmp/relational/test/.svn
|
||||||
|
|
||||||
echo "cd /tmp ; tar -zcvvf relational.tar.gz relational/" | bash
|
#mv /tmp/relational /tmp/relational-`./relational_gui.py -v | grep Relational | cut -d" " -f2`
|
||||||
|
#(cd /tmp; tar -zcf relational.tar.gz relational-*/)
|
||||||
|
(cd /tmp; tar -zcf relational.tar.gz relational/)
|
||||||
mv /tmp/relational.tar.gz ./relational_`./relational_gui.py -v | grep Relational | cut -d" " -f2`.tar.gz
|
mv /tmp/relational.tar.gz ./relational_`./relational_gui.py -v | grep Relational | cut -d" " -f2`.tar.gz
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
|
6
debian/changelog
vendored
6
debian/changelog
vendored
@ -1,3 +1,9 @@
|
|||||||
|
relational (0.12-1) unstable; urgency=low
|
||||||
|
|
||||||
|
* New upstream release
|
||||||
|
|
||||||
|
-- Salvo 'LtWorf' Tomaselli <tiposchi@tiscali.it> Fri, 04 Mar 2011 13:15:06 +0100
|
||||||
|
|
||||||
relational (0.11-2) unstable; urgency=low
|
relational (0.11-2) unstable; urgency=low
|
||||||
|
|
||||||
* New package relational-cli
|
* New package relational-cli
|
||||||
|
150
debian/patches/debian-changes-0.11-2
vendored
150
debian/patches/debian-changes-0.11-2
vendored
@ -1,150 +0,0 @@
|
|||||||
Description: Upstream changes introduced in version 0.11-2
|
|
||||||
This patch has been created by dpkg-source during the package build.
|
|
||||||
Here's the last changelog entry, hopefully it gives details on why
|
|
||||||
those changes were made:
|
|
||||||
.
|
|
||||||
relational (0.11-2) unstable; urgency=low
|
|
||||||
.
|
|
||||||
* New package relational-cli
|
|
||||||
* Creates menu entry for relational
|
|
||||||
* Ships examples with the python-relational package
|
|
||||||
* Links examples from python-relational into /usr/share/doc/relational and
|
|
||||||
/usr/share/doc/relational-cli
|
|
||||||
* New maintainer (Closes: #590780)
|
|
||||||
.
|
|
||||||
The person named in the Author field signed this changelog entry.
|
|
||||||
Author: Salvo 'LtWorf' Tomaselli <tiposchi@tiscali.it>
|
|
||||||
Bug-Debian: http://bugs.debian.org/590780
|
|
||||||
|
|
||||||
---
|
|
||||||
The information above should follow the Patch Tagging Guidelines, please
|
|
||||||
checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
|
|
||||||
are templates for supplementary fields that you might want to add:
|
|
||||||
|
|
||||||
Origin: <vendor|upstream|other>, <url of original patch>
|
|
||||||
Bug: <url in upstream bugtracker>
|
|
||||||
Bug-Debian: http://bugs.debian.org/<bugnumber>
|
|
||||||
Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
|
|
||||||
Forwarded: <no|not-needed|url proving that it has been forwarded>
|
|
||||||
Reviewed-By: <name and email of someone who approved the patch>
|
|
||||||
Last-Update: <YYYY-MM-DD>
|
|
||||||
|
|
||||||
--- /dev/null
|
|
||||||
+++ relational-0.11/relational_cli.py
|
|
||||||
@@ -0,0 +1,116 @@
|
|
||||||
+#!/usr/bin/env python
|
|
||||||
+# -*- coding: utf-8 -*-
|
|
||||||
+# coding=UTF-8
|
|
||||||
+# Relational
|
|
||||||
+# Copyright (C) 2008 Salvo "LtWorf" Tomaselli
|
|
||||||
+#
|
|
||||||
+# Relational is free software: you can redistribute it and/or modify
|
|
||||||
+# it under the terms of the GNU General Public License as published by
|
|
||||||
+# the Free Software Foundation, either version 3 of the License, or
|
|
||||||
+# (at your option) any later version.
|
|
||||||
+#
|
|
||||||
+# This program is distributed in the hope that it will be useful,
|
|
||||||
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
+# GNU General Public License for more details.
|
|
||||||
+#
|
|
||||||
+# You should have received a copy of the GNU General Public License
|
|
||||||
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
+#
|
|
||||||
+# author Salvo "LtWorf" Tomaselli <tiposchi@tiscali.it>
|
|
||||||
+
|
|
||||||
+import sys
|
|
||||||
+import os
|
|
||||||
+import os.path
|
|
||||||
+import getopt
|
|
||||||
+from relational import relation, parser
|
|
||||||
+version="0.11"
|
|
||||||
+
|
|
||||||
+
|
|
||||||
+def printver(exit=True):
|
|
||||||
+ print "Relational %s" % version
|
|
||||||
+ print "Copyright (C) 2008 Salvo 'LtWorf' Tomaselli."
|
|
||||||
+ print
|
|
||||||
+ print "This program comes with ABSOLUTELY NO WARRANTY."
|
|
||||||
+ print "This is free software, and you are welcome to redistribute it"
|
|
||||||
+ print "under certain conditions."
|
|
||||||
+ print "For details see the GPLv3 Licese."
|
|
||||||
+ print
|
|
||||||
+ print "Written by Salvo 'LtWorf' Tomaselli <tiposchi@tiscali.it>"
|
|
||||||
+ print
|
|
||||||
+ print "http://galileo.dmi.unict.it/wiki/relational/doku.php"
|
|
||||||
+ if exit:
|
|
||||||
+ sys.exit(0)
|
|
||||||
+
|
|
||||||
+def printhelp(code=0):
|
|
||||||
+ print "Relational"
|
|
||||||
+ print
|
|
||||||
+ print "Usage: %s [options] [files]" % sys.argv[0]
|
|
||||||
+ print
|
|
||||||
+ print " -v Print version and exits"
|
|
||||||
+ print " -h Print this help and exits"
|
|
||||||
+ print " -q Uses QT user interface"
|
|
||||||
+ #print " -c Uses curses user interface"
|
|
||||||
+ print " -r Uses readline user interface (default)"
|
|
||||||
+ sys.exit(code)
|
|
||||||
+
|
|
||||||
+if __name__ == "__main__":
|
|
||||||
+ x11=False #Will not try to use the x11 interface
|
|
||||||
+
|
|
||||||
+ #Try to run the psyco optimizer
|
|
||||||
+ try:
|
|
||||||
+ import psyco
|
|
||||||
+ psyco.full()
|
|
||||||
+ except:
|
|
||||||
+ pass
|
|
||||||
+
|
|
||||||
+
|
|
||||||
+ #Getting command line
|
|
||||||
+ try:
|
|
||||||
+ switches,files=getopt.getopt(sys.argv[1:],"vhqr")
|
|
||||||
+ except:
|
|
||||||
+ printhelp(1)
|
|
||||||
+
|
|
||||||
+ for i in switches:
|
|
||||||
+ if i[0]=='-v':
|
|
||||||
+ printver()
|
|
||||||
+ elif i[0]=='-h':
|
|
||||||
+ printhelp()
|
|
||||||
+ elif i[0]=='-q':
|
|
||||||
+ x11=True
|
|
||||||
+ elif i[0]=='-r':
|
|
||||||
+ x11=False
|
|
||||||
+
|
|
||||||
+ if x11:
|
|
||||||
+ import sip
|
|
||||||
+ from PyQt4 import QtCore, QtGui
|
|
||||||
+ from relational_gui import maingui, about
|
|
||||||
+ about.version=version
|
|
||||||
+
|
|
||||||
+ app = QtGui.QApplication(sys.argv)
|
|
||||||
+ Form = QtGui.QWidget()
|
|
||||||
+
|
|
||||||
+ if os.name=='nt':
|
|
||||||
+ Form.setFont(QtGui.QFont("Dejavu Sans Bold"))
|
|
||||||
+
|
|
||||||
+ ui = maingui.Ui_Form()
|
|
||||||
+ ui.setupUi(Form)
|
|
||||||
+
|
|
||||||
+ for i in range(len(files)):
|
|
||||||
+ if not os.path.isfile(files[i]):
|
|
||||||
+ print >> sys.stderr, "%s is not a file" % files[i]
|
|
||||||
+ printhelp(12)
|
|
||||||
+ f=files[i].split('/')
|
|
||||||
+ defname=f[len(f)-1].lower()
|
|
||||||
+ if (defname.endswith(".csv") or defname.endswith(".tlb")): #removes the extension
|
|
||||||
+ defname=defname[:-4]
|
|
||||||
+ print 'Loading file "%s" with name "%s"' % (files[i],defname)
|
|
||||||
+ ui.loadRelation(files[i],defname)
|
|
||||||
+
|
|
||||||
+ Form.show()
|
|
||||||
+ sys.exit(app.exec_())
|
|
||||||
+ else:
|
|
||||||
+ printver(False)
|
|
||||||
+ import relational_readline.linegui
|
|
||||||
+ relational_readline.linegui.main(files)
|
|
||||||
+
|
|
1
debian/patches/series
vendored
1
debian/patches/series
vendored
@ -1 +0,0 @@
|
|||||||
debian-changes-0.11-2
|
|
1
debian/relational.examples
vendored
1
debian/relational.examples
vendored
@ -1 +0,0 @@
|
|||||||
samples
|
|
2
debian/rules
vendored
2
debian/rules
vendored
@ -18,5 +18,5 @@ override_dh_auto_install:
|
|||||||
|
|
||||||
override_dh_install:
|
override_dh_install:
|
||||||
install -D relational_gui.py debian/relational/usr/bin/relational
|
install -D relational_gui.py debian/relational/usr/bin/relational
|
||||||
install -D relational_cli.py debian/relational-cli/usr/bin/relational-cli
|
install -D relational_gui.py debian/relational-cli/usr/bin/relational-cli
|
||||||
dh_install
|
dh_install
|
||||||
|
@ -38,7 +38,7 @@ def printver(exit=True):
|
|||||||
print
|
print
|
||||||
print "Written by Salvo 'LtWorf' Tomaselli <tiposchi@tiscali.it>"
|
print "Written by Salvo 'LtWorf' Tomaselli <tiposchi@tiscali.it>"
|
||||||
print
|
print
|
||||||
print "http://galileo.dmi.unict.it/wiki/relational/doku.php"
|
print "http://galileo.dmi.unict.it/wiki/relational/"
|
||||||
if exit:
|
if exit:
|
||||||
sys.exit(0)
|
sys.exit(0)
|
||||||
|
|
||||||
@ -49,13 +49,20 @@ def printhelp(code=0):
|
|||||||
print
|
print
|
||||||
print " -v Print version and exits"
|
print " -v Print version and exits"
|
||||||
print " -h Print this help and exits"
|
print " -h Print this help and exits"
|
||||||
print " -q Uses QT user interface (default)"
|
|
||||||
#print " -c Uses curses user interface"
|
if sys.argv[0].endswith('relational-cli'):
|
||||||
print " -r Uses readline user interface"
|
print " -q Uses QT user interface"
|
||||||
|
print " -r Uses readline user interface (default)"
|
||||||
|
else:
|
||||||
|
print " -q Uses QT user interface (default)"
|
||||||
|
print " -r Uses readline user interface"
|
||||||
sys.exit(code)
|
sys.exit(code)
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
x11=True #Will try to use the x11 interface
|
if sys.argv[0].endswith('relational-cli'):
|
||||||
|
x11=False
|
||||||
|
else:
|
||||||
|
x11=True #Will try to use the x11 interface
|
||||||
|
|
||||||
#Getting command line
|
#Getting command line
|
||||||
try:
|
try:
|
||||||
@ -95,7 +102,7 @@ if __name__ == "__main__":
|
|||||||
printhelp(12)
|
printhelp(12)
|
||||||
f=files[i].split('/')
|
f=files[i].split('/')
|
||||||
defname=f[len(f)-1].lower()
|
defname=f[len(f)-1].lower()
|
||||||
if (defname.endswith(".csv") or defname.endswith(".tlb")): #removes the extension
|
if defname.endswith(".csv"): #removes the extension
|
||||||
defname=defname[:-4]
|
defname=defname[:-4]
|
||||||
print 'Loading file "%s" with name "%s"' % (files[i],defname)
|
print 'Loading file "%s" with name "%s"' % (files[i],defname)
|
||||||
ui.loadRelation(files[i],defname)
|
ui.loadRelation(files[i],defname)
|
||||||
|
Loading…
Reference in New Issue
Block a user