summaryrefslogtreecommitdiffstats
path: root/debian/_base/libraries/pytde
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2023-01-03 15:48:09 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2023-01-08 21:02:25 +0900
commit328096e4edbd37b6e5b012cef3c78e311f26655f (patch)
treeb78af02b0cb73c40d7270efa939a4d5d72532b35 /debian/_base/libraries/pytde
parentf963f7aac5a1c2cd3f09dfb5dc14e16fc1f7c7a6 (diff)
downloadtde-packaging-328096e4edbd37b6e5b012cef3c78e311f26655f.tar.gz
tde-packaging-328096e4edbd37b6e5b012cef3c78e311f26655f.zip
DEB pytde: drop python 2 support.
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it> Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
Diffstat (limited to 'debian/_base/libraries/pytde')
-rw-r--r--debian/_base/libraries/pytde/debian/control21
-rw-r--r--debian/_base/libraries/pytde/debian/pytdeconfig.py6
-rw-r--r--debian/_base/libraries/pytde/debian/python-pytde.install3
-rw-r--r--debian/_base/libraries/pytde/debian/python3-pytde.install2
-rwxr-xr-xdebian/_base/libraries/pytde/debian/rules35
5 files changed, 31 insertions, 36 deletions
diff --git a/debian/_base/libraries/pytde/debian/control b/debian/_base/libraries/pytde/debian/control
index 064f7462c..a34b799f1 100644
--- a/debian/_base/libraries/pytde/debian/control
+++ b/debian/_base/libraries/pytde/debian/control
@@ -4,28 +4,25 @@ Priority: optional
Maintainer: TDE Debian Team <team-debian@trinitydesktop.org>
XSBC-Original-Maintainer: Ricardo Javier Cardenes Medina <rcardenes@debian.org>
Uploaders: Torsten Marek <shlomme@debian.org>, Debian Python Modules Team <python-modules-team@lists.alioth.debian.org>
-Build-Depends: debhelper (>= 9~), libtqtinterface-dev, python-support (>= 0.7.1) | dh-python, python-all, python-all-dev, python-all-dbg, python-sip-tqt, python-sip-tqt-dev, python-sip-tqt-dbg, pytqt-dev, python-pytqt-dbg, tdelibs14-trinity-dev
+Build-Depends: debhelper (>= 9~), libtqtinterface-dev, dh-python, python3-all-dev, python3-all-dbg, python3-sip-tqt, python3-sip-tqt-dev, python3-sip-tqt-dbg, pytqt-dev, python3-pytqt-dbg, tdelibs14-trinity-dev
Standards-Version: 3.8.4
Homepage: http://www.riverbankcomputing.co.uk/pytde/index.php
-Package: python-pytde
+Package: python3-pytde
Architecture: any
-Depends: ${shlibs:Depends}, ${python:Depends}, python-pytqt
-Replaces: python-trinity-trinity (<< 4:14.1.0~)
+Depends: ${shlibs:Depends}, ${python3:Depends}, python3-pytqt
Breaks: python-trinity-trinity (<< 4:14.1.0~)
-Provides: ${python:Provides}
-Description: Trinity bindings for Python [Trinity]
+Provides: ${python3:Provides}
+Description: Trinity bindings for Python 3 [Trinity]
Python binding module that provides wide access to the Trinity API,
also known as PyTDE. Using this, you'll get (for example) classes
from kio, kjs, tdehtml and kprint.
-Package: python-pytde-dbg
+Package: python3-pytde-dbg
Priority: extra
Architecture: any
-Replaces: python-trinity-trinity-dbg (<< 4:14.1.0~)
-Breaks: python-trinity-trinity-dbg (<< 4:14.1.0~)
-Depends: python-pytde (= ${binary:Version}), python-all-dbg, python-pytqt-dbg, ${shlibs:Depends}
-Description: Trinity bindings for Python (debug extensions) [Trinity]
+Depends: python3-pytde (= ${binary:Version}), python3-all-dbg, python3-pytqt-dbg, ${shlibs:Depends}
+Description: Trinity bindings for Python 3 (debug extensions) [Trinity]
Python binding module that provides wide access to the Trinity API,
also known as PyTDE. Using this, you'll get (for example) classes
from kio, kjs, tdehtml and kprint.
@@ -37,7 +34,7 @@ Section: python
Architecture: all
Replaces: python-trinity-trinity-dev (<< 4:14.1.0~)
Breaks: python-trinity-trinity-dev (<< 4:14.1.0~)
-Depends: pytqt-tools, ${python:Depends}
+Depends: pytqt-tools, ${python3:Depends}
Description: Trinity bindings for Python - Development files and scripts [Trinity]
Development .sip files with definitions of PyTDE classes. They
are needed to build PyTDE, but also as building blocks of other
diff --git a/debian/_base/libraries/pytde/debian/pytdeconfig.py b/debian/_base/libraries/pytde/debian/pytdeconfig.py
index eac264752..4536b9ff5 100644
--- a/debian/_base/libraries/pytde/debian/pytdeconfig.py
+++ b/debian/_base/libraries/pytde/debian/pytdeconfig.py
@@ -2,10 +2,10 @@
import sys
-if getattr(sys, "pydebug", False):
+if 'd' in sys.abiflags:
try:
from pytdeconfig_d import *
- except ImportError, msg:
- raise ImportError, 'No module named pytdeconfig; package python-trinity-dbg not installed'
+ except ImportError as msg:
+ raise ImportError('No module named pytdeconfig; package python-trinity-dbg not installed')
else:
from pytdeconfig_nd import *
diff --git a/debian/_base/libraries/pytde/debian/python-pytde.install b/debian/_base/libraries/pytde/debian/python-pytde.install
deleted file mode 100644
index facee2907..000000000
--- a/debian/_base/libraries/pytde/debian/python-pytde.install
+++ /dev/null
@@ -1,3 +0,0 @@
-usr/lib/python*/*-packages/*.so
-usr/lib/python*/*-packages/dcop*.py
-
diff --git a/debian/_base/libraries/pytde/debian/python3-pytde.install b/debian/_base/libraries/pytde/debian/python3-pytde.install
new file mode 100644
index 000000000..a3546ced0
--- /dev/null
+++ b/debian/_base/libraries/pytde/debian/python3-pytde.install
@@ -0,0 +1,2 @@
+usr/lib/python3*/*-packages/*.so
+usr/lib/python3*/*-packages/dcop*.py
diff --git a/debian/_base/libraries/pytde/debian/rules b/debian/_base/libraries/pytde/debian/rules
index 35fab1aba..92d121fac 100755
--- a/debian/_base/libraries/pytde/debian/rules
+++ b/debian/_base/libraries/pytde/debian/rules
@@ -1,5 +1,4 @@
#!/usr/bin/make -f
-# -*- makefile -*-
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
@@ -21,10 +20,14 @@ DEB_DH_BUILDDEB_ARGS += -- -Z$(shell dpkg-deb --help | grep -q ":.* xz[,.]" \
&& echo xz || echo bzip2)
endif
-# This has to be exported to make some magic below work.
+export DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
+export DEB_HOST_ARCH_CPU ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_CPU)
+export DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
+
export DH_OPTIONS
-export QTDIR=/usr/share/qt3
-export QMAKESPEC=$(QTDIR)/mkspecs/linux-g++
+
+export TQTDIR=/usr/share/tqt3
+export QMAKESPEC=$(TQTDIR)/mkspecs/linux-g++
CXXFLAGS = -Wall -g
@@ -34,10 +37,8 @@ else
CXXFLAGS += -O2
endif
-PYTHONS := $(shell pyversions -vr debian/control)
-DBG_PYTHONS := $(shell pyversions -vd)
-
-DH_PYTHON2 = $(if $(wildcard /usr/bin/dh_python2),dh_python2,dh_python)
+PYTHONS := $(shell py3versions -vd)
+DBG_PYTHONS := $(shell py3versions -vd)
GCCVER := $(shell gcc --version | sed -n '/^gcc (GCC)/s/.*(GCC) \(...\).*/\1/p')
ifneq (,$(filter $(GCCVER),4.2 4.3))
@@ -55,7 +56,6 @@ build-%/configure-stamp:
mkdir -p build-$*
cd build-$* && python$* ../configure.py \
-c -u -k /opt/trinity -o /opt/trinity/include -n /opt/trinity/lib \
- -e python$* \
-v /usr/share/sip-tqt/trinity -j $(SPLIT)
touch $@
@@ -64,7 +64,6 @@ dbg-build-%/configure-stamp:
mkdir -p dbg-build-$*
cd dbg-build-$* && python$*-dbg ../configure.py \
-c -u -k /opt/trinity -o /opt/trinity/include -n /opt/trinity/lib \
- -e python$* \
-v /usr/share/sip-tqt/trinity -j $(SPLIT)
touch $@
@@ -130,21 +129,21 @@ install-arch:
set -e; \
for version in ${DBG_PYTHONS}; do \
- $(MAKE) -C dbg-build-$$version install DESTDIR=$(CURDIR)/debian/python-pytde-dbg;\
+ $(MAKE) -C dbg-build-$$version install DESTDIR=$(CURDIR)/debian/python3-pytde-dbg;\
done
dh_install -a --sourcedir=$(CURDIR)/debian/tmp
- mkdir -p $(CURDIR)/debian/python-pytde/opt/trinity/lib/
- ln -s /opt/trinity/lib/trinity/libkonsolepart.so $(CURDIR)/debian/python-pytde/opt/trinity/lib/
- for i in $$(find debian/python-*-dbg -name '*.so'); do \
+ mkdir -p $(CURDIR)/debian/python3-pytde/opt/trinity/lib/
+ ln -s /opt/trinity/lib/trinity/libkonsolepart.so $(CURDIR)/debian/python3-pytde/opt/trinity/lib/
+ for i in $$(find debian/python3-*-dbg -name '*.so'); do \
b=$$(basename $$i .so); \
mv $$i $$(dirname $$i)/$${b}_d.so; \
done
- find debian/python-*-dbg ! -type d \
+ find debian/python3-*-dbg ! -type d \
! \( -name '*.so' -o -name '*config_d.py' \) | xargs rm -f
- find debian/python-*-dbg -depth -type d -empty -exec rmdir {} \;
+ find debian/python3-*-dbg -depth -type d -empty -exec rmdir {} \;
# Must not depend on anything. This is to be called by
@@ -158,11 +157,11 @@ binary-common:
dh_installexamples
dh_link
ifeq (,$(findstring -i, $(DH_OPTIONS)))
- DH_OPTIONS= dh_strip -ppython-pytde #--dbg-package=python-pytde-dbg
+ DH_OPTIONS= dh_strip -ppython3-pytde #--dbg-package=python3-pytde-dbg
endif
dh_compress -X.py -X.ui -X.dtd
dh_fixperms
- ${DH_PYTHON2}
+ dh_python3 --no-dbg-cleaning
dh_installdeb
dh_shlibdeps -l /opt/trinity/lib
dh_gencontrol