Commit 0ab7dbd5 authored by Jonas Smedegaard's avatar Jonas Smedegaard

Build with python3 (in addition to python2, for now). Build-depend on python3....

Build with python3 (in addition to python2, for now). Build-depend on python3. Provide binary package python3-sugar3, depending on python3-cairo python3-dateutil python3-dbus python3-decorator python3-gi python3-gi-cairo python3-six. Closes: Bug#931666, #938595. Thanks to Aniket Mathur and Matthias Klose.
parent 972c7e5e
build-python2/
......@@ -29,6 +29,7 @@ Build-Depends:
# linux-libc-dev/hurd-dev needed by sugar-fatattr
linux-libc-dev [linux-any],
python,
python3,
x11proto-core-dev,
Standards-Version: 4.4.0
Vcs-Git: https://salsa.debian.org/pkg-sugar-team/sugar-toolkit-gtk3.git
......@@ -159,6 +160,64 @@ Description: Sugar Learning Platform - toolkit Python bindings
.
This package contains Python bindings.
Package: python3-sugar3
Architecture: all
Depends:
gir1.2-atspi-2.0,
gir1.2-gdkpixbuf-2.0,
gir1.2-glib-2.0,
gir1.2-gtk-3.0,
gir1.2-pango-1.0,
gir1.2-rsvg-2.0,
# TODO: relax dependencies for our own GIR when its API is stable
gir1.2-sugarext-1.0 (<< ${source:Version}.1~),
gir1.2-sugarext-1.0 (>= ${source:Version}),
gir1.2-telepathyglib-0.12,
python3-cairo,
python3-dateutil,
python3-dbus,
python3-decorator,
python3-gi,
python3-gi-cairo,
python3-six,
${misc:Depends},
${python3:Depends},
Recommends:
# alsa-utils (mayby still) needed to unmute devices at boot (bug#581504)
alsa-utils,
gir1.2-webkit2-4.0,
gir1.2-webkit2-4.0 | gir1.2-webkit-3.0,
# gstreamer1.0-espeak used in sugar3.speech
gstreamer1.0-espeak,
# gstreamer1.0-plugins-good (autoaudiosink) used in sugar3.speech
gstreamer1.0-plugins-good,
# shared-mime-info (update-mime-database) used in sugar.bundle.bundlebuilder
shared-mime-info,
telepathy-mission-control-5,
telepathy-salut,
# unzip used in sugar3.bundle.bundle
unzip,
Suggests:
# git used in sugar3.activity.bundlebuilder
git,
ipython3,
# Carquinol used in sugar3.datastore.*
python3-carquinyol,
Provides:
${python3:Provides},
Description: Sugar Learning Platform - toolkit Python3 bindings
Sugar Learning Platform promotes collaborative learning
through Sugar Activities that encourage critical thinking,
the heart of a quality education.
Designed from the ground up especially for children,
Sugar offers an alternative to traditional "office-desktop" software.
.
The sugar3 library contains a set of widgets
to build HIG compliant applications and interfaces
to interact with system services like presence and the datastore.
.
This package contains Python3 bindings.
Package: gir1.2-sugarext-1.0
Section: introspection
Architecture: any
......
usr/bin
usr/lib/python*
usr/bin/sugar-activity
usr/lib/python2*
usr/bin/sugar-activity3
usr/bin/sugar-activity-web
usr/lib/python3*
......@@ -11,8 +11,20 @@ export DEB_LDFLAGS_MAINT_APPEND = -Wl,-O1
# link only when needed
export DEB_LDFLAGS_MAINT_APPEND += -Wl,--as-needed
override_dh_auto_configure:
dh_auto_configure --builddir=build-python2 -- --with-python2
dh_auto_configure -- --with-python3
override_dh_auto_make:
dh_auto_make --builddir=build-python2
dh_auto_make
override_dh_auto_test:
override_dh_auto_install:
dh_auto_install --builddir=build-python2
dh_auto_install
override_dh_install-arch:
dh_install
# Let d-shlibs calculate development package dependencies
......@@ -25,9 +37,10 @@ override_dh_install-arch:
--extralib debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/libsugar-eventcontroller.so \
debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/libsugarext.so
# Ensure proper hash-bang in Python script (Python Policy 0.9 §3.1)
egrep -r -l -Z '^#! ?/usr/bin/(env )?python[[:print:]]*$$' \
debian/*/usr/bin/* \
| xargs -r -0 perl -pi -e 's,^#! ?/usr/bin/(env )?python[[:print:]]*$$,#!/usr/bin/python2,'
perl -pi -e 's,^#! ?/usr/bin/(env )?python[[:print:]]*$$,#!/usr/bin/python2,' \
debian/*/usr/bin/sugar-activity
perl -pi -e 's,^#! ?/usr/bin/(env )?python[[:print:]]*$$,#!/usr/bin/python3,' \
debian/*/usr/bin/sugar-activity3
override_dh_install-indep:
dh_install --indep
......@@ -44,4 +57,4 @@ override_dh_strip:
dh_strip --dbgsym-migration='libsugarext-dbg (<< 0.116-5~)'
%:
dh $@ --with gir,python2 $(DH_OPTIONS:-O%=%)
dh $@ --with gir,python2,python3 $(DH_OPTIONS:-O%=%)
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