[med-svn] [Git][med-team/pyode][master] 4 commits: Remove redundant patches, add relevant ones
Nilesh Patra
gitlab at salsa.debian.org
Mon Apr 13 12:15:19 BST 2020
Nilesh Patra pushed to branch master at Debian Med / pyode
Commits:
ce4f4fc4 by Nilesh Patra at 2020-04-13T16:39:36+05:30
Remove redundant patches, add relevant ones
- - - - -
dd47074e by Nilesh Patra at 2020-04-13T16:43:42+05:30
Update rules
- - - - -
b3d3e6dc by Nilesh Patra at 2020-04-13T16:43:53+05:30
Update control
- - - - -
bf8745bd by Nilesh Patra at 2020-04-13T16:44:42+05:30
Change binary name for installing examples
- - - - -
8 changed files:
- debian/control
- − debian/patches/00_upstream_1.2.0-now.dpatch
- − debian/patches/00list
- + debian/patches/01_fix_setup.patch
- − debian/patches/01_ode_notrimesh.dpatch
- + debian/patches/series
- debian/python-pyode-doc.examples → debian/python3-pyode-doc.examples
- debian/rules
Changes:
=====================================
debian/control
=====================================
@@ -3,18 +3,16 @@ Section: python
Priority: optional
Maintainer: NeuroDebian Team <team at neuro.debian.net>
Uploaders: Yaroslav Halchenko <debian at onerussian.com>, Michael Hanke <michael.hanke at gmail.com>
-Build-Depends: debhelper (>= 10~), python-all-dev (>= 2.6.6-3~), libode-dev (>=0.7), dpatch, python-pyrex
+Build-Depends: debhelper (>= 10~), dh-python, python3-all-dev, libode-dev (>=0.7), cython, python3-setuptools
Standards-Version: 3.8.0
Homepage: http://pyode.sourceforge.net/
Vcs-Browser: https://salsa.debian.org/neurodebian-team/pyode
Vcs-Git: https://salsa.debian.org/neurodebian-team/pyode.git
-Package: python-pyode
+Package: python3-pyode
Architecture: any
-Depends: ${python:Depends}, ${shlibs:Depends}
-Conflicts: python2.3-pyode, python2.4-pyode
-Replaces: python2.3-pyode, python2.4-pyode
-Provides: ${python:Provides}
+Depends: ${python3:Depends}, ${shlibs:Depends}, ${misc:Depends}
+Provides: ${python3:Provides}
Description: Python bindings for The Open Dynamics Engine
PyODE is a set of open-source Python bindings for The Open Dynamics
Engine, an open-source physics engine. PyODE also includes an XODE
@@ -22,8 +20,9 @@ Description: Python bindings for The Open Dynamics Engine
.
This package provides PyODE for supported versions of Python.
-Package: python-pyode-doc
+Package: python3-pyode-doc
Architecture: all
+Depends: ${misc:Depends}
Section: doc
Description: Python bindings for The Open Dynamics Engine
PyODE is a set of open-source Python bindings for The Open Dynamics
=====================================
debian/patches/00_upstream_1.2.0-now.dpatch deleted
=====================================
@@ -1,940 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 00_upstream_1.2.0-now.dpatch by Yaroslav Halchenko <debian at onerussian.com>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: Upstream changes since 1.2.0 till 20090320
-
- at DPATCH@
-diff -urNad pyode-1.2.0~/ChangeLog pyode-1.2.0/ChangeLog
---- pyode-1.2.0~/ChangeLog 2006-11-28 11:33:29.000000000 -0500
-+++ pyode-1.2.0/ChangeLog 2009-03-20 12:06:16.000000000 -0400
-@@ -1,8 +1,56 @@
--2006-11-28 Matthias Baas <baas at ira.uka.de>
-+2009-02-19 Ethan Glasser-Camp <ethan.glasser-camp at gmail.com>
-+
-+ * declarations.pyx, world.pyp: expose linear/angular damping
-+ controls. Patch by Tristam MacDonald.
-+
-+2008-12-23 Ethan Glasser-Camp <ethan.glasser.camp at gmail.com>
-+
-+ * setup.py: Compiling against new ODE. Needs to use ode-config to
-+ get CFLAGS and LIBS (for example, to tell if we're compiling with
-+ -DdDOUBLE).
-+ * ode.pyx, declarations.pyx: Compiling against new ODE requires
-+ dInitODE to initialize colliders.
-+ * Renamed __new__ to __cinit__ for the new version of Pyrex.
-+
-+2008-12-21 Ethan Glasser-Camp <ethan.glasser.camp at gmail.com>
-+
-+ * space.pyx: Rebuilding with new Pyrex gives an error with parameter
-+ "type". Renamed to "space_type" in Space factory method.
-+
-+2007-07-09 Ethan Glasser-Camp <ethan.glasser.camp at gmail.com>
-+
-+ * tutorial3.py: change glScale to glScalef to be compatible with
-+ python-opengl version 3.0 and up. Thanks to Nathanial Troutman for
-+ finding the bug and suggesting a fix.
-+
-+2007-06-16 Ethan Glasser-Camp <ethan.glasser.camp at gmail.com>
-+
-+ * ode.pyx: reapplied weakref patch after finding the bug
-+ * tutorial3.py: fix bug where geoms were not stored, causing them
-+ to be deleted as per the weakref patch :)
-+
-+2007-06-14 Ethan Glasser-Camp <ethan.glasser.camp at gmail.com>
-+
-+ * heightfielddata.pyx: bug fix from Dan Miller
-+ * Reverted weakref patch -- it causes some kind of strange
-+ bug. I'll look into it later.
-+ * heightfielddata.pyx: Save a reference to the data tuple, because
-+ otherwise it gets garbage collected and causes problems. Thanks
-+ to Dan Miller for finding the bug and figuring it out.
-+
-+2007-06-05 Matthias Baas <mbaas at users.sourceforge.net>
-+
-+ * Applied a couple of patches posted by Ethan Glasser-Camp to the
-+ mailing list (doc strings for GeomRay, __delattr__ on
-+ GeomObject, UniversalJoint angle updates, storing
-+ Geoms with weak references, triangle count)
-+ * Added the heightfield patch as well
-+
-+2006-11-28 Matthias Baas <mbaas at users.sourceforge.net>
-
- * setup.py: Modified the setup script to upgrade to ODE 0.7.
-
--2006-11-10 Matthias Baas <baas at ira.uka.de>
-+2006-11-10 Matthias Baas <mbaas at users.sourceforge.net>
-
- * joints.pyx, geoms.pyx: Applied some more patches by
- Ethan Glasser-Camp (switched from the ccylinder functions to
-@@ -11,7 +59,7 @@
- available and is an alias for GeomCapsule. Added support for
- GeomCylinder (the uncapped one)).
-
--2006-11-09 Matthias Baas <baas at ira.uka.de>
-+2006-11-09 Matthias Baas <mbaas at users.sourceforge.net>
-
- * joints.pyx: Applied a patch from the mailing list that adds support
- for the LMotor (thanks to Ethan Glasser-Camp).
-@@ -21,26 +69,26 @@
- These changes requires a more recent version of ODE than 0.5
- (I've switched to v0.7 now).
-
--2006-08-15 Matthias Baas <baas at ira.uka.de>
-+2006-08-15 Matthias Baas <mbaas at users.sourceforge.net>
-
- * joints.pyx: The JointGroup.__dealloc__() method now notifies
- the contained joints about the destruction of the ODE joints
- (i.e. _destroyed() is called).
-
--2006-05-30 Matthias Baas <baas at ira.uka.de>
-+2006-05-30 Matthias Baas <mbaas at users.sourceforge.net>
-
- * mass.pyx: Applied Chris Bainbridge's patch that adds the
- Mass.setBoxTotal() method, and while I was at it I added
- the other set*Total() methods, too.
-
--2006-04-13 Matthias Baas <baas at ira.uka.de>
-+2006-04-13 Matthias Baas <mbaas at users.sourceforge.net>
-
- * space.pyx, joints.pyx: Fixed some doc strings that generated
- epydoc warnings.
- * ode.pyx: Added the collide2() function (and fixed some more doc
- strings).
-
--2006-01-17 Matthias Baas <baas at ira.uka.de>
-+2006-01-17 Matthias Baas <mbaas at users.sourceforge.net>
-
- * geomobject.pyx: Added the getQuaternion()/setQuaternion() methods
-
-@@ -52,17 +100,17 @@
- * tests/test_xode.py: Fixed some instances of testing floats for
- equality.
-
--2005-09-20 Matthias Baas <baas at ira.uka.de>
-+2005-09-20 Matthias Baas <mbaas at users.sourceforge.net>
-
- * ode.pyx: Added the ParamX3 parameter names and the ParamGroup definition
-
--2005-06-24 Matthias Baas <baas at ira.uka.de>
-+2005-06-24 Matthias Baas <mbaas at users.sourceforge.net>
-
- * Modified the base joint class so that its possible to store
- arbitrary attributes (as is the case with regular Python classes).
- This was suggested in "bug" 1121141.
-
--2005-06-06 Matthias Baas <baas at ira.uka.de>
-+2005-06-06 Matthias Baas <mbaas at users.sourceforge.net>
-
- * Creating a Body now requires a World object. Empty Bodies are not
- allowed anymore. The ode.environment object now simply holds None
-@@ -70,12 +118,12 @@
- the attach() method.
- * Added an iterator to iterate over the geoms inside a Space.
-
--2005-05-05 Matthias Baas <baas at ira.uka.de>
-+2005-05-05 Matthias Baas <mbaas at users.sourceforge.net>
-
- * src\joints.pyx (Joints): Added methods to set joint forces/torques directly (section 7.6
- in the ODE manual).
-
--2005-03-03 Matthias Baas <baas at ira.uka.de>
-+2005-03-03 Matthias Baas <mbaas at users.sourceforge.net>
-
- * src\geomobject.pyx (setCollideBits, setCategoryBits): Bits can now also be passed as int.
- Updated doc about collide and category bits (which are actually long instead of int).
-diff -urNad pyode-1.2.0~/examples/tutorial3.py pyode-1.2.0/examples/tutorial3.py
---- pyode-1.2.0~/examples/tutorial3.py 2005-12-16 12:06:48.000000000 -0500
-+++ pyode-1.2.0/examples/tutorial3.py 2009-03-20 12:06:16.000000000 -0400
-@@ -70,7 +70,7 @@
- glMultMatrixd(rot)
- if body.shape=="box":
- sx,sy,sz = body.boxsize
-- glScale(sx, sy, sz)
-+ glScalef(sx, sy, sz)
- glutSolidCube(1)
- glPopMatrix()
-
-@@ -93,21 +93,22 @@
- geom = ode.GeomBox(space, lengths=body.boxsize)
- geom.setBody(body)
-
-- return body
-+ return body, geom
-
- # drop_object
- def drop_object():
- """Drop an object into the scene."""
-
-- global bodies, counter, objcount
-+ global bodies, geom, counter, objcount
-
-- body = create_box(world, space, 1000, 1.0,0.2,0.2)
-+ body, geom = create_box(world, space, 1000, 1.0,0.2,0.2)
- body.setPosition( (random.gauss(0,0.1),3.0,random.gauss(0,0.1)) )
- theta = random.uniform(0,2*pi)
- ct = cos (theta)
- st = sin (theta)
- body.setRotation([ct, 0., -st, 0., 1., 0., st, 0., ct])
- bodies.append(body)
-+ geoms.append(geom)
- counter=0
- objcount+=1
-
-@@ -197,6 +198,9 @@
- # A list with ODE bodies
- bodies = []
-
-+# The geoms for each of the bodies
-+geoms = []
-+
- # A joint group for the contact joints that are generated whenever
- # two bodies collide
- contactgroup = ode.JointGroup()
-diff -urNad pyode-1.2.0~/setup.py pyode-1.2.0/setup.py
---- pyode-1.2.0~/setup.py 2007-01-11 11:37:39.000000000 -0500
-+++ pyode-1.2.0/setup.py 2009-03-20 12:06:16.000000000 -0400
-@@ -7,6 +7,10 @@
- import shutil, os, os.path, sys, glob
- from stat import *
-
-+def system(cmd):
-+ f = os.popen(cmd)
-+ return f.read()
-+
- # Include directories
- INC_DIRS = []
- # Library directories
-@@ -15,8 +19,10 @@
- LIBS = []
- # Additional compiler arguments
- CC_ARGS = []
-+CC_ARGS.extend(system("ode-config --cflags").split())
- # Additional linker arguments
- LINK_ARGS = []
-+LINK_ARGS.extend(system("ode-config --libs").split())
-
- # If your version of ODE was compiled with OPCODE (trimesh support) enabled,
- # this should be set to True.
-@@ -46,7 +52,6 @@
-
- LIBS += ["ode", "stdc++"]
-
--
- ######################################################################
- ######################################################################
- ######################################################################
-diff -urNad pyode-1.2.0~/src/body.pyx pyode-1.2.0/src/body.pyx
---- pyode-1.2.0~/src/body.pyx 2005-06-06 09:09:30.000000000 -0400
-+++ pyode-1.2.0/src/body.pyx 2009-03-20 12:06:16.000000000 -0400
-@@ -43,7 +43,7 @@
- # (set via __getattr__ and __setattr__)
- cdef object userattribs
-
-- def __new__(self, World world not None):
-+ def __cinit__(self, World world not None):
- self.bid = dBodyCreate(world.wid)
-
- def __init__(self, World world not None):
-diff -urNad pyode-1.2.0~/src/contact.pyx pyode-1.2.0/src/contact.pyx
---- pyode-1.2.0~/src/contact.pyx 2004-11-15 15:16:03.000000000 -0500
-+++ pyode-1.2.0/src/contact.pyx 2009-03-20 12:06:16.000000000 -0400
-@@ -38,7 +38,7 @@
-
- cdef dContact _contact
-
-- def __new__(self):
-+ def __cinit__(self):
- self._contact.surface.mode = ContactBounce
- self._contact.surface.mu = dInfinity
-
-diff -urNad pyode-1.2.0~/src/declarations.pyx pyode-1.2.0/src/declarations.pyx
---- pyode-1.2.0~/src/declarations.pyx 2006-11-10 05:53:40.000000000 -0500
-+++ pyode-1.2.0/src/declarations.pyx 2009-03-20 12:06:16.000000000 -0400
-@@ -49,6 +49,8 @@
- int _dummy
- cdef struct dxTriMeshData:
- int _dummy
-+ cdef struct dxHeightfieldData:
-+ int _dummy
-
- # Types
- ctypedef dxWorld* dWorldID
-@@ -58,6 +60,7 @@
- ctypedef dxJoint* dJointID
- ctypedef dxJointGroup* dJointGroupID
- ctypedef dxTriMeshData* dTriMeshDataID
-+ ctypedef dxHeightfieldData* dHeightfieldDataID
- ctypedef dReal dVector3[4]
- ctypedef dReal dVector4[4]
- ctypedef dReal dMatrix3[4*3]
-@@ -81,6 +84,7 @@
- dVector3 t2
-
- ctypedef void dNearCallback(void* data, dGeomID o1, dGeomID o2)
-+ ctypedef dReal dHeightfieldGetHeight( void* p_user_data, int x, int z )
-
- ctypedef struct dSurfaceParameters:
- int mode
-@@ -111,6 +115,7 @@
- void dWorldDestroy (dWorldID)
-
- void dCloseODE()
-+ void dInitODE()
-
- void dWorldSetGravity (dWorldID, dReal x, dReal y, dReal z)
- void dWorldGetGravity (dWorldID, dVector3 gravity)
-@@ -136,6 +141,10 @@
- int dWorldGetAutoDisableSteps (dWorldID)
- void dWorldSetAutoDisableTime (dWorldID, dReal time)
- dReal dWorldGetAutoDisableTime (dWorldID)
-+ dReal dWorldGetLinearDamping (dWorldID)
-+ void dWorldSetLinearDamping (dWorldID, dReal scale)
-+ dReal dWorldGetAngularDamping (dWorldID)
-+ void dWorldSetAngularDamping (dWorldID, dReal scale)
- void dWorldImpulseToForce (dWorldID, dReal stepsize,
- dReal ix, dReal iy, dReal iz, dVector3 force)
-
-@@ -281,6 +290,10 @@
- void dJointGetUniversalAxis1 (dJointID, dVector3 result)
- void dJointGetUniversalAxis2 (dJointID, dVector3 result)
- dReal dJointGetUniversalParam (dJointID, int parameter)
-+ dReal dJointGetUniversalAngle1 (dJointID)
-+ dReal dJointGetUniversalAngle2 (dJointID)
-+ dReal dJointGetUniversalAngle1Rate (dJointID)
-+ dReal dJointGetUniversalAngle2Rate (dJointID)
- int dJointGetAMotorNumAxes (dJointID)
- void dJointGetAMotorAxis (dJointID, int anum, dVector3 result)
- int dJointGetAMotorAxisRel (dJointID, int anum)
-@@ -446,8 +459,24 @@
- void dGeomTriMeshGetTriangle (dGeomID g, int Index, dVector3 *v0,
- dVector3 *v1, dVector3 *v2)
-
-+ int dGeomTriMeshGetTriangleCount (dGeomID g)
-+
- void dGeomTriMeshGetPoint (dGeomID g, int Index, dReal u, dReal v,
- dVector3 Out)
-
- void dGeomTriMeshEnableTC(dGeomID g, int geomClass, int enable)
- int dGeomTriMeshIsTCEnabled(dGeomID g, int geomClass)
-+
-+ # Heightfield
-+ dHeightfieldDataID dGeomHeightfieldDataCreate()
-+ void dGeomHeightfieldDataDestroy(dHeightfieldDataID g)
-+ void dGeomHeightfieldDataBuildCallback(dHeightfieldDataID d,
-+ void* pUserData,
-+ dHeightfieldGetHeight* pCallback,
-+ dReal width, dReal depth,
-+ int widthSamples, int depthSamples,
-+ dReal scale, dReal offset,
-+ dReal thickness, int bWrap)
-+ dGeomID dCreateHeightfield (dSpaceID space, dHeightfieldDataID data,
-+ int bPlaceable)
-+
-diff -urNad pyode-1.2.0~/src/geomobject.pyx pyode-1.2.0/src/geomobject.pyx
---- pyode-1.2.0~/src/geomobject.pyx 2006-01-17 04:07:54.000000000 -0500
-+++ pyode-1.2.0/src/geomobject.pyx 2009-03-20 12:06:16.000000000 -0400
-@@ -52,7 +52,9 @@
- # A dictionary with user defined attributes
- cdef object attribs
-
-- def __new__(self, *a, **kw):
-+ cdef object __weakref__
-+
-+ def __cinit__(self, *a, **kw):
- self.gid = NULL
- self.space = None
- self.body = None
-@@ -75,6 +77,12 @@
- def __setattr__(self, name, val):
- self.attribs[name]=val
-
-+ def __delattr__(self, name):
-+ if name in self.attribs:
-+ del self.attribs[name]
-+ else:
-+ raise AttributeError, "geom has no attribute '%s'."%name
-+
- def _id(self):
- """_id() -> int
-
-diff -urNad pyode-1.2.0~/src/geoms.pyx pyode-1.2.0/src/geoms.pyx
---- pyode-1.2.0~/src/geoms.pyx 2006-11-10 05:53:40.000000000 -0500
-+++ pyode-1.2.0/src/geoms.pyx 2009-03-20 12:06:16.000000000 -0400
-@@ -30,7 +30,7 @@
- GeomSphere(space=None, radius=1.0)
- """
-
-- def __new__(self, space=None, radius=1.0):
-+ def __cinit__(self, space=None, radius=1.0):
- cdef SpaceBase sp
- cdef dSpaceID sid
-
-@@ -99,7 +99,7 @@
- GeomBox(space=None, lengths=(1.0, 1.0, 1.0))
- """
-
-- def __new__(self, space=None, lengths=(1.0, 1.0, 1.0)):
-+ def __cinit__(self, space=None, lengths=(1.0, 1.0, 1.0)):
- cdef SpaceBase sp
- cdef dSpaceID sid
-
-@@ -163,7 +163,7 @@
-
- """
-
-- def __new__(self, space=None, normal=(0,0,1), dist=0):
-+ def __cinit__(self, space=None, normal=(0,0,1), dist=0):
- cdef SpaceBase sp
- cdef dSpaceID sid
-
-@@ -223,7 +223,7 @@
- The length parameter does not include the caps.
- """
-
-- def __new__(self, space=None, radius=0.5, length=1.0):
-+ def __cinit__(self, space=None, radius=0.5, length=1.0):
- cdef SpaceBase sp
- cdef dSpaceID sid
-
-@@ -285,7 +285,7 @@
- GeomCylinder(space=None, radius=0.5, length=1.0)
- """
-
-- def __new__(self, space=None, radius=0.5, length=1.0):
-+ def __cinit__(self, space=None, radius=0.5, length=1.0):
- cdef SpaceBase sp
- cdef dSpaceID sid
-
-@@ -337,7 +337,7 @@
-
- """
-
-- def __new__(self, space=None, rlen=1.0):
-+ def __cinit__(self, space=None, rlen=1.0):
- cdef SpaceBase sp
- cdef dSpaceID sid
-
-@@ -362,15 +362,40 @@
- return id
-
- def setLength(self, rlen):
-+ '''setLength(rlen)
-+
-+ Set length of the ray.
-+
-+ @param rlen: length of the ray
-+ @type rlen: float'''
- dGeomRaySetLength(self.gid, rlen)
-
- def getLength(self):
-+ '''getLength() -> length
-+
-+ Get the length of the ray.
-+
-+ @returns: length of the ray (float)'''
- return dGeomRayGetLength(self.gid)
-
- def set(self, p, u):
-+ '''set(p, u)
-+
-+ Set the position and rotation of a ray.
-+
-+ @param p: position
-+ @type p: 3-sequence of floats
-+ @param u: rotation
-+ @type u: 3-sequence of floats'''
- dGeomRaySet(self.gid, p[0],p[1],p[2], u[0],u[1],u[2])
-
- def get(self):
-+ '''get() -> ((p[0], p[1], p[2]), (u[0], u[1], u[2]))
-+
-+ Return the position and rotation as a pair of
-+ tuples.
-+
-+ @returns: position and rotation'''
- cdef dVector3 start
- cdef dVector3 dir
- dGeomRayGet(self.gid, start, dir)
-@@ -392,7 +417,7 @@
-
- cdef object geom
-
-- def __new__(self, space=None):
-+ def __cinit__(self, space=None):
- cdef SpaceBase sp
- cdef dSpaceID sid
-
-diff -urNad pyode-1.2.0~/src/heightfield.pyx pyode-1.2.0/src/heightfield.pyx
---- pyode-1.2.0~/src/heightfield.pyx 1969-12-31 19:00:00.000000000 -0500
-+++ pyode-1.2.0/src/heightfield.pyx 2009-03-20 12:06:16.000000000 -0400
-@@ -0,0 +1,59 @@
-+######################################################################
-+# Python Open Dynamics Engine Wrapper
-+# Copyright (C) 2004 PyODE developers (see file AUTHORS)
-+# All rights reserved.
-+#
-+# This library is free software; you can redistribute it and/or
-+# modify it under the terms of EITHER:
-+# (1) 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. The text of the GNU Lesser
-+# General Public License is included with this library in the
-+# file LICENSE.
-+# (2) The BSD-style license that is included with this library in
-+# the file LICENSE-BSD.
-+#
-+# This library 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 files
-+# LICENSE and LICENSE-BSD for more details.
-+######################################################################
-+
-+cdef class GeomHeightfield(GeomObject):
-+ """Heightfield object.
-+
-+ To construct the heightfield geom, you need a HeightfieldData object that
-+ stores the heightfield data. This object has to be passed as the first
-+ argument to the constructor.
-+
-+ Constructor::
-+ GeomHeightfield(data, space=None)
-+ """
-+ cdef HeightfieldData data
-+
-+ def __cinit__(self, HeightfieldData data not None,
-+ placeable=True, space=None):
-+ cdef SpaceBase sp
-+ cdef dSpaceID sid
-+
-+ self.data = data
-+
-+ sid=NULL
-+ if space!=None:
-+ sp = space
-+ sid = sp.sid
-+ self.gid = dCreateHeightfield(sid, data.hfdid, <int>placeable)
-+
-+ _geom_c2py_lut[<long>self.gid] = self
-+
-+ def __init__(self, HeightfieldData data not None, space=None):
-+ self.space = space
-+ self.body = None
-+
-+ def placeable(self):
-+ return True
-+
-+ def _id(self):
-+ cdef long id
-+ id = <long>self.gid
-+ return id
-diff -urNad pyode-1.2.0~/src/heightfielddata.pyx pyode-1.2.0/src/heightfielddata.pyx
---- pyode-1.2.0~/src/heightfielddata.pyx 1969-12-31 19:00:00.000000000 -0500
-+++ pyode-1.2.0/src/heightfielddata.pyx 2009-03-20 12:06:16.000000000 -0400
-@@ -0,0 +1,54 @@
-+######################################################################
-+# Python Open Dynamics Engine Wrapper
-+# Copyright (C) 2004 PyODE developers (see file AUTHORS)
-+# All rights reserved.
-+#
-+# This library is free software; you can redistribute it and/or
-+# modify it under the terms of EITHER:
-+# (1) 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. The text of the GNU Lesser
-+# General Public License is included with this library in the
-+# file LICENSE.
-+# (2) The BSD-style license that is included with this library in
-+# the file LICENSE-BSD.
-+#
-+# This library 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 files
-+# LICENSE and LICENSE-BSD for more details.
-+######################################################################
-+
-+cdef class HeightfieldData:
-+ """This class is used to store heightfield data.
-+ """
-+ cdef dHeightfieldDataID hfdid
-+ # This attribute stores the tuple which gets passed to the height
-+ # callback. If we don't keep a reference, the tuple gets garbage
-+ # collected.
-+ cdef object calltup
-+
-+ def __cinit__(self):
-+ self.hfdid = dGeomHeightfieldDataCreate()
-+
-+ def __dealloc__(self):
-+ if self.hfdid!=NULL:
-+ dGeomHeightfieldDataDestroy(self.hfdid)
-+
-+ def build_callback(self, userdata, callback, width, depth, wsamp, dsamp,
-+ scale, offset, thickness, bwrap):
-+ cdef object tup
-+ cdef void* data
-+ tup = (callback, userdata)
-+ self.calltup = tup
-+ data = <void*>tup
-+ dGeomHeightfieldDataBuildCallback(self.hfdid,
-+ data, get_height, width, depth,
-+ wsamp, dsamp, scale, offset,
-+ thickness, bwrap)
-+
-+cdef dReal get_height(void *data, int x, int z):
-+ cdef object tup
-+ tup = <object>data
-+ callback, arg = tup
-+ return callback(arg, x, z)
-diff -urNad pyode-1.2.0~/src/joints.pyx pyode-1.2.0/src/joints.pyx
---- pyode-1.2.0~/src/joints.pyx 2006-11-10 05:43:23.000000000 -0500
-+++ pyode-1.2.0/src/joints.pyx 2009-03-20 12:06:16.000000000 -0400
-@@ -47,7 +47,7 @@
- # A list of Python joints that were added to the group
- cdef object jointlist
-
-- def __new__(self):
-+ def __cinit__(self):
- self.gid = dJointGroupCreate(0)
-
- def __init__(self):
-@@ -108,7 +108,7 @@
- # (set via __getattr__ and __setattr__)
- cdef object userattribs
-
-- def __new__(self, *a, **kw):
-+ def __cinit__(self, *a, **kw):
- self.jid = NULL
- self.world = None
- self.feedback = NULL
-@@ -263,7 +263,7 @@
- BallJoint(world, jointgroup=None)
- """
-
-- def __new__(self, World world not None, jointgroup=None):
-+ def __cinit__(self, World world not None, jointgroup=None):
- cdef JointGroup jg
- cdef dJointGroupID jgid
-
-@@ -335,7 +335,7 @@
- HingeJoint(world, jointgroup=None)
- """
-
-- def __new__(self, World world not None, jointgroup=None):
-+ def __cinit__(self, World world not None, jointgroup=None):
- cdef JointGroup jg
- cdef dJointGroupID jgid
-
-@@ -489,7 +489,7 @@
- SlideJoint(world, jointgroup=None)
- """
-
-- def __new__(self, World world not None, jointgroup=None):
-+ def __cinit__(self, World world not None, jointgroup=None):
- cdef JointGroup jg
- cdef dJointGroupID jgid
-
-@@ -575,7 +575,7 @@
- UniversalJoint(world, jointgroup=None)
- """
-
-- def __new__(self, World world not None, jointgroup=None):
-+ def __cinit__(self, World world not None, jointgroup=None):
- cdef JointGroup jg
- cdef dJointGroupID jgid
-
-@@ -684,13 +684,25 @@
- """
- dJointAddUniversalTorques(self.jid, torque1, torque2)
-
-+ def getAngle1(self):
-+ return dJointGetUniversalAngle1(self.jid)
-+
-+ def getAngle2(self):
-+ return dJointGetUniversalAngle2(self.jid)
-+
-+ def getAngle1Rate(self):
-+ return dJointGetUniversalAngle1Rate(self.jid)
-+
-+ def getAngle2Rate(self):
-+ return dJointGetUniversalAngle2Rate(self.jid)
-+
- # setParam
- def setParam(self, param, value):
- dJointSetUniversalParam(self.jid, param, value)
-
- # getParam
- def getParam(self, param):
-- return dJointGetUniversalParam(self.jid, param)
-+ return dJointGetUniversalParam(self.jid, param)
-
-
- # Hinge2Joint
-@@ -702,7 +714,7 @@
- Hinge2Joint(world, jointgroup=None)
- """
-
-- def __new__(self, World world not None, jointgroup=None):
-+ def __cinit__(self, World world not None, jointgroup=None):
- cdef JointGroup jg
- cdef dJointGroupID jgid
-
-@@ -858,7 +870,7 @@
- FixedJoint(world, jointgroup=None)
- """
-
-- def __new__(self, World world not None, jointgroup=None):
-+ def __cinit__(self, World world not None, jointgroup=None):
- cdef JointGroup jg
- cdef dJointGroupID jgid
-
-@@ -893,7 +905,7 @@
- ContactJoint(world, jointgroup, contact)
- """
-
-- def __new__(self, World world not None, jointgroup, Contact contact):
-+ def __cinit__(self, World world not None, jointgroup, Contact contact):
- cdef JointGroup jg
- cdef dJointGroupID jgid
- jgid=NULL
-@@ -916,7 +928,7 @@
- AMotor(world, jointgroup=None)
- """
-
-- def __new__(self, World world not None, jointgroup=None):
-+ def __cinit__(self, World world not None, jointgroup=None):
- cdef JointGroup jg
- cdef dJointGroupID jgid
-
-@@ -1089,7 +1101,7 @@
- LMotor(world, jointgroup=None)
- """
-
-- def __new__(self, World world not None, jointgroup=None):
-+ def __cinit__(self, World world not None, jointgroup=None):
- cdef JointGroup jg
- cdef dJointGroupID jgid
-
-@@ -1178,7 +1190,7 @@
- Plane2DJoint(world, jointgroup=None)
- """
-
-- def __new__(self, World world not None, jointgroup=None):
-+ def __cinit__(self, World world not None, jointgroup=None):
- cdef JointGroup jg
- cdef dJointGroupID jgid
-
-diff -urNad pyode-1.2.0~/src/mass.pyx pyode-1.2.0/src/mass.pyx
---- pyode-1.2.0~/src/mass.pyx 2006-05-30 10:23:44.000000000 -0400
-+++ pyode-1.2.0/src/mass.pyx 2009-03-20 12:06:16.000000000 -0400
-@@ -40,7 +40,7 @@
- """
- cdef dMass _mass
-
-- def __new__(self):
-+ def __cinit__(self):
- dMassSetZero(&self._mass)
-
- def setZero(self):
-diff -urNad pyode-1.2.0~/src/ode.pyx pyode-1.2.0/src/ode.pyx
---- pyode-1.2.0~/src/ode.pyx 2006-11-10 05:53:40.000000000 -0500
-+++ pyode-1.2.0/src/ode.pyx 2009-03-20 12:06:16.000000000 -0400
-@@ -151,7 +151,10 @@
- ######################################################################
-
- # Lookup table for geom objects: C ptr -> Python object
--_geom_c2py_lut = {}
-+
-+## This causes some kind of weird bug! Need to fix this.
-+import weakref
-+_geom_c2py_lut = weakref.WeakValueDictionary()
-
- # Mass
- include "mass.pyx"
-@@ -182,6 +185,8 @@
- # (trimesh_dummy.pyx) if trimesh support is not available/desired.
- include "_trimesh_switch.pyx"
-
-+include "heightfielddata.pyx"
-+include "heightfield.pyx"
-
- def collide(geom1, geom2):
- """collide(geom1, geom2) -> contacts
-@@ -286,7 +291,15 @@
- """
- dCloseODE()
-
-+def InitODE():
-+ '''InitODE()
-+
-+ Initialize some ODE internals. This will be called for you when you
-+ "import ode", but you should call this again if you CloseODE().'''
-+ dInitODE()
-+
- ######################################################################
-
- #environment = Body(None)
- environment = None
-+InitODE()
-diff -urNad pyode-1.2.0~/src/space.pyx pyode-1.2.0/src/space.pyx
---- pyode-1.2.0~/src/space.pyx 2006-04-13 09:09:58.000000000 -0400
-+++ pyode-1.2.0/src/space.pyx 2009-03-20 12:06:16.000000000 -0400
-@@ -66,7 +66,7 @@
- # is the geom object (Python wrapper). This is used in collide_callback()
- # cdef object geom_dict
-
-- def __new__(self, *a, **kw):
-+ def __cinit__(self, *a, **kw):
- pass
-
- def __init__(self, *a, **kw):
-@@ -230,7 +230,7 @@
- problems with the collision system.
- """
-
-- def __new__(self, space=None):
-+ def __cinit__(self, space=None):
- cdef SpaceBase sp
- cdef dSpaceID parentid
-
-@@ -263,7 +263,7 @@
- can be quickly paired with the objects around it.
- """
-
-- def __new__(self, space=None):
-+ def __cinit__(self, space=None):
- cdef SpaceBase sp
- cdef dSpaceID parentid
-
-@@ -322,7 +322,7 @@
- Currently getGeom() is not implemented for the quadtree space.
- """
-
-- def __new__(self, center, extents, depth, space=None):
-+ def __cinit__(self, center, extents, depth, space=None):
- cdef SpaceBase sp
- cdef dSpaceID parentid
- cdef dVector3 c
-@@ -351,22 +351,22 @@
- pass
-
-
--def Space(type=0):
-+def Space(space_type=0):
- """Space factory function.
-
- Depending on the type argument this function either returns a
-- SimpleSpace (type=0) or a HashSpace (type=1).
-+ SimpleSpace (space_type=0) or a HashSpace (space_type=1).
-
- This function is provided to remain compatible with previous
- versions of PyODE where there was only one Space class.
-
-- >>> space = Space(type=0) # Create a SimpleSpace
-- >>> space = Space(type=1) # Create a HashSpace
-+ >>> space = Space(space_type=0) # Create a SimpleSpace
-+ >>> space = Space(space_type=1) # Create a HashSpace
- """
-- if type==0:
-+ if space_type==0:
- return SimpleSpace()
-- elif type==1:
-+ elif space_type==1:
- return HashSpace()
- else:
-- raise ValueError, "Unknown space type (%d)"%type
--
-+ raise ValueError, "Unknown space type (%d)"%space_type
-+
-diff -urNad pyode-1.2.0~/src/trimesh.pyx pyode-1.2.0/src/trimesh.pyx
---- pyode-1.2.0~/src/trimesh.pyx 2004-11-15 15:16:03.000000000 -0500
-+++ pyode-1.2.0/src/trimesh.pyx 2009-03-20 12:06:16.000000000 -0400
-@@ -38,7 +38,7 @@
- # Keep a reference to the data
- cdef TriMeshData data
-
-- def __new__(self, TriMeshData data not None, space=None):
-+ def __cinit__(self, TriMeshData data not None, space=None):
- cdef SpaceBase sp
- cdef dSpaceID sid
-
-@@ -91,4 +91,10 @@
- dGeomTriMeshGetTriangle(self.gid, idx, vp0, vp1, vp2)
- return ((v0[0],v0[1],v0[2]), (v1[0],v1[1],v1[2]), (v2[0],v2[1],v2[2]))
-
-+ def getTriangleCount(self):
-+ """getTriangleCount() -> n
-+
-+ Returns the number of triangles in the TriMesh."""
-+
-+ return dGeomTriMeshGetTriangleCount(self.gid)
-
-diff -urNad pyode-1.2.0~/src/trimeshdata.pyx pyode-1.2.0/src/trimeshdata.pyx
---- pyode-1.2.0~/src/trimeshdata.pyx 2004-11-15 15:16:04.000000000 -0500
-+++ pyode-1.2.0/src/trimeshdata.pyx 2009-03-20 12:06:16.000000000 -0400
-@@ -27,7 +27,7 @@
- cdef dReal* vertex_buffer
- cdef int* face_buffer
-
-- def __new__(self):
-+ def __cinit__(self):
- self.tmdid = dGeomTriMeshDataCreate()
- self.vertex_buffer = NULL
- self.face_buffer = NULL
-diff -urNad pyode-1.2.0~/src/world.pyx pyode-1.2.0/src/world.pyx
---- pyode-1.2.0~/src/world.pyx 2004-11-15 15:16:04.000000000 -0500
-+++ pyode-1.2.0/src/world.pyx 2009-03-20 12:06:16.000000000 -0400
-@@ -33,7 +33,7 @@
-
- cdef dWorldID wid
-
-- def __new__(self):
-+ def __cinit__(self):
- self.wid = dWorldCreate()
-
- def __dealloc__(self):
-@@ -323,6 +323,44 @@
- """
- return dWorldGetAutoDisableTime(self.wid)
-
-+ # setLinearDamping
-+ def setLinearDamping(self, scale):
-+ """setLinearDamping(scale)
-+
-+ Set the world's linear damping scale.
-+ @param scale The linear damping scale that is to be applied to bodies.
-+ Default is 0 (no damping). Should be in the interval [0, 1].
-+ @type scale: float
-+ """
-+ dWorldSetLinearDamping(self.wid, scale)
-+
-+ # getLinearDamping
-+ def getLinearDamping(self):
-+ """getLinearDamping() -> float
-+
-+ Get the world's linear damping scale.
-+ """
-+ return dWorldGetLinearDamping(self.wid)
-+
-+ # setAngularDamping
-+ def setAngularDamping(self, scale):
-+ """setAngularDamping(scale)
-+
-+ Set the world's angular damping scale.
-+ @param scale The angular damping scale that is to be applied to bodies.
-+ Default is 0 (no damping). Should be in the interval [0, 1].
-+ @type scale: float
-+ """
-+ dWorldSetAngularDamping(self.wid, scale)
-+
-+ # getAngularDamping
-+ def getAngularDamping(self):
-+ """getAngularDamping() -> float
-+
-+ Get the world's angular damping scale.
-+ """
-+ return dWorldGetAngularDamping(self.wid)
-+
- # impulseToForce
- def impulseToForce(self, stepsize, impulse):
- """impulseToForce(stepsize, impulse) -> 3-tuple
=====================================
debian/patches/00list deleted
=====================================
@@ -1 +0,0 @@
-00_upstream_1.2.0-now.dpatch
=====================================
debian/patches/01_fix_setup.patch
=====================================
@@ -0,0 +1,59 @@
+Description: Fix setup.py to get installation to take place via system libs, fix cython options, use setuptools.
+--- a/setup.py
++++ b/setup.py
+@@ -2,9 +2,8 @@
+ # setup script for the Python wrapper of ODE
+ ######################################################################
+
+-from distutils.core import setup, Extension
+-import distutils.sysconfig
+-import shutil, os, os.path, sys, glob, subprocess, pip
++from setuptools import setup, Extension
++import shutil, os, os.path, sys, glob, subprocess
+ from stat import *
+
+
+@@ -12,8 +11,6 @@
+ f = os.popen(cmd)
+ return f.read()
+
+-# Directory for pip package
+-PIP_DIR = os.path.join(os.path.split(os.path.split(pip.__file__)[0])[0], 'xode', 'ode')
+ # Include directories
+ INC_DIRS = []
+ # Library directories
+@@ -29,7 +26,7 @@
+
+ # If your version of ODE was compiled with OPCODE (trimesh support) enabled,
+ # this should be set to True.
+-TRIMESH_ENABLE = True
++TRIMESH_ENABLE = False
+
+ ######################################################################
+ # Windows specific settings
+@@ -49,7 +46,7 @@
+ ######################################################################
+ else:
+
+- for base in ["/usr", "/usr/local", "/opt/local", os.path.expanduser("~/ode"), PIP_DIR]:
++ for base in ["/usr", "/usr/local", "/opt/local", os.path.expanduser("~/ode")]:
+ INC_DIRS += [os.path.join(base, "include")]
+ LIB_DIRS += [os.path.join(base, "lib")]
+
+@@ -90,7 +87,7 @@
+ print('include "trimesh_dummy.pyx"', file=f)
+ f.close()
+
+- cmd = "cython -o %s -I. -Isrc src/ode.pyx" % name
++ cmd = "cython -3 -o %s -I. -Isrc src/ode.pyx" % name
+ cython_out = name
+
+ # Check if the cython output is still up to date or if it has to be generated
+@@ -122,7 +119,6 @@
+ """
+ if install_dir:
+ os.makedirs(install_dir, exist_ok=True)
+- subprocess.check_call(['./install_ode.sh', install_dir])
+
+ ######################################################################
+
=====================================
debian/patches/01_ode_notrimesh.dpatch deleted
=====================================
@@ -1,19 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 01_ode_notrimesh.dpatch by Yaroslav Halchenko <debian at onerussian.com>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: No description.
-
- at DPATCH@
-diff -urNad pyode-1.2.0.obsolete.0.0752626925977928~/setup.py pyode-1.2.0.obsolete.0.0752626925977928/setup.py
---- pyode-1.2.0.obsolete.0.0752626925977928~/setup.py 2007-01-11 11:37:39.000000000 -0500
-+++ pyode-1.2.0.obsolete.0.0752626925977928/setup.py 2007-02-15 11:02:08.000000000 -0500
-@@ -20,7 +20,7 @@
-
- # If your version of ODE was compiled with OPCODE (trimesh support) enabled,
- # this should be set to True.
--TRIMESH_ENABLE = True
-+TRIMESH_ENABLE = False
-
- ######################################################################
- # Windows specific settings
=====================================
debian/patches/series
=====================================
@@ -0,0 +1 @@
+01_fix_setup.patch
=====================================
debian/python-pyode-doc.examples → debian/python3-pyode-doc.examples
=====================================
=====================================
debian/rules
=====================================
@@ -1,122 +1,7 @@
-#!/usr/bin/make -f
-# -*- makefile -*-
-# Sample debian/rules that uses debhelper.
-#
-# This file was originally written by Joey Hess and Craig Small.
-# build-arch and build-indep targets by Bill Allombert 2001
-# Changes for python-pyepl and for python-pyode by Yaroslav Halchenko
+#! /usr/bin/make -f
-# Uncomment this to turn on verbose mode.
-#export DH_VERBOSE=1
+#export DH_VERBOSE = 1
+export PYBUILD_NAME = pyode
-# This has to be exported to make some magic below work.
-export DH_OPTIONS
-
-# no parallel execution -- required for dpatch
-.NOTPARALLEL:
-
-PYVERS := $(shell pyversions -vs)
-PYVER := $(shell pyversions -vd)
-
-PYNAME=pyode
-BASE=$(CURDIR)/debian
-PYPACKAGE=python-$(PYNAME)
-BASE=$(CURDIR)/debian
-
-CFLAGS = -Wall -g
-ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
- CFLAGS += -O0
-else
- CFLAGS += -O2
-endif
-
-include /usr/share/dpatch/dpatch.make
-
-#Architecture
-build: debian/control patch build-arch build-indep
-
-debian/control: debian/control.in
- sed -e "/#include \"description.in\"/r debian/description.in" -e "/#.*/d" $^ >| $@
-
-#Architecture
-build: debian/control patch build-arch build-indep
-build-arch: build-arch-stamp
-build-arch-stamp: $(PYVERS:%=build-arch-python%)
- touch $@
-
-build-arch-python%:
- python$* setup.py build_ext
- touch $@
-
-build-indep: build-indep-stamp
-build-indep-stamp:
-# $(MAKE) -C code/documentation/
- touch build-indep-stamp
-
-clean: clean-patched unpatch
-clean-patched: debian/control
- dh_testdir
- dh_testroot
- rm -f build-arch-stamp build-arch-python* build-indep-stamp
- rm -rf build
- dh_clean
-
-pre-install:
- dh_testdir
- dh_testroot
- dh_clean -k
- dh_installdirs
-
-install: build pre-install install-indep install-arch
-
-install-indep:
- dh_testdir
- dh_testroot
- dh_clean -k -i
- dh_installdirs -i
-
- # Add here commands to install the indep part of the package into
- # debian/<package>-doc.
- # might be deployed later
- #INSTALLDOC#
-
- dh_install -i
-
-install-python%:
- python$* setup.py install --root $(BASE)/$(PYPACKAGE) --no-compile
- python$* setup.py clean
-
-install-arch: pre-install $(PYVERS:%=install-python%)
- dh_install -s
-
-binary-common:
- dh_testdir
- dh_testroot
- dh_installchangelogs ChangeLog
- dh_installdocs AUTHORS README
- dh_installexamples
- dh_link
-
- dh_strip
- dh_compress -X.py
- dh_fixperms
-
- dh_python2
-
- dh_makeshlibs
- dh_installdeb
- dh_shlibdeps
- dh_gencontrol
- dh_md5sums
- dh_builddeb
-
-# Build architecture independant packages using the common target.
-binary-indep: build-indep install-indep
- $(MAKE) -f debian/rules DH_OPTIONS=-i binary-common
-
-# Build architecture dependant packages using the common target.
-binary-arch: build-arch install-arch
- $(MAKE) -f debian/rules DH_OPTIONS=-a binary-common
-
-binary: binary-arch binary-indep
-.PHONY: build clean binary-indep binary-arch binary install install-indep install-arch
+%:
+ dh $@ --with python3 --buildsystem=pybuild
View it on GitLab: https://salsa.debian.org/med-team/pyode/-/compare/2a6554acd9f4eda49c68215f98f44cd6ec1d4d84...bf8745bd4dd5c8448f9c26a4edd2fe24b8ec8758
--
View it on GitLab: https://salsa.debian.org/med-team/pyode/-/compare/2a6554acd9f4eda49c68215f98f44cd6ec1d4d84...bf8745bd4dd5c8448f9c26a4edd2fe24b8ec8758
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20200413/40ee6be4/attachment-0001.html>
More information about the debian-med-commit
mailing list