debian/0000755000000000000000000000000012225364737007201 5ustar debian/watch0000644000000000000000000000021011562067673010225 0ustar version=3 http://sqlkit.argolinux.org/misc/download.html http://sqlkit\.argolinux\.org/download/sqlkit-([0-9]\.[0-9]\.[0-9])\.tar\.gz debian/python-sqlkit-doc.docs0000644000000000000000000000010011717777431013437 0ustar doc/build/sphinx/html demo usr/lib/python2.*/dist-packages/demo debian/python-sqlkit-doc.links0000644000000000000000000000053711717777431013645 0ustar /usr/share/doc/python-sqlkit-doc/html /usr/share/doc/python-sqlkit/html /usr/share/doc/python-sqlkit-doc/demo /usr/share/doc/python-sqlkit/demo /usr/share/javascript/jquery/jquery.js /usr/share/doc/python-sqlkit-doc/html/_static/jquery.js /usr/share/sphinx/themes/basic/static/underscore.js /usr/share/doc/python-sqlkit-doc/html/_static/underscore.js debian/python-sqlkit.bash-completion0000777000000000000000000000000011721543413020773 2../sqledit.completionustar debian/sqledit.10000644000000000000000000000654711562067673010746 0ustar .\" Hey, EMACS: -*- nroff -*- .\" First parameter, NAME, should be all caps .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection .\" other parameters are allowed: see man(7), man(1) .TH PYTHON-SQLEDIT 1 "October 28, 2008" .\" Please adjust this date whenever revising the manpage. .\" .\" Some roff macros, for reference: .\" .nh disable hyphenation .\" .hy enable hyphenation .\" .ad l left justify .\" .ad b justify to both left and right margins .\" .nf disable filling .\" .fi enable filling .\" .br insert line break .\" .sp insert n+1 empty lines .\" for manpage-specific macros, see man(7) .SH NAME sqledit \- GUI to edit databases .SH SYNOPSIS .B sqledit .RI [ options ] [nick] [URI] [ -t table ] [ -m ] [ -u URL ] [ -d] [-D] .RI [ -f field_list] [ -l ] .SH DESCRIPTION \fBsqledit\fP is a GUI to edit database *data* (as opposed to database schemas). As sqledit is a GUI it's bettere explained in the html page, please visit http://sqlkit.argolinux.org/sqlkit/sqledit.html. When opened with no options you are presented an entry to fill the database URI or a button to start a demo (if found on your system) .SH OPTIONS These programs follow the usual GNU command line syntax, with long options starting with two dashes (`-'). A summary of options is included below. For a complete description, see the Info files. .TP .B \-h, \-\-help Show summary of options. .TP .B \-v, \-\-version Show version of program. .TP .B \-l, \-\-load Directly load data in tables when opened. .TP .B \-f, \-\-field_list only show the listed fields (comma separated list). .TP .B \-n, \-\-nick read options from nick definition (read NICKs below) .TP .B \-u, \-\-nick open the URL. Acceptable formats are any format acceptable by sqlalchemy: .nf engine://user:pass@host/dbname .fi Acceptable engines depend on which drivers you have in your systems. Have a look at http://www.sqlalchemy.org/trac/wiki/DatabaseNotes .TP .B \-o, \-\-order_by define the order by column .TP .B \-m, \-\-mask Open the sqltable with a mask (form) view. .TP .B \-T, \-\-sqltable Open the sqltable with a table view (default) .SH NICKs Sqledit allows you to write nicks in file .sqleditdb. A nick looks like the following: .nf [film] URL = sqlite:////home/sandro/src/django/siti/cinemino/cinemino.db [banca] URL = postgres://sandro:vicie@localhost:5432/banca table = conti_banche field_list = data tipo descrizione eu_in eu_out banca edit classe data_val order_by = data .fi If you define a nick you can call sqledit simply as: .fi sqledit film sqledit film -t director .fi At present you need to edit the nick by hand The programs are documented fully in the web site .B http://sqlkit.argolinux.org/sqlkit/sqledit.html .SH SQLKIT Sqledit is just an application that shows the power of the python package .B sqlkit. Programming directly with python you can build much more interesting interfaces. The demo tour show what can be done in very few lines of code. .SH EXAMPLES .fi sqledit sqledit postgres://localhost/sia sqledit postgres://localhost/sia -m (opens a mask view) .fi .SH TUTORIAL You can read a tutorial on the main features of sqledit at http://sqlkit.argolinux.org/sqlkit/tutorial.html .SH AUTHOR python-sqledit was written by Alssandro Dentella .PP This manual page was written by Alessandro Dentella debian/rules0000755000000000000000000000054611721543413010254 0ustar #!/usr/bin/make -f # -*- makefile -*- # Uncomment this to turn on verbose mode. # export DH_VERBOSE=1 %: dh $@ --with python2 override_dh_auto_build: python setup.py build_sphinx dh_auto_build override_dh_compress: dh_compress -X.py -X.sql override_dh_fixperms: dh_fixperms -Xdemo.py override_dh_auto_install: dh_auto_install dh_bash-completion debian/copyright0000644000000000000000000001147511721543413011132 0ustar Format: http://dep.debian.net/deps/dep5 Upstream-Name: sqlkit Upstream-Contact: Sandro Dentella Source: http://sqlkit.argolinux.org/misc/download.html Files: * Copyright: © 2005-2011 Sandro Dentella License: GPL-3+ Files: debian/* Copyright: © 2010 Pietro Battiston License: GPL-3+ Files: sqlkit/layout/dateedit.py Copyright: © 2005 Fabian Sturm, © 2009 Sandro Dentella License: LGPL-2.1 Files: doc/html/_static/jquery.js Copyright: Copyright © 2009 John Resig, The Dojo Foundation License: MIT or GPL-2 Files: doc/html/_static/searchtools.js doc/html/_static/doctools.js Copyright: © 2007-2008 Georg Brandl Armin Ronacher Josip Dzolonga, Gerold Penz, Vivake Gupta License: BSD Files: doc/html/_static/imgpreview.js Copyright: © 2009 James Padolsey License: MIT or GPL-3+ Files: doc/html/_static/galleria-1.2.2.min.js doc/html/_static/themes/classic/* Copyright: © 2010 Aino License: MIT Files: doc/html/_static/slides.min.jquery.js Copyright: © 2011 Nathan Searles License: MIT Files: doc/html/_static/jquery.nivo.slider.pack.js Copyright: © 2011, Gilbert Pellegrom License: MIT Files: doc/html/_static/sqlkit.css Copyright: © 2009 Armin Ronacher, Georg Brandl, Sandro Dentella License: MIT or GPL-3+ Files: doc/html/_static/jMenu.jquery.* doc/static/jMenu.jquery.* Copyright: © 2010 Surrel Mickael, Croissance Net License: MIT License: GPL-3+ This package 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, version 3 or later. . On Debian systems, the complete text of the GNU General Public License can be found in `/usr/share/common-licenses/GPL-3'. License: LGPL-2.1 This widget is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. . On Debian systems, the complete text of the GNU Lesser General Public License can be found in `/usr/share/common-licenses/GPL-2.1'. License: MIT Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: . The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. . THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. License: BSD All rights reserved. . Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: . * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. . * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. . THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE License: GPL-2 This package 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, version 2. . On Debian systems, the complete text of the GNU General Public License can be found in `/usr/share/common-licenses/GPL-2'. debian/python-sqlkit.install0000644000000000000000000000110011717777431013413 0ustar usr/bin/sqledit usr/share/applications usr/lib/python2.*/dist-packages/sqlkit/db usr/lib/python2.*/dist-packages/sqlkit/debug usr/lib/python2.*/dist-packages/sqlkit/exc.py usr/lib/python2.*/dist-packages/sqlkit/fields.py usr/lib/python2.*/dist-packages/sqlkit/__init__.py usr/lib/python2.*/dist-packages/sqlkit/layout usr/lib/python2.*/dist-packages/sqlkit/misc usr/lib/python2.*/dist-packages/sqlkit/scripts usr/lib/python2.*/dist-packages/sqlkit/widgets usr/lib/python2.*/dist-packages/sqlkit-*.egg-info usr/lib/python2.*/dist-packages/sqlkit/locale/*/LC_MESSAGES/sqlkit.mo debian/source/0000755000000000000000000000000011562067673010503 5ustar debian/source/format0000644000000000000000000000001411562067673011711 0ustar 3.0 (quilt) debian/patches/0000755000000000000000000000000011717777771010643 5ustar debian/patches/0001-do-not-check-dependencies.patch0000644000000000000000000000302611717777730017135 0ustar From: Pietro Battiston Date: Sat, 11 Feb 2012 02:42:25 +0100 Subject: do not check dependencies The upstream setup checks dependencies and fails if they are missing. This patch overrides this behaviour. --- setup.py | 31 ++----------------------------- 1 files changed, 2 insertions(+), 29 deletions(-) diff --git a/setup.py b/setup.py index 3aeb837..d433fe6 100755 --- a/setup.py +++ b/setup.py @@ -26,9 +26,8 @@ import sys try: from setuptools import setup, find_packages except ImportError, e: - from distribute_setup import use_setuptools - use_setuptools() - from setuptools import setup, find_packages + print "You need to install setuptools to use this setup.py script" + sys.exit(1) REQUIRES = [] @@ -37,32 +36,6 @@ for line in f: if line.startswith('__version__'): version = line.split()[2].strip("'") -if sys.argv[1] == 'install': - try: - import pygtk - pygtk.require('2.0') - except ImportError: - print "You need to install also pygtk and I was not able to work out" - print " a correct dependency in setup.py" - sys.exit(1) - -# setuptools really fails in understanding which packages are already installed -# pip is much better! -try: - import sqlalchemy -except ImportError: - REQUIRES = ['sqlalchemy >= 0.5.4, < 0.7', ] - -try: - import babel -except ImportError: - REQUIRES += ['Babel'] - -try: - import dateutil -except ImportError: - REQUIRES += ['python-dateutil'] - try: from sphinx.setup_command import BuildDoc -- debian/patches/0002-install-missing-files.patch0000644000000000000000000000241311717777730016453 0ustar From: Pietro Battiston Date: Sat, 11 Feb 2012 02:42:25 +0100 Subject: install missing files Upstream setup.py doesn't install documentation and .desktop files: this patch fixes it. --- setup.py | 19 +++++++++++++++++++ 1 files changed, 19 insertions(+), 0 deletions(-) diff --git a/setup.py b/setup.py index d433fe6..854b310 100755 --- a/setup.py +++ b/setup.py @@ -58,6 +58,24 @@ try: except ImportError: cmdclass = {} +def doc_files(): + """ + Create a list of documentation files. + """ + files = [] + walker = os.walk( 'doc/html' ) + while True: + try: + n = walker.next() + new_list = [] + files.append( (os.path.join( "share/doc/python-sqlkit-doc", n[0][9:] ), new_list) ) + for a_file in n[2]: + new_list.append( "%s/%s" % (n[0], a_file) ) + except StopIteration: + break + + return files + setup( name='sqlkit', @@ -68,6 +86,7 @@ setup( url='http://sqlkit.argolinux.org/', install_requires=REQUIRES, packages = find_packages('.'), + data_files =[('share/applications', ['sqlkit.desktop'])] + doc_files(), classifiers= classifiers.split('\n'), include_package_data=True, zip_safe=False, -- debian/patches/0003-demo-in-tmp-dir.patch0000644000000000000000000000524311717777771015152 0ustar From: Pietro Battiston Date: Sat, 11 Feb 2012 02:42:25 +0100 Subject: demo in tmp dir The demo creates a temporary database, as well as temporary files such as thumbnails: this is impossible if it is ran from within the system directory containing it. So a temporary directory, symlinking required files, is created and used. Forwarded: yes Last-Update: <2012-02-18> --- demo/sql/demo.py | 16 ++++++++++++++++ demo/sql/model/movies.py | 12 +++++++++--- 2 files changed, 25 insertions(+), 3 deletions(-) diff --git a/demo/sql/demo.py b/demo/sql/demo.py index 27d004c..0eea22a 100755 --- a/demo/sql/demo.py +++ b/demo/sql/demo.py @@ -55,6 +55,22 @@ class MissingExampleError(Exception): pass def init_db(): + if not os.access( model.DB_FILE, os.O_WRONLY ): + # No write access - work in a temporary directory + curdir = os.path.realpath( os.curdir ) + tempdir = model.DB_DIR + os.chdir( tempdir ) + dirs = ['model', 'images'] + for a_dir in ['model', 'images']: + os.mkdir( a_dir ) + for something in os.listdir( os.path.join( curdir, a_dir ) ): + real_path = os.path.join (curdir, a_dir, something ) + os.symlink( real_path, os.path.join( a_dir, something ) ) + for something in os.listdir( curdir ): + if something in dirs: + continue + real_path = os.path.join( curdir, something ) + os.symlink( real_path, something ) with closing(sqlite3.connect(model.DB_FILE)) as db: with open('model/schema.sql', 'r') as schema: db.cursor().executescript(schema.read()) diff --git a/demo/sql/model/movies.py b/demo/sql/model/movies.py index 6975ea4..84a1cf9 100644 --- a/demo/sql/model/movies.py +++ b/demo/sql/model/movies.py @@ -1,5 +1,7 @@ import os import tempfile +import atexit +import shutil from sqlalchemy.ext.declarative import declarative_base from sqlalchemy import Table, Column, ForeignKey @@ -10,7 +12,8 @@ from sqlkit.db.utils import Descr from sqlkit.db import proxy Base = declarative_base() -DB_FILE = os.path.join(tempfile.gettempdir(), 'db-%s.sqlite' % os.environ.get('USERNAME')) +DB_DIR = tempfile.mkdtemp() +DB_FILE = os.path.join(DB_DIR, 'db-%s.sqlite' % os.environ.get('USERNAME')) engine = "sqlite:///%s" % DB_FILE db = proxy.DbProxy(engine=engine, metadata=Base.metadata) @@ -116,5 +119,8 @@ class AllTypes(Base): bool = Column(Boolean, nullable=False) bool_null = Column(Boolean, nullable=True) # pickle = Column(PickleType()) - - + +def rm_tmpdir(): + shutil.rmtree( DB_DIR ) + +atexit.register( rm_tmpdir ) -- debian/patches/0004-Use-local-jquery.js-and-jquery-ui.js.patch0000644000000000000000000000260211717777730021117 0ustar From: Pietro Battiston Date: Sat, 11 Feb 2012 08:50:05 +0100 Subject: Use local jquery.js and jquery-ui.js The documentation provided by upstream retrieves two javascript libraries from a remote website. This patch replaces them with local versions. --- doc/templates/static_base.mako | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/templates/static_base.mako b/doc/templates/static_base.mako index 8e977d9..89c16d2 100644 --- a/doc/templates/static_base.mako +++ b/doc/templates/static_base.mako @@ -9,8 +9,8 @@ ${self.headers()} - - + + -- debian/patches/series0000644000000000000000000000022111717777730012046 0ustar 0001-do-not-check-dependencies.patch 0002-install-missing-files.patch 0003-demo-in-tmp-dir.patch 0004-Use-local-jquery.js-and-jquery-ui.js.patch debian/python-sqlkit.manpages0000644000000000000000000000002111562067673013537 0ustar debian/sqledit.1 debian/compat0000644000000000000000000000000211562067673010401 0ustar 7 debian/control0000644000000000000000000000434712225362226010603 0ustar Source: sqlkit Section: python Priority: optional Maintainer: Ubuntu Developers XSBC-Original-Maintainer: Pietro Battiston Homepage: http://sqlkit.argolinux.org Build-Depends: debhelper (>= 7.0.50~), python, python-setuptools, python-sphinx, python-gtk2, python-sqlalchemy, python-mako, python-pybabel, python-dateutil, bash-completion XS-Python-Version: >= 2.5 Standards-Version: 3.9.2 Vcs-Browser: http://git.debian.org/?p=collab-maint/sqlkit.git Vcs-Git: git://git.debian.org/git/collab-maint/sqlkit.git Package: python-sqlkit Architecture: all Depends: ${python:Depends}, ${misc:Depends}, python, python-dateutil, python-gtk2, python-sqlalchemy, python-pybabel, python-pkg-resources Recommends: python-mysqldb | python-psycopg2, python-sqlkit-doc Suggests: python-mysqldb, python-psycopg2, python-uno Breaks: ${python:Breaks} Description: Python tools and GUI application to view and edit databases content Main features of sqlkit: . - editor of databases in 2 modes: table & mask - based on SQLAlchemy: can cope with many different databases - very powerful filtering capabilities: . * each field can be used to filter visible records * date filtering possible also on relative basis (good for saved queries) . - completion both on local same field and foreign key fields - very easy way to draw a layout for mask views - sqledit: Python script to edit db - completely effortless editing of relationships - very easy way to set defaults - possibility to display totals in numeric fields - constraints: any possible sql constraint can be attached to a Mask or a Table. It can be expressed as a normal SQLAlchemy query or with django-like syntax - completely localized - easy way to add hooks and validation Package: python-sqlkit-doc Section: doc Architecture: all Depends: ${misc:Depends}, libjs-jquery, libjs-jquery-ui Recommends: python-sqlkit Description: documentation for python-sqlkit and sqledit application Sqlkit is a Python package which simplifies the creation of database-oriented graphic user interfaces. It provides also sqledit, an application to view and edit databases. . This package contains html documentation for sqledit and sqlkit. debian/changelog0000644000000000000000000000441312225364737011055 0ustar sqlkit (0.9.5-1ubuntu1) saucy; urgency=low * Drop Build-Depends on python-uno; it has relatively little effect on the binaries (causes /usr/share/doc/python-sqlkit-doc/html/_images/ootemplate-colors.png to be dropped), and current versions of LibreOffice require this to be ported to Python 3. See Debian #707342. -- Colin Watson Thu, 10 Oct 2013 00:41:12 +0100 sqlkit (0.9.5-1) unstable; urgency=low * New upstream release * Added python-uno to Build-Depends * Updated patches, moved to gbp-pq naming convention * Updated Debian policy version * Use local jquery.js and jquery-ui.js. * Use system underscore.js * Made debian/copyright compliant with DEP-5 * Removed unsupported brace expansion from dh files * Bash completion file is now installed -- Pietro Battiston Tue, 21 Feb 2012 21:21:16 +0100 sqlkit (0.9.4-1) UNRELEASED; urgency=low * New upstream release * Removed Anythingslider patch (now upstream). * Updated other patches. * Suggest python-mysqldb and python-psycopg2 * Fixed typo in debian/copyright -- Pietro Battiston Sun, 08 May 2011 23:57:24 +0200 sqlkit (0.9.3-2) UNRELEASED; urgency=low * Fixed links, permissions and removed compression for demo files. * Run the demo in /tmp for write permissions. * Recommend documentation, so that demo is usually available. * Patched documentation to manage missing AnythingSlider files. -- Pietro Battiston Tue, 08 Mar 2011 16:03:36 +0100 sqlkit (0.9.3-1) UNRELEASED; urgency=low * New upstream release. * Removed useless python-support from Build-Depends. * Removed now useless dependency on glade. * Split setup.py patch in two smaller ones. -- Pietro Battiston Fri, 04 Mar 2011 18:01:19 +0100 sqlkit (0.9.2.1-1) experimental; urgency=low * New upstream release - removes non-redistributable files. * Filled debian/copyright with missing information. * Documentation package now contains the demo. -- Pietro Battiston Mon, 31 Jan 2011 22:49:33 +0200 sqlkit (0.9.2-1) experimental; urgency=low * Initial release. (Closes: #544798) -- Pietro Battiston Mon, 20 Dec 2010 18:27:33 +0200