Control: tag -1 + patch

Hi Yaroslav, Hi Michael,

Étienne Mollier, on 2026-02-22:
> I am investigating the feasibility to bring back psychopy into
> shape, preferrably in its latest upstream release (2026.1.0 up
> to day).  I see that some of the tests are going to require the
> psychtoolbox Python module
[…]
> The Python module psychtoolbox looks to be shipped, but not
> distributed as binary package python3-psychtoolbox, by
> psychtoolbox-3.  Please, would it be possible to have the Python
> module added to the ecosystem of psychtoolbox utilities?

I spent some time to also assess the feasibility of a
python3-psychtoolbox binary package out of the existing
psychtoolbox-3 source package.  I think that I obtained
something that works with the debdiff you will find in
attachment.

Have a nice day,  :)
-- 
  .''`.  Étienne Mollier <[email protected]>
 : :' :  pgp: 8f91 b227 c7d6 f2b1 948c  8236 793c f67e 8f0d 11da
 `. `'   sent from /dev/pts/2, please excuse my verbosity
   `-    on air: Fish - High Wood
diff -Nru psychtoolbox-3-3.0.19.14.dfsg1/debian/changelog 
psychtoolbox-3-3.0.19.14.dfsg1/debian/changelog
--- psychtoolbox-3-3.0.19.14.dfsg1/debian/changelog     2024-08-12 
15:38:17.000000000 +0200
+++ psychtoolbox-3-3.0.19.14.dfsg1/debian/changelog     2026-02-24 
22:37:25.000000000 +0100
@@ -1,3 +1,9 @@
+psychtoolbox-3 (3.0.19.14.dfsg1-1.1) UNRELEASED; urgency=medium
+
+  * Attempt to introduce a python3-psychtoolbox package.
+
+ -- Étienne Mollier <[email protected]>  Tue, 24 Feb 2026 22:37:25 +0100
+
 psychtoolbox-3 (3.0.19.14.dfsg1-1) unstable; urgency=medium
 
   * debian/dfsg-upstream - improve listing of left non-source - list only
diff -Nru psychtoolbox-3-3.0.19.14.dfsg1/debian/control 
psychtoolbox-3-3.0.19.14.dfsg1/debian/control
--- psychtoolbox-3-3.0.19.14.dfsg1/debian/control       2024-08-12 
15:38:17.000000000 +0200
+++ psychtoolbox-3-3.0.19.14.dfsg1/debian/control       2026-02-24 
22:37:25.000000000 +0100
@@ -6,6 +6,11 @@
 Build-Depends: debhelper (>= 11),
                autotools-dev,
                dh-octave | octave-pkg-dev (>= 0.5.7),
+               dh-sequence-python3,
+               pybuild-plugin-pyproject,
+               python3-setuptools,
+               libpython3-all-dev,
+               python3-all-dev:native,
                gfortran,
                gnuplot-nox | gnuplot,
                gstreamer1.0-plugins-base, gstreamer1.0-plugins-good, 
gstreamer1.0-libav,
@@ -41,6 +46,7 @@
                quilt,
                rsync,
                xvfb, xauth, libgl1-mesa-dri, xdotool,
+               python3-numpy,
 Build-Conflicts: libglew-dev (= 1.9.0.is.1.8.0-0ubuntu1), libglew-dev (= 
1.9.0.is.1.8.0-0ubuntu2)
 Standards-Version: 4.3.0
 Homepage: http://psychtoolbox.org
@@ -133,6 +139,29 @@
  .
  This package contains bindings for Octave.
 
+Package: python3-psychtoolbox
+Architecture: any
+Depends:
+ ${python3:Depends},
+ ${shlibs:Depends},
+ ${misc:Depends},
+Description: toolbox for vision research -- Python bindings
+ Psychophysics Toolbox Version 3 (PTB-3) is a free set of Matlab and
+ GNU/Octave functions for vision research. It makes it easy to
+ synthesize and show accurately controlled visual and auditory stimuli
+ and interact with the observer.
+ .
+ The Psychophysics Toolbox interfaces between Matlab or Octave and the
+ computer hardware. The Psychtoolbox's core routines provide access to
+ the display frame buffer and color lookup table, allow
+ synchronization with the vertical retrace, support millisecond
+ timing, allow access to OpenGL commands, and facilitate the
+ collection of observer responses. Ancillary routines support common
+ needs like color space transformations and the QUEST threshold
+ seeking algorithm.
+ .
+ This package contains extra python bindings.
+
 Package: psychtoolbox-3-dbg
 Section: debug
 Architecture: any
diff -Nru psychtoolbox-3-3.0.19.14.dfsg1/debian/rules 
psychtoolbox-3-3.0.19.14.dfsg1/debian/rules
--- psychtoolbox-3-3.0.19.14.dfsg1/debian/rules 2024-08-12 15:38:17.000000000 
+0200
+++ psychtoolbox-3-3.0.19.14.dfsg1/debian/rules 2026-02-24 22:37:25.000000000 
+0100
@@ -32,6 +32,8 @@
 # Let's use "advanced" bash patterns
 export SHELL=/bin/bash
 
+export PYBUILD_NAME = psychtoolbox
+
 %:
        dh $@ --with quilt --buildsystem=makefile
 
@@ -78,6 +80,8 @@
        cd ./Psychtoolbox/PsychHardware/iViewXToolbox/tcp_udp_ip; \
                octave -q --eval "mex pnet.c"; [ -f pnet.mex ]
 
+       dh_auto_build --buildsystem=pybuild
+
        install --mode=0644 
PsychSourceGL/Cohorts/FTGLTextRenderer/libptbdrawtext_ftgl.so.1 \
           Psychtoolbox/PsychBasic/PsychPlugins
        install -T --mode=0644 managementtools/WelcomeSplash-dfsg.ppm 
./Psychtoolbox/PsychBasic/WelcomeSplash.ppm
@@ -128,6 +132,8 @@
       -e PTBAndIsetbioColorimetryTest \
        | xargs debian/run_tests || echo "TESTS FAILED"
 
+       dh_auto_test --buildsystem=pybuild
+
 #      -e MovieDemos \
        : # Cleanup
        find -iname MLIexpSubj11.txt -delete
@@ -139,6 +145,7 @@
 
 override_dh_auto_install:
        dh_auto_install
+       dh_auto_install --buildsystem=pybuild
        : # to guarantee -common existance for arch-dep builds only:
        mkdir -p $(OCT_SHAREDDIR)
        rsync -a --exclude=*.o ./Psychtoolbox/ $(OCT_SHAREDDIR)

Attachment: signature.asc
Description: PGP signature

Reply via email to