debian/0000755000000000000000000000000011647620277007202 5ustar debian/compat0000644000000000000000000000000211554550530010367 0ustar 7 debian/python-pyke-doc.doc-base0000644000000000000000000000072111554701360013621 0ustar Document: python-pyke-doc Title: Pyke Documentation Author: Bruce Frederiksen Section: Programming/Python Abstract: This documentation gives an introduction to Pyke. Pyke introduces a form of Logic Programming (inspired by Prolog) to the Python community by providing a knowledge-based inference engine (expert system) written in 100% Python. Format: html Index: /usr/share/doc/python-pyke-doc/html/index.html Files: /usr/share/doc/python-pyke-doc/html/*.html debian/control0000644000000000000000000000327011647534757010616 0ustar Source: pyke Maintainer: Debian Python Modules Team Uploaders: Daniele Tricoli Section: python Priority: optional Build-Depends: debhelper (>= 7.0.50~), python-all, python-nose, python-ply (>= 3.4), python-setuptools, python-support, python-wxgtk2.8, rest2web, Standards-Version: 3.9.2 Vcs-Svn: svn://svn.debian.org/python-modules/packages/pyke/trunk/ Vcs-Browser: http://svn.debian.org/viewsvn/python-modules/packages/pyke/trunk/ Homepage: http://pyke.sourceforge.net/ Package: python-pyke Architecture: all Depends: ${misc:Depends}, ${python:Depends}, ${python-ply:Depends} Suggests: python-wxgtk2.8 Description: Prolog-inspired Python logic programming toolkit Pyke introduces a form of Logic Programming (inspired by Prolog) to Python by providing a knowledge-based inference engine (or "expert system"). . Unlike Prolog, Pyke integrates with Python code allowing one to invoke Pyke from Python and intermingle Python statements and expressions within your expert system rules. Package: python-pyke-doc Section: doc Architecture: all Depends: ${misc:Depends} Description: Prolog-inspired Python logic programming toolkit (documentation) Pyke introduces a form of Logic Programming (inspired by Prolog) to Python by providing a knowledge-based inference engine (or "expert system"). . Unlike Prolog, Pyke integrates with Python code allowing one to invoke Pyke from Python and intermingle Python statements and expressions within your expert system rules. . This package contains the HTML documentation for Pyke. debian/patches/0000755000000000000000000000000011647620277010631 5ustar debian/patches/01_fix-hardcoded-path-in-doctest.patch0000644000000000000000000000126111566324316017647 0ustar Description: Change a hardcoded path in a doctest to a path that is guaranteed to exist on a POSIX system Author: Daniele Tricoli Forwarded: http://sourceforge.net/tracker/?func=detail&aid=3300218&group_id=207724&atid=1002827 --- a/pyke/special.py +++ b/pyke/special.py @@ -101,8 +101,8 @@ >>> out == cwd True >>> run_cmd(None, pattern.pattern_literal(('pwd',)), - ... pattern.pattern_literal('/home/bruce')) - (0, '/home/bruce\n', '') + ... pattern.pattern_literal('/dev')) + (0, '/dev\n', '') ''' stdin = None if stdin_pat is None \ else stdin_pat.as_data(pat_context) debian/patches/06_remove-tracking-javascript-and-remote-images.patch0000644000000000000000000000440511570554044022710 0ustar Description: Remove tracking javascript code and remote images PyKE documentation is used also on the project website so Google Analytics .js is retrieved for tracking. Furthermore project website uses some remote images. Author: Daniele Tricoli Forwarded: not-needed --- a/doc/source/template.txt +++ b/doc/source/template.txt @@ -45,14 +45,10 @@ Please Make a Donation:
- Support This Project

+ Support This Project

Hosted by:
- Get Python Knowledge Engine (PyKE) at SourceForge.net. Fast, secure and Free Open Source software downloads + Python Knowledge Engine (PyKE) at SourceForge.net @@ -103,18 +99,6 @@ #> - - --- a/doc/source/PyCon2008-paper.txt +++ b/doc/source/PyCon2008-paper.txt @@ -602,8 +602,7 @@
- Creative Commons License + Creative Commons License This paper is licensed under a `Creative Commons Attribution 3.0 Unported debian/patches/03_use-sed-instead-of-ed.patch0000644000000000000000000000111011566324316016122 0ustar Description: Use sed instead of ed to strip target links Author: Daniele Tricoli Forwarded: http://sourceforge.net/tracker/?func=detail&aid=3302698&group_id=207724&atid=1002827 --- a/doc/source/bin/strip_links +++ b/doc/source/bin/strip_links @@ -27,12 +27,7 @@ if true then mtime=`stat -c '%y' "$filename"` - ed -s "$filename" <<-'!' - H - /^\.\. ADD_LINKS MARKER$/,$d - w - q - ! + sed -i '/^\.\. ADD_LINKS MARKER$/,$d' "$filename" # $; # hush! # ?^[ ]*$?; # hush! # .,$d debian/patches/05_do-not-use-embedded-ply.patch0000644000000000000000000000237011572155027016474 0ustar Description: Do not use embedded copy of python-ply Author: Daniele Tricoli Forwarded: not-needed --- a/pyke/krb_compiler/kfbparser.py +++ b/pyke/krb_compiler/kfbparser.py @@ -26,7 +26,7 @@ from __future__ import with_statement import os, os.path -from pyke.krb_compiler.ply import yacc +from ply import yacc from pyke.krb_compiler import scanner from pyke import fact_base --- a/pyke/krb_compiler/krbparser.py +++ b/pyke/krb_compiler/krbparser.py @@ -28,7 +28,7 @@ import itertools import warnings import os, os.path -from pyke.krb_compiler.ply import yacc +from ply import yacc from pyke.krb_compiler import scanner from pyke import pattern, contexts --- a/pyke/krb_compiler/scanner.py +++ b/pyke/krb_compiler/scanner.py @@ -29,7 +29,7 @@ import os, os.path import sys import re -from pyke.krb_compiler.ply import lex +from ply import lex debug=0 --- a/setup.py +++ b/setup.py @@ -5,10 +5,9 @@ setup( name = "pyke", version = "1.1.1", - packages = ['pyke', 'pyke.krb_compiler', 'pyke.krb_compiler.ply'], + packages = ['pyke', 'pyke.krb_compiler'], package_data = { 'pyke.krb_compiler': ['*.krb'], - 'pyke.krb_compiler.ply': ['README', 'README.pyke'], }, # old setuptools stuff: debian/patches/07_disable_check_tables.patch0000644000000000000000000000334411572155027016247 0ustar Description: On Debian, tables are regenerated at built time so we can skip check_tables. Proper debug path inside python-ply generated tables will not be reset. Author: Jakub Wilk Forwarded: not-needed --- a/pyke/krb_compiler/kfbparser.py +++ b/pyke/krb_compiler/kfbparser.py @@ -121,7 +121,8 @@ debug=debug, debugfile='kfbparser.yacc.out', outputdir=outputdir) else: - if check_tables: + if False: + # On Debian systems, check_tables is ignored. kfbparser_mtime = os.path.getmtime(this_module.__file__) tables_name = os.path.join(outputdir, 'kfbparser_tables.py') try: --- a/pyke/krb_compiler/krbparser.py +++ b/pyke/krb_compiler/krbparser.py @@ -564,7 +564,8 @@ debug=debug, debugfile='krbparser.yacc.out', outputdir=outputdir) else: - if check_tables: + if False: + # On Debian systems, check_tables is ignored. krbparser_mtime = os.path.getmtime(this_module.__file__) tables_name = os.path.join(outputdir, 'krbparser_tables.py') try: --- a/pyke/krb_compiler/scanner.py +++ b/pyke/krb_compiler/scanner.py @@ -674,7 +674,8 @@ if debug_param: lexer = lex.lex(module=this_module, debug=1) else: - if check_tables: + if False: + # On Debian systems, check_tables is ignored. scanner_mtime = os.path.getmtime(this_module.__file__) tables_name = \ os.path.join(os.path.dirname(this_module.__file__), debian/patches/series0000644000000000000000000000040411572155027012035 0ustar 01_fix-hardcoded-path-in-doctest.patch 02_fix-insecure-temporary-file-use.patch 03_use-sed-instead-of-ed.patch 04_fix-shorter-float-repr.patch 05_do-not-use-embedded-ply.patch 06_remove-tracking-javascript-and-remote-images.patch 07_disable_check_tables.patch debian/patches/02_fix-insecure-temporary-file-use.patch0000644000000000000000000000071411566324316020300 0ustar Description: Create temporary file with mktemp Author: Daniele Tricoli Forwarded: http://sourceforge.net/tracker/?func=detail&aid=3300223&group_id=207724&atid=1002827 --- a/doc/source/bin/add_links +++ b/doc/source/bin/add_links @@ -5,7 +5,7 @@ # This must be executed in the doc/source directory! MASTER_LINKS=links -TMP_FILE=/tmp/add_links.$$ +TMP_FILE=$(mktemp /tmp/add_links.XXXXXXXXXX) usage() { echo "usage: add_links" >&2 debian/patches/04_fix-shorter-float-repr.patch0000644000000000000000000000155511566324316016501 0ustar Description: Fix shorter float repr introduced by python2.7 Author: Jakub Wilk Forwarded: http://sourceforge.net/tracker/?func=detail&aid=3302693&group_id=207724&atid=1002827 --- a/pyke/krb_compiler/scanner.py +++ b/pyke/krb_compiler/scanner.py @@ -27,6 +27,8 @@ from __future__ import with_statement import string import os, os.path +import sys +import re from pyke.krb_compiler.ply import lex debug=0 @@ -625,6 +627,11 @@ with open(filename) as f: tokenize(f.read()) +if sys.version_info >= (2, 7): + tokenize_file.__doc__ = re.sub('[0-9]+[.][0-9]+(e-?[0-9]+)?', + lambda m: repr(float(m.group())), + tokenize_file.__doc__) + def syntaxerror_params(pos = None, lineno = None): ''' Returns (filename, lineno, column, line) for use in as the second debian/copyright0000644000000000000000000000632611647537435011147 0ustar Format: http://anonscm.debian.org/viewvc/dep/web/deps/dep5.mdwn?revision=174 Upstream-Name: PyKE Upstream-Contact: Bruce Frederiksen Source: http://pyke.sourceforge.net/ Files: * Copyright: © 2007, 2008 Bruce Frederiksen License: Expat Files: pyke/krb_compiler/ply/* Copyright: © 2001-2009 David M. Beazley (Dabeaz LLC) License: BSD-3-clause 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. * Neither the name of the David Beazley or Dabeaz LLC may be used to endorse or promote products derived from this software without specific prior written permission. . 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 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. Files: doc/html/stylesheets/rest.css Copyright: © 2005 Ian Bicking, Michael Foord License: public-domain This stylesheet has been placed in the public domain. Files: debian/* Copyright: © 2008-2010 Chris Lamb Copyright: © 2011 Daniele Tricoli License: Expat Files: debian/patches/04_fix-shorter-float-repr.patch Copyright: © 2011 Jakub Wilk License: Expat License: Expat 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. debian/python-pyke-doc.docs0000644000000000000000000000001211554616116013071 0ustar doc/html/ debian/python-pyke.install0000644000000000000000000000000511607020012013025 0ustar usr/ debian/python-pyke.docs0000644000000000000000000000001311554726440012331 0ustar README.txt debian/watch0000644000000000000000000000006611554550530010224 0ustar version=2 http://sf.net/pyke/pyke-(.+)\.(tar\.gz|zip) debian/python-pyke-doc.examples0000644000000000000000000000001311554550530013755 0ustar examples/* debian/changelog0000644000000000000000000001364311647620272011056 0ustar pyke (1.1.1-3) unstable; urgency=low [ Daniele Tricoli ] * debian/control - Dropped alternative dependency on python-wxgtk2.6 (Closes: #645893) * debian/copyright - Fixed lintian warning about missing license paragraph [ Jakub Wilk ] * Correct metadata version in egg-info files (to work around bug #645125). -- Daniele Tricoli Wed, 19 Oct 2011 21:10:48 +0200 pyke (1.1.1-2) unstable; urgency=low * debian/control - Removed Chris and added Debian Python Modules Team to Maintainer - Added myself to Uploaders (Closes: #590777) - Switched Vcs-* fields to DPMT subversion repository - Bumped Standards-Version to 3.9.2 (no changes needed) - Dropped Breaks fields: package pyke was never part of a stable release so they are not needed in python-pyke - Switched to python-all as build-dep to build pyke for all supported python versions - Moved python-setuptools and python-support from Build-Depends-Indep to Build-Depends - Added python-nose, python-wxgtk2.{6,8} as build-dep to run tests at build time - Added rest2web as build-dep to build documentation - Added python-ply (>= 3.4) as build-dep to be able to use dh_python-ply and added ${python-ply:Depends} dependency * debian/python-pyke-doc.docs - Renamed pyke-doc.docs to python-pyke-doc.docs * debian/python-pyke-doc.doc-base - Registered documentation provided by python-pyke-doc using doc-base * debian/python-pyke-doc.links - Provided symlinks to documentation inside /usr/share/doc/python-pyke so users won't have to remember whether the documentation was split into a separate package or not * debian/python-pyke.docs - Added README.txt * debian/rules - Added override_dh_installchangelogs to install the upstream changelog: RELEASE_NOTES-1.txt - Added override_dh_installdocs to build documentation from source - Added override_dh_auto_test to run doctests at build time using python-nose - Added override_dh_auto_configure to: 1. Remove embedded copy of python-ply from the package. Thanks to Jakub Wilk for the report. (Closes: #555363) 2. Regenerate python-ply cached tables 3. Set proper debug path inside python-ply generated tables - Added override_dh_gencontrol to use dh_python-ply - Added override_dh_examples to not ship testall.config files. They are used by doctest-tools which is not packaged for Debian * debian/clean - Added to remove python-ply cached tables shipped in upstream tarball * debian/copyright - Made DEP5 compliant * debian/patches/01-fixed-hardcoded-path-in-doctest.patch - Change a hardcoded path in a doctest to a path that is guaranteed to exist on a POSIX system * debian/patches/02_fix-insecure-temporary-file-use.patch - Use mktemp to create temporary file * debian/patches/03_use-sed-instead-of-ed.patch - Use sed instead of ed to strip target links * debian/patches/04_fix-shorter-float-repr.patch - Added patch by Jakub Wilk using docstring substitution * debian/patches/05_do-not-use-embedded-ply.patch - Do not use embedded copy of python-ply * debian/patches/06_remove-tracking-javascript-and-remote-images.patch - Remove tracking javascript code and remote images * debian/patches/07_disable_check_tables.patch - Added patch by Jakub Wilk to skip check_tables: python-ply tables are regenerated at built time * debian/source/options - Added extend-diff-ignore = "(^|/)doc/html/" not generate diff for changes inside doc/html/: these changes are due to 06_remove-tracking-javascript-and-remote-images.patch and are wanted -- Daniele Tricoli Tue, 12 Jul 2011 20:18:50 +0200 pyke (1.1.1-1) unstable; urgency=low * New upstream release. * Move to '3.0 (quilt)' source format. * Bump Standards-Version to 3.9.1. * Prefer Breaks over Conflicts. -- Chris Lamb Sun, 01 Aug 2010 17:20:23 -0400 pyke (1.0.4-1) unstable; urgency=low * New upstream release (Closes: #556530) * Update debian/watch to find .zip releases. * Bump Build-Depends on debhelper to 7.0.50~ for override_* targets. * Bump Standards-Version to 3.8.3. -- Chris Lamb Tue, 01 Dec 2009 01:16:24 +0000 pyke (1.0.2-1) unstable; urgency=low * New upstream release. * Bump Standards-Version to 3.8.1. * Remove text files /usr/pyke after building. * Use embedded version of python-ply so that we do not have to depend on a particular version. - Update debian/copyright. - Drop Depends: on python-ply. -- Chris Lamb Thu, 07 May 2009 23:17:52 +0100 pyke (0.7-1) unstable; urgency=low * New upstream release. * Update addresses for Git repositories. -- Chris Lamb Sat, 21 Feb 2009 12:14:55 +0000 pyke (0.6-2) unstable; urgency=low * Add python-ply to Depends of python-pyke. Thanks to Piotr Ożarowski (piotr). * Add python-wxgtk2.8 as an alternative Suggests to python-wxgtk2.6. -- Chris Lamb Thu, 08 Jan 2009 21:58:42 +0000 pyke (0.6-1) unstable; urgency=low * New upstream release. * Rename binary packages from pyke{,-doc} => python-pyke{,-doc} to adhere to Python module policy. - Add relevant Conflicts lines to binary stanzas. * Move examples to -doc package. * Add python-setuptools to Build-Depends to ensure ez_setup does attempt to download it from the internet. Issue found by (sourceful) upload to Ubuntu FTBFS. Thanks to Piotr Ożarowski (piotr) and Scott Kitterman . (Closes: #511242) -- Chris Lamb Thu, 08 Jan 2009 21:39:11 +0000 pyke (0.5-1) unstable; urgency=low * New upstream release. -- Chris Lamb Mon, 29 Dec 2008 20:58:36 +0000 pyke (0.4-1) unstable; urgency=low * Initial release. (Closes: #457243) -- Chris Lamb Wed, 05 Nov 2008 20:46:11 +0000 debian/clean0000644000000000000000000000016111571144665010203 0ustar pyke/krb_compiler/kfbparser_tables.py pyke/krb_compiler/krbparser_tables.py pyke/krb_compiler/scanner_tables.py debian/source/0000755000000000000000000000000011647620277010502 5ustar debian/source/format0000644000000000000000000000001411554550530011677 0ustar 3.0 (quilt) debian/source/options0000644000000000000000000000027411571546245012121 0ustar # Do not generate diff for changes inside doc/html/: these changes are due to # 06_remove-tracking-javascript-and-remote-images.patch and are wanted. extend-diff-ignore = "(^|/)doc/html/" debian/python-pyke-doc.links0000644000000000000000000000021411570542013013255 0ustar usr/share/doc/python-pyke-doc/html usr/share/doc/python-pyke/html usr/share/doc/python-pyke-doc/examples usr/share/doc/python-pyke/examples debian/rules0000755000000000000000000000361311647620001010246 0ustar #!/usr/bin/make -f %: dh $@ override_dh_auto_configure: rm -rf pyke/krb_compiler/ply/ pyke/krb_compiler/*_tables.py # Regenerating python-ply cached tables python -c "from pyke.krb_compiler import kfbparser, krbparser, scanner; \ scanner.init(scanner, 0, True); \ krbparser.init(krbparser, True); \ kfbparser.init(kfbparser, True)" # Set the correct debug path inside tables sed -i 's:pyke/krb_compiler:/usr/share/pyshared/pyke/krb_compiler:' \ pyke/krb_compiler/*_tables.py override_dh_auto_test: # Run tests twice to make sure that all of the tests run properly # whether they have to compile the knowledge base sources or not. # Compilation of the knowledge base will occur on first run. ifeq ($(filter nocheck,$(DEB_BUILD_OPTIONS)),) set -e; \ for python in $(shell pyversions -r); do \ $$python /usr/bin/nosetests --with-doctest pyke/; \ $$python /usr/bin/nosetests --with-doctest pyke/; \ rm -rf compiled_krb/; \ done endif override_dh_auto_install: dh_auto_install # Correct Metadata-Version; see bug #645125 find debian/tmp/ -name '*.egg-info' \ -exec sed -i -e 's/^\(Metadata-Version:\) 1.0$$/\1 1.1/' {} + override_dh_installchangelogs: dh_installchangelogs RELEASE_NOTES-1.txt upstream override_dh_installdocs: # Preserve stylesheets moving outside built documentation mv doc/html/stylesheets doc/ # Remove built documentation shipped in upstream package rm -rf doc/html/ # Add target links using upstream script cd doc/source; bin/add_links # Build documentation from source cd doc/; /usr/bin/r2w # Restore documentation source cd doc/source; bin/strip_links # Copy documentation images cp -r doc/source/images doc/html # Restore documentation stylesheets mv doc/stylesheets doc/html/ dh_installdocs override_dh_installexamples: dh_installexamples -Xtestall.config override_dh_gencontrol: dh_python-ply -p python-pyke pyke/krb_compiler/*_tables.py dh_gencontrol debian/pyversions0000644000000000000000000000000511607033102011316 0ustar 2.5-