Commit 2b092e58 authored by Luke Faraone's avatar Luke Faraone

Imported Debian patch 0.3.3-1

include AUTHORS COPYING NEWS
recursive-include tests *.txt *.py
recursive-include gasp/images *.png
python-gasp (0.3.3) stable; urgency=low
* Work around xlib threadinb bug (LP: #41950)
* Correctly handle pressed keys (LP: #533413)
-- Luke Faraone <luke@faraone.cc> Mon, 08 Mar 2010 23:07:06 -0500
python-gasp (0.3.2~win32-1) stable; urgency=low
* Import gobject.GError instead of glib.GError on Windows or when glib is
unavailable. (NO CHANGE ON OTHER PLATFORMS)
-- Luke Faraone <luke@faraone.cc> Fri, 28 Aug 2009 16:29:41 -0400
python-gasp (0.3.2) stable; urgency=low
* No longer raise an exception when removing an object not on the screen,
......
Metadata-Version: 1.0
Name: gasp
Version: 0.3.3
Summary: GASP provides a simple, procedural graphics API for beginning students using Python
Home-page: http://wiki.laptop.org/go/GASP
Author: Luke Faraone
Author-email: luke@faraoane.cc
License: GPLv3+
Download-URL: https://launchpad.net/gasp-code/+download
Description: UNKNOWN
Keywords: gasp
Platform: UNKNOWN
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: X11 Applications :: GTK
Classifier: Environment :: Win32 (MS Windows)
Classifier: Intended Audience :: Education
Classifier: License :: OSI Approved :: GNU General Public License (GPL)
Classifier: Programming Language :: Python
Classifier: Natural Language :: English
Classifier: Operating System :: OS Independent
Classifier: Topic :: Education :: Computer Aided Instruction (CAI)
Classifier: Topic :: Multimedia :: Graphics
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Software Development :: User Interfaces
python-gasp (0.3.3-1) unstable; urgency=low
[ Luca Falavigna ]
* Optionally depend on python (>= 2.6) with python-multiprocessing,
multiprocessing module is part of Python 2.6.
[ Jakub Wilk ]
* Fix watch file.
[ Luke Faraone ]
* New upstream version. (LP: #419501)
* Bump standards version to 3.8.4.
* debian/rules: Change get-orig-source to reflect upstream
-- Luke Faraone <luke@faraone.cc> Thu, 11 Mar 2010 12:16:43 -0500
python-gasp (0.3.2-1) unstable; urgency=low
* New upstream version
......
......@@ -5,14 +5,14 @@ Maintainer: Luke Faraone <luke@faraone.cc>
Uploaders: Debian Python Modules Team <python-modules-team@lists.alioth.debian.org>
Build-Depends: python (>= 2.4), debhelper (>= 5), cdbs (>= 0.4.49), python-setuptools,
Build-Depends-indep: python-support (>= 0.5.3), patchutils, bzr
Standards-Version: 3.8.3
Standards-Version: 3.8.4
Homepage: https://launchpad.net/gasp
Vcs-Svn: svn://svn.debian.org/python-modules/packages/python-gasp/trunk
Vcs-Browser: http://svn.debian.org/viewsvn/python-modules/packages/python-gasp/trunk/
Package: python-gasp
Architecture: all
Depends: ${misc:Depends}, ${python:Depends}, python-cairo (>= 1.4), python-gtk2, python-gobject, python-multiprocessing
Depends: ${misc:Depends}, ${python:Depends}, python-cairo (>= 1.4), python-gtk2, python-gobject, python-multiprocessing | python (>= 2.6)
Provides: ${python:Provides}
Description: procedural Python graphics library for beginning programmers
GASP is a wrapper around the Python Cairo Graphics library which makes writing
......
......@@ -43,5 +43,5 @@ version.
On Debian systems, the complete text of the GPL v3 can be found here:
/usr/share/common-licenses/GPL-3
The Debian packaging is © 2008, 2009 Luke Faraone <luke@faraone.cc> and is
The Debian packaging is © 2008-2010 Luke Faraone <luke@faraone.cc> and is
licensed under the GPL version 3 or later. See above.
......@@ -7,6 +7,9 @@ include /usr/share/cdbs/1/rules/simple-patchsys.mk
DEB_PYTHON_SETUP_CMD = setup.py
install/python-gasp::
rm -rf debian/python-gasp/usr/lib/python*/site-packages/gasp*egg-info/requires.txt
.PHONY: get-orig-source
get-orig-source:
REV=$(shell dpkg-parsechangelog | sed -rne 's,^Version: .*bzr([^-]+).*,\1,p'); \
......@@ -14,7 +17,6 @@ get-orig-source:
if [ x$$REV = x ]; then \
uscan --force-download --rename --repack --download-version=$$VER --destdir=.; \
else \
bzr export -r $$REV python-gasp_$$VER.orig.tar.gz lp:gasp-code; \
bzr export -r $$REV python-gasp_$$VER.orig.tar.gz lp:gasp-core; \
fi
version=3
http://launchpad.net/gasp-code/+download \
http://launchpad.net/gasp-code/.*/python-gasp-(.*).tar.gz
http://launchpad.net/gasp-core/+download \
http://launchpad.net/gasp-core/.*/gasp-(.*).tar.gz
Metadata-Version: 1.0
Name: gasp
Version: 0.3.3
Summary: GASP provides a simple, procedural graphics API for beginning students using Python
Home-page: http://wiki.laptop.org/go/GASP
Author: Luke Faraone
Author-email: luke@faraoane.cc
License: GPLv3+
Download-URL: https://launchpad.net/gasp-code/+download
Description: UNKNOWN
Keywords: gasp
Platform: UNKNOWN
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: X11 Applications :: GTK
Classifier: Environment :: Win32 (MS Windows)
Classifier: Intended Audience :: Education
Classifier: License :: OSI Approved :: GNU General Public License (GPL)
Classifier: Programming Language :: Python
Classifier: Natural Language :: English
Classifier: Operating System :: OS Independent
Classifier: Topic :: Education :: Computer Aided Instruction (CAI)
Classifier: Topic :: Multimedia :: Graphics
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Software Development :: User Interfaces
AUTHORS
COPYING
MANIFEST.in
NEWS
README
setup.py
gasp/__init__.py
gasp/api.py
gasp/backend.py
gasp/color.py
gasp.egg-info/PKG-INFO
gasp.egg-info/SOURCES.txt
gasp.egg-info/dependency_links.txt
gasp.egg-info/requires.txt
gasp.egg-info/top_level.txt
gasp/images/gasp.png
tests/mockbackends.py
tests/run.py
tests/test_api.txt
tests/test_backend.txt
\ No newline at end of file
setuptools
pycairo >= 1.4
pygobject
pygtk >= 2.0
\ No newline at end of file
......@@ -21,14 +21,25 @@ import os
import sys
import math
import multiprocessing
import threading
#import threading
import cairo
import gobject
import time
import gtk
from glib import GError
try:
from glib import GError
except ImportError:
# must be on windows, then
print '[DBG]: On Windows'
try:
from gobject import GError
except ImportError:
# TODO: we *should* display a warning
# worst case now you'll get a traceback
print '[DBG]: No GError in gobject!'
GError = None
# diffrent update_when values
NOTHING = "Nothing"
......@@ -63,69 +74,33 @@ def create_screen(screen_obj): # takes a Screen() objects.
#create the screen obj
screen = screen_obj
#create the window and set its size and title
screen.window = gtk.Window()
screen.window.set_title(screen.title)
screen.window.set_default_size(screen.width, screen.height)
screen.window.set_resizable(False)
screen.keys_pressed = []
screen.mouse_pos = (-1,-1)
screen.mouse_state = {"left":0,"middle":0,"right":0}
screen.mouse_buttons = ["left","middle","right"]
screen.screenshot = False
screen.filename = ""
screen.update_when = NOTHING
#create the drawing area
screen.drawing_area = gtk.DrawingArea()
screen.window.add(screen.drawing_area)
screen.drawing_area.set_size_request(screen.width,screen.height)
screen.drawing_area.show()
screen.sprites = 0
screen.text_entry = None
screen.frame_rate = 40
screen.last_tick = time.time()
#set up the event handling
screen.drawing_area.set_events( gtk.gdk.EXPOSURE_MASK
| gtk.gdk.BUTTON1_MOTION_MASK
| gtk.gdk.BUTTON_PRESS_MASK
| gtk.gdk.BUTTON_RELEASE_MASK
| gtk.gdk.POINTER_MOTION_MASK
| gtk.gdk.POINTER_MOTION_HINT_MASK)
screen.drawing_area.connect("motion_notify_event", mouse_move)
screen.drawing_area.connect('button-press-event', mouse_press)
screen.drawing_area.connect('button-release-event', mouse_release)
screen.window.connect("key-press-event",key_pressed)
screen.window.connect("key-release-event",key_released)
screen.window.connect('delete-event', quit)
screen.keys_pressed = []
screen.mouse_pos = (-1,-1)
screen.mouse_state = {"left":0,"middle":0,"right":0}
screen.mouse_buttons = ["left","middle","right"]
#set the window icon and show the window
pic = os.path.join(os.path.join(os.path.dirname(os.path.abspath(__file__)),"images"),"gasp.png")
try:
screen.window.set_icon_from_file(pic)
except GError, e: # in case the file is not found
print "Warning: " + e.message
screen.window.show()
#create the buffer to draw to
screen.buffer = gtk.gdk.Pixmap(screen.drawing_area.window, screen.width, screen.height)
screen.gc = gtk.gdk.GC(screen.buffer)
screen.objects = []
screen.action_objects = multiprocessing.Queue()
screen.keys = multiprocessing.Queue()
screen.process = multiprocessing.current_process()
screen.mouse = multiprocessing.Queue()
#start the thread that will update the gui by calling main_iteration
screen.updater = Updater(screen)
screen.screenshot = False
screen.filename = ""
screen.update_when = NOTHING
#start the thread that will update the gui by calling main_iteration
screen.action_objects = multiprocessing.Queue()
screen.keys = multiprocessing.Queue()
screen.mouse = multiprocessing.Queue()
screen.update1 = multiprocessing.Queue()
screen.update2 = multiprocessing.Queue()
#if this is called to often key and mouse events will be slow
screen.sprites = 0
screen.text_entry = None
screen.entry_done = multiprocessing.Queue()
screen.updater.daemon = True
screen.updater.start()
......@@ -243,6 +218,44 @@ class Updater( multiprocessing.Process ):
i.rot = obj[2]
def run(self):
import gtk
screen = self.screen
#create the window and set its size and title
screen.window = gtk.Window()
screen.window.set_title(screen.title)
screen.window.set_default_size(screen.width, screen.height)
screen.window.set_resizable(False)
#create the drawing area
screen.drawing_area = gtk.DrawingArea()
screen.window.add(screen.drawing_area)
screen.drawing_area.set_size_request(screen.width,screen.height)
screen.drawing_area.show()
#set up the event handling
screen.drawing_area.set_events( gtk.gdk.EXPOSURE_MASK
| gtk.gdk.BUTTON1_MOTION_MASK
| gtk.gdk.BUTTON_PRESS_MASK
| gtk.gdk.BUTTON_RELEASE_MASK
| gtk.gdk.POINTER_MOTION_MASK
| gtk.gdk.POINTER_MOTION_HINT_MASK)
screen.drawing_area.connect("motion_notify_event", mouse_move)
screen.drawing_area.connect('button-press-event', mouse_press)
screen.drawing_area.connect('button-release-event', mouse_release)
screen.window.connect("key-press-event",key_pressed)
screen.window.connect("key-release-event",key_released)
screen.window.connect('delete-event', quit)
#set the window icon and show the window
pic = os.path.join(os.path.join(os.path.dirname(os.path.abspath(__file__)),"images"),"gasp.png")
try:
screen.window.set_icon_from_file(pic)
except GError, e: # in case the file is not found
print "Warning: " + e.message
screen.window.show()
#create the buffer to draw to
screen.buffer = gtk.gdk.Pixmap(screen.drawing_area.window, screen.width, screen.height)
screen.gc = gtk.gdk.GC(screen.buffer)
gobject.timeout_add(40, self.update) #this will call update periodically
self.running = True
#while threading.enumerate()[0].isAlive() and self.running:
......@@ -526,7 +539,7 @@ def stop_sound(obj):
def keys(): #returns all the keys currently being pressed
while not screen.keys.empty():
key = screen.keys.get()
if key[1] == "pressed":
if key[1] == "pressed" and key[0] not in screen.keys_pressed:
screen.keys_pressed.append(key[0])
if key[1] == "released" and key[0] in screen.keys_pressed:
screen.keys_pressed.remove(key[0])
......
[egg_info]
tag_build =
tag_date = 0
tag_svn_revision = 0
......@@ -18,7 +18,7 @@ from setuptools import setup
setup(
name = 'gasp',
version = '0.3.2',
version = '0.3.3',
packages = ['gasp',
],
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment