#!/usr/bin/make -f

DH_VERBOSE=1

pybasever  := 3.8
pyshortver := 38

export SHELL = /bin/bash
export HOME=$(CURDIR)/build
export BUILD_DIR=$(shell pwd)
export PYBUILD_DISABLE_python2=1
export PYTHONWARNINGS=d
export ALTNAME=alt-python$(pyshortver)

vafilt				= $(subst $(2)=,,$(filter $(2)=%,$(1)))
DPKG_VARS			:= $(shell dpkg-architecture)
DEB_BUILD_ARCH			?= $(call vafilt,$(DPKG_VARS),DEB_BUILD_ARCH)
DEB_BUILD_GNU_TYPE		?= $(call vafilt,$(DPKG_VARS),DEB_BUILD_GNU_TYPE)
DEB_BUILD_MULTIARCH		?= $(call vafilt,$(DPKG_VARS),DEB_BUILD_MULTIARCH)
DEB_HOST_ARCH			?= $(call vafilt,$(DPKG_VARS),DEB_HOST_ARCH)
DEB_HOST_ARCH_ENDIAN		?= $(call vafilt,$(DPKG_VARS),DEB_HOST_ARCH_ENDIAN)
DEB_HOST_ARCH_OS		?= $(call vafilt,$(DPKG_VARS),DEB_HOST_ARCH_OS)
DEB_HOST_GNU_TYPE		?= $(call vafilt,$(DPKG_VARS),DEB_HOST_GNU_TYPE)
DEB_HOST_MULTIARCH		?= $(call vafilt,$(DPKG_VARS),DEB_HOST_MULTIARCH)

buildroot := $(CURDIR)/debian/tmp

_sourcedir := debian/source
_prefix := /opt/alt/python$(pyshortver)
_bindir := $(_prefix)/bin
wordsize := 64
_libdir := $(_prefix)/lib
_includedir := $(_prefix)/include
_datadir := $(_prefix)/share
_mandir := $(_prefix)/share/man
_metainfodir := $(_prefix)/share/metainfo
_pyconfig32_h := pyconfig-32.h
_pyconfig64_h := pyconfig-64.h
_pyconfig_h := pyconfig-$(wordsize).h
uname_m := $(shell uname -m)

Source10 := debian/source/idle3.desktop
Source11 := debian/source/idle3.appdata.xml

# 1) build python3 with BOOTSTRAP=1
# 2) python3-setuptools and python3-wheel with BOOTSTRAP=1
# 3) python3-pip
# 4) python3-setuptools and python3-wheel with without bootstrap
# 5) python3 with without bootstrap

ifeq ($(bootstrap),1)
  # get ensurepip version: grep -oP '(?<=^_PIP_VERSION = ").*(?=")' Lib/ensurepip/__init__.py
  pip_version := 22.0.4
endif

export CPPFLAGS = -I/opt/alt/sqlite/usr/include
export LDFLAGS = -L/opt/alt/sqlite/usr/lib/$(DEB_BUILD_MULTIARCH)/ -Wl,-rpath=/opt/alt/sqlite/usr/lib/$(DEB_BUILD_MULTIARCH)/

export CPPFLAGS += $(shell dpkg-buildflags --get CPPFLAGS)
export LDFLAGS += -Wl,-rpath=${_libdir} -Wl,--enable-new-dtags
LDFLAGS += $(shell dpkg-buildflags --get LDFLAGS)
export CFLAGS_NODIST = -fno-semantic-interposition

pylibdir    := $(_libdir)/python$(pybasever)
sitelib	    := $(pylibdir)/site-packages
distlib	    := $(pylibdir)/dist-packages
dynload_dir := $(pylibdir)/lib-dynload

export ABIFLAGS_debug 	   := d

export LDVERSION_optimized := $(pybasever)
export LDVERSION_debug     := $(pybasever)$(ABIFLAGS_debug)

export SOABI_optimized := cpython-$(pyshortver)
export SOABI_debug	:= cpython-$(pyshortver)$(ABIFLAGS_debug)
ifneq (,$(filter $(DEB_HOST_ARCH), amd64 arm64))
export SOABI_optimized := cpython-$(pyshortver)-$(DEB_HOST_MULTIARCH)
export SOABI_debug	  := cpython-$(pyshortver)$(ABIFLAGS_debug)-$(DEB_HOST_MULTIARCH)
endif

bytecode_suffixes := .cpython-$(pyshortver)*.pyc

export py_SOVERSION := 1.0
export py_INSTSONAME_optimized := libpython$(LDVERSION_optimized).so.$(py_SOVERSION)
export py_INSTSONAME_debug 	:= libpython$(LDVERSION_debug).so.$(py_SOVERSION)

bootstrap               ?= 0
with_valgrind		:= 1
with_gdbm		:= 1
computed_gotos_flag 	:= yes
optimizations_flag      := --enable-optimizations
ifeq ($(bootstrap),1)
with_tests  		:= 0
with_rewheel		:= 0
with_debug_build	:= 0
with_gdb_hooks	:= 0
else
with_tests  		:= 1
with_rewheel		:= 1
with_debug_build	:= 1
with_gdb_hooks	:= 0
endif

NJOBS := -j$(shell getconf _NPROCESSORS_ONLN)

DPKG_CFLAGS := $(shell dpkg-buildflags --get CFLAGS)
DPKG_CFLAGS += -fno-semantic-interposition

CONF_EXTRA_OPT =
ifeq ($(with_valgrind),1)
CONF_EXTRA_OPT += --with-valgrind
endif

define BuildPython
mkdir -p build/$(1); \
cd build/$(1); \
$(BUILD_DIR)/configure \
--prefix=$(_prefix) \
--libdir=$(_libdir) \
--enable-ipv6 \
--enable-shared \
--with-computed-gotos=yes \
--with-dbmliborder=gdbm:ndbm:bdb \
--with-system-expat \
--with-system-ffi \
--enable-loadable-sqlite-extensions \
--with-lto \
--with-dtrace \
--with-ssl-default-suites=openssl \
$(2) \
$(CONF_EXTRA_OPT);

cd $(BUILD_DIR); \
$(if $(ifndef bootstrap),$(MAKE) -C build/$(1) $(NJOBS) EXTRA_CFLAGS="$(3)" CFLAGS_NODIST+="$(3)" $(4) \,)
$(MAKE) -C build/$(1) $(NJOBS) EXTRA_CFLAGS="$(3)" CFLAGS_NODIST+="$(3)"
endef

# Use a common function to do an install for all our configurations:

define InstallPython
cd $(BUILD_DIR); \
$(MAKE) -C build/$(1) install \
	DESTDIR=$(buildroot) \
	INSTALL="install -p" \
	EXTRA_CFLAGS="$(3)"

mv ${buildroot}${_bindir}/python${4}-config \
${buildroot}${_bindir}/python${4}-$(uname_m)-config
echo -e '#!/bin/sh\nexec $(shell dirname $0)/python$${4}-$(uname_m)-config "$$@"' > \
  ${buildroot}${_bindir}/python${4}-config
echo '[ $? -eq 127 ] && echo "Could not find python$${4}-$(uname_m)-config. Look around to see available arches." >&2' >> \
  ${buildroot}${_bindir}/python${4}-config
chmod +x ${buildroot}${_bindir}/python${4}-config
mv ${buildroot}${_includedir}/python${4}/pyconfig.h \
  ${buildroot}${_includedir}/python${4}/${_pyconfig_h}
echo "#include <bits/wordsize.h>" > ${buildroot}${_includedir}/python${4}/pyconfig.h
echo "" >> ${buildroot}${_includedir}/python${4}/pyconfig.h
echo "#if __WORDSIZE == 32" >> ${buildroot}${_includedir}/python${4}/pyconfig.h
echo "#include \"${_pyconfig32_h}\"" >> ${buildroot}${_includedir}/python${4}/pyconfig.h
echo "#elif __WORDSIZE == 64" >> ${buildroot}${_includedir}/python${4}/pyconfig.h
echo "#include \"${_pyconfig64_h}\"" >> ${buildroot}${_includedir}/python${4}/pyconfig.h
echo "#else" >> ${buildroot}${_includedir}/python${4}/pyconfig.h
echo "#error "Unknown word size"" >> ${buildroot}${_includedir}/python${4}/pyconfig.h
echo "#endif" >> ${buildroot}${_includedir}/python${4}/pyconfig.h
endef


%:
	dh $@

override_dh_auto_configure:
	find -name '*.exe' -print -delete
	rm -r Modules/expat
#	patch -p1 < debian/patches/00001-rpath.patch
#	patch -p1 < debian/patches/00102-lib64.patch
	patch -p1 < debian/patches/00111-no-static-lib.patch
ifeq ($(with_rewheel),1)
	patch -p1 < debian/patches/00189-use-rpm-wheels.patch
	rm Lib/ensurepip/_bundled/*.whl
endif
#	patch -p1 < debian/patches/00251-change-user-install-location.patch
	patch -p1 < debian/patches/00328-pyc-timestamp-invalidation-mode.patch
	patch -p1 < debian/patches/distutils-install-layout.patch
	patch -p1 < debian/patches/06000-replacement_sqlite_on_alt-sqlite.patch

	patch -p1 < debian/patches/CVE-2024-9287.patch
	patch -p1 < debian/patches/CVE-2025-12084.patch
	patch -p1 < debian/patches/CVE-2025-13836.patch
	patch -p1 < debian/patches/CVE-2025-13837.patch
	patch -p1 < debian/patches/CVE-2024-12718-CVE-2025-4138-CVE-2025-4330-CVE-2025-4435-CVE-2025-4517.patch
	patch -p1 < debian/patches/CVE-2025-6075.patch
	patch -p1 < debian/patches/CVE-2025-8194.patch
	patch -p1 < debian/patches/CVE-2026-4519.patch
	patch -p1 < debian/patches/CVE-2026-6100.patch
	patch -p1 < debian/patches/CVE-2026-1299.patch
	patch -p1 < debian/patches/CVE-2026-3446.patch
	patch -p1 < debian/patches/support-control-characters-c0.patch
	patch -p1 < debian/patches/CVE-2025-15282.patch
	patch -p1 < debian/patches/CVE-2026-0672.patch
	patch -p1 < debian/patches/CVE-2026-3644.patch
	patch -p1 < debian/patches/CVE-2026-4224.patch
	patch -p1 < debian/patches/CVE-2026-7210.patch
	patch -p1 < debian/patches/CVE-2024-11168.patch
	patch -p1 < debian/patches/CVE-2025-0938.patch
	patch -p1 < debian/patches/CVE-2025-1795.patch
	patch -p1 < debian/patches/CVE-2025-11468.patch
	patch -p1 < debian/patches/CVE-2025-4516.patch
	patch -p1 < debian/patches/CVE-2025-6069.patch
	patch -p1 < debian/patches/CVE-2025-8291.patch
	patch -p1 < debian/patches/CVE-2025-13462.patch
	patch -p1 < debian/patches/CVE-2026-0865.patch
	patch -p1 < debian/patches/CVE-2026-1502.patch
	patch -p1 < debian/patches/CVE-2026-8328.patch
	patch -p1 < debian/patches/CVE-2026-6019.patch
	patch -p1 < debian/patches/CVE-2025-15366.patch
	patch -p1 < debian/patches/CVE-2025-15367.patch
	patch -p1 < debian/patches/CVE-2026-9669.patch

# Remove files that should be generated by the build
# (This is after patching, so that we can use patches directly from upstream)
	rm configure pyconfig.h.in
# Regenerate the configure script and pyconfig.h.in
	autoconf
	autoheader
	sed -i 's!@PYTHON_FOR_REGEN@!/opt/alt/python$(pyshortver)/bin/python$(pybasever)!' Makefile.pre.in

override_dh_auto_build:
# Call the above to build each configuration.
ifeq ($(with_debug_build),1)
	$(call BuildPython,debug,--without-ensurepip --with-pydebug,-Og,regen-all PYTHON_FOR_REGEN=${_bindir}/python${pybasever})
endif # with_debug_build
	$(call BuildPython,optimized,--without-ensurepip --enable-optimizations,,regen-all PYTHON_FOR_REGEN=${_bindir}/python${pybasever})

# ======================================================
# Installing the built code:
# ======================================================

override_dh_auto_install:
# We install a collection of hooks for gdb that make it easier to debug
# executables linked against libpython3* (such as /usr/bin/python3 itself)
#
# These hooks are implemented in Python itself (though they are for the version
# of python that gdb is linked with)
#
# gdb-archer looks for them in the same path as the ELF file or its .debug
# file, with a -gdb.py suffix.
# We put them next to the debug file, because ldconfig would complain if
# it found non-library files directly in /usr/lib/
# (see https://bugzilla.redhat.com/show_bug.cgi?id=562980)
#
# We'll put these files in the debuginfo package by installing them to e.g.:
#  /usr/lib/debug/usr/lib/libpython3.2.so.1.0.debug-gdb.py
# (note that the debug path is /usr/lib/debug for both 32/64 bit)
#
# See https://fedoraproject.org/wiki/Features/EasierPythonDebugging for more
# information

ifeq ($(with_debug_build),1)
	$(call InstallPython,debug,$(py_INSTSONAME_debug),-O0,$(LDVERSION_debug))
endif

# Now the optimized build:
	$(call InstallPython,optimized,$(py_INSTSONAME_optimized),,$(LDVERSION_optimized))

# Install directories for additional packages
	install -d -m 0755 $(buildroot)$(sitelib)/__pycache__

# add idle3 to menu
	install -D -m 0644 Lib/idlelib/Icons/idle_16.png $(buildroot)$(_datadir)/icons/hicolor/16x16/apps/idle3.png
	install -D -m 0644 Lib/idlelib/Icons/idle_32.png $(buildroot)$(_datadir)/icons/hicolor/32x32/apps/idle3.png
	install -D -m 0644 Lib/idlelib/Icons/idle_48.png $(buildroot)$(_datadir)/icons/hicolor/48x48/apps/idle3.png
	desktop-file-install --dir=$(buildroot)$(_datadir)/applications $(Source10)

# Install and validate appdata file
	mkdir -p $(buildroot)$(_metainfodir)
	cp -a $(Source11) $(buildroot)$(_metainfodir)
	#appstream-util validate-relax --nonet $(buildroot)$(_metainfodir)/idle3.appdata.xml

# Make sure distutils looks at the right pyconfig.h file
# See https://bugzilla.redhat.com/show_bug.cgi?id=201434
# Similar for sysconfig: sysconfig.get_config_h_filename tries to locate
# pyconfig.h so it can be parsed, and needs to do this at runtime in site.py
# when python starts up (see https://bugzilla.redhat.com/show_bug.cgi?id=653058)
#
# Split this out so it goes directly to the pyconfig-32.h/pyconfig-64.h
# variants:
	find $(CURDIR) -name 'sysconfig.py'
	sed -i -e "s/'pyconfig.h'/'$(_pyconfig_h)'/" \
	  $(buildroot)$(pylibdir)/distutils/sysconfig.py \
	  $(buildroot)$(pylibdir)/sysconfig.py

# Install pathfix.py to bindir
# See https://github.com/fedora-python/python-rpm-porting/issues/24
	cp -p Tools/scripts/pathfix.py $(buildroot)$(_bindir)/

# Install i18n tools to bindir
# They are also in python2, so we version them
# https://bugzilla.redhat.com/show_bug.cgi?id=1571474
	for tool in pygettext msgfmt; do \
	  cp -p Tools/i18n/$${tool}.py $(buildroot)$(_bindir)/$${tool}$(pybasever).py; \
	  ln -s $${tool}$(pybasever).py $(buildroot)$(_bindir)/$${tool}3.py; \
	done

# Switch all shebangs to refer to the specific Python version.
# This currently only covers files matching ^[a-zA-Z0-9_]+\.py$,
# so handle files named using other naming scheme separately.
	ls -l $(HOME)/optimized
	LD_LIBRARY_PATH=$(HOME)/optimized \
	  Tools/scripts/pathfix.py \
	  -i "$(_bindir)/python$(pybasever)" -pn \
	  $(buildroot) \
	  $(buildroot)$(_bindir)/*$(pybasever).py
ifeq ($(with_gdb_hooks),1)
	  $(buildroot)$(DirHoldingGdbPy)/*.py
endif
# Remove tests for python3-tools which was removed in
# https://bugzilla.redhat.com/show_bug.cgi?id=1312030
	rm -rf $(buildroot)$(pylibdir)/test/test_tools

# Remove shebang lines from .py files that aren't executable, and
# remove executability from .py files that don't have a shebang line:
	find $(buildroot) -name \*.py \
	  \( \( \! -perm /u+x,g+x,o+x -exec sed -e '/^#!/Q 0' -e 'Q 1' {} \; \
	  -print -exec sed -i '1d' {} \; \) -o \( \
	  -perm /u+x,g+x,o+x ! -exec grep -m 1 -q '^#!' {} \; \
	  -exec chmod a-x {} \; \) \)

# Get rid of DOS batch files:
	find $(buildroot) -name \*.bat -exec rm {} \;

# Get rid of backup files:
	find $(buildroot)/ -name "*~" -exec rm -f {} \;
	find . -name "*~" -exec rm -f {} \;

	find -name 'py_compile.py'

# Since we have pathfix.py in bindir, this is created, but we don't want it
	rm -rf $(buildroot)$(_bindir)/__pycache__

# Do bytecompilation with the newly installed interpreter.
# This is similar to the script in macros.pybytecompile
# compile *.pyc
	find $(buildroot) -type f -a -name "*.py" -print0 | \
	    LD_LIBRARY_PATH="$(buildroot)$(dynload_dir):$(buildroot)$(_libdir)" \
	    PYTHONPATH="$(buildroot)$(_libdir)/python$(pybasever):$(buildroot)$(sitelib)" \
	    xargs -0 $(buildroot)$(_bindir)/python$(pybasever) -O -c 'import py_compile, sys; [py_compile.compile(f, dfile=f.partition("$(buildroot)")[2], optimize=opt) for opt in range(3) for f in sys.argv[1:]]' || :

# Since we have pathfix.py in bindir, this is created, but we don't want it
	rm -rf $(buildroot)$(_bindir)/__pycache__

# Fixup permissions for shared libraries from non-standard 555 to standard 755:
	find $(buildroot) -perm 555 -exec chmod 755 {} \;

# Fixup permissions for shared libraries from non-standard 777 to standard 755:
	find $(buildroot) -perm 777 -exec chmod 755 {} \;

# Create "/usr/bin/python3-debug", a symlink to the python3 debug binary, to
# avoid the user having to know the precise version and ABI flags.
# See e.g. https://bugzilla.redhat.com/show_bug.cgi?id=676748
ifeq ($(with_debug_build),1)
	ln -s python$(LDVERSION_debug) $(buildroot)$(_bindir)/python3-debug
endif

# There's 2to3-X.X executable and 2to3 soft link to it.
# No reason to have both, so keep only 2to3 as an executable.
# See https://bugzilla.redhat.com/show_bug.cgi?id=1111275
	mv $(buildroot)$(_bindir)/2to3-$(pybasever) $(buildroot)$(_bindir)/2to3

	mkdir -p $(buildroot)$(_prefix)/etc/
	echo "[python$(pybasever)]" > $(buildroot)$(_prefix)/etc/locked_extensions.ini

override_dh_shlibdeps:
	rm -rf $(buildroot)$(_bindir)/__pycache__
	dh_shlibdeps

# Packaging
	dh_movefiles -palt-python$(pyshortver) \
	  .${_prefix}/etc/locked_extensions.ini \
	  .${_bindir}/pydoc* \
	  .${_bindir}/python3 \
	  .${_bindir}/python${pybasever} \
	  .${_bindir}/python${LDVERSION_optimized} \
	  .${_mandir}/*/*3*

	dh_installdirs -palt-python$(pyshortver)-libs -A \
          $(_libdir) \
          $(pylibdir) \
          $(dynload_dir) \
	  ${pylibdir}/lib2to3 \
          $(sitelib)/__pycache__ \
	  ${pylibdir}/unittest \

	dh_movefiles -palt-python$(pyshortver)-libs \
	  -X.${pylibdir}/lib2to3/tests \
	  -X.${pylibdir}/turtle.py \
	  -X.${pylibdir}/__pycache__/turtle*${bytecode_suffixes} \
	  .${pylibdir}/unittest/*.py \
	  .${pylibdir}/unittest/__pycache__/*${bytecode_suffixes} \
	  .${pylibdir}/asyncio/*.py \
	  .${pylibdir}/asyncio/__pycache__/*${bytecode_suffixes} \
	  .${pylibdir}/venv/*.py \
	  .${pylibdir}/venv/__pycache__/*${bytecode_suffixes} \
	  .${pylibdir}/venv/scripts \
	  .${pylibdir}/wsgiref \
	  .${pylibdir}/xmlrpc \
	  .${pylibdir}/ensurepip/*.py \
	  .${pylibdir}/ensurepip/__pycache__/*${bytecode_suffixes} \
	  .${pylibdir}/concurrent/*.py \
	  .${pylibdir}/concurrent/__pycache__/*${bytecode_suffixes} \
	  .${pylibdir}/concurrent/futures/*.py \
	  .${pylibdir}/concurrent/futures/__pycache__/*${bytecode_suffixes} \
	  .${pylibdir}/pydoc_data \
	  .${dynload_dir}/_blake2.${SOABI_optimized}.so \
	  .${dynload_dir}/_md5.${SOABI_optimized}.so \
	  .${dynload_dir}/_sha1.${SOABI_optimized}.so \
	  .${dynload_dir}/_sha256.${SOABI_optimized}.so \
	  .${dynload_dir}/_sha3.${SOABI_optimized}.so \
	  .${dynload_dir}/_sha512.${SOABI_optimized}.so \
	  .${dynload_dir}/_asyncio.${SOABI_optimized}.so \
	  .${dynload_dir}/_bisect.${SOABI_optimized}.so \
	  .${dynload_dir}/_bz2.${SOABI_optimized}.so \
	  .${dynload_dir}/_codecs_cn.${SOABI_optimized}.so \
	  .${dynload_dir}/_codecs_hk.${SOABI_optimized}.so \
	  .${dynload_dir}/_codecs_iso2022.${SOABI_optimized}.so \
	  .${dynload_dir}/_codecs_jp.${SOABI_optimized}.so \
	  .${dynload_dir}/_codecs_kr.${SOABI_optimized}.so \
	  .${dynload_dir}/_codecs_tw.${SOABI_optimized}.so \
	  .${dynload_dir}/_contextvars.${SOABI_optimized}.so \
	  .${dynload_dir}/_crypt.${SOABI_optimized}.so \
	  .${dynload_dir}/_csv.${SOABI_optimized}.so \
	  .${dynload_dir}/_ctypes.${SOABI_optimized}.so \
	  .${dynload_dir}/_curses.${SOABI_optimized}.so \
	  .${dynload_dir}/_curses_panel.${SOABI_optimized}.so \
	  .${dynload_dir}/_dbm.${SOABI_optimized}.so \
	  .${dynload_dir}/_decimal.${SOABI_optimized}.so \
	  .${dynload_dir}/_elementtree.${SOABI_optimized}.so \
	  .${dynload_dir}/_heapq.${SOABI_optimized}.so \
	  .${dynload_dir}/_json.${SOABI_optimized}.so \
	  .${dynload_dir}/_opcode.${SOABI_optimized}.so \
	  .${dynload_dir}/_xxtestfuzz.${SOABI_optimized}.so \
	  .${dynload_dir}/_lsprof.${SOABI_optimized}.so \
	  .${dynload_dir}/_hashlib.${SOABI_optimized}.so \
	  .${dynload_dir}/_lzma.${SOABI_optimized}.so \
	  .${dynload_dir}/_multibytecodec.${SOABI_optimized}.so \
	  .${dynload_dir}/_multiprocessing.${SOABI_optimized}.so \
	  .${dynload_dir}/_pickle.${SOABI_optimized}.so \
	  .${dynload_dir}/_posixsubprocess.${SOABI_optimized}.so \
	  .${dynload_dir}/_queue.${SOABI_optimized}.so \
	  .${dynload_dir}/_random.${SOABI_optimized}.so \
	  .${dynload_dir}/_socket.${SOABI_optimized}.so \
	  .${dynload_dir}/_sqlite3.${SOABI_optimized}.so \
	  .${dynload_dir}/_ssl.${SOABI_optimized}.so \
	  .${dynload_dir}/_statistics.${SOABI_optimized}.so \
	  .${dynload_dir}/_struct.${SOABI_optimized}.so \
	  .${dynload_dir}/array.${SOABI_optimized}.so \
	  .${dynload_dir}/audioop.${SOABI_optimized}.so \
	  .${dynload_dir}/binascii.${SOABI_optimized}.so \
	  .${dynload_dir}/cmath.${SOABI_optimized}.so \
	  .${dynload_dir}/_datetime.${SOABI_optimized}.so \
	  .${dynload_dir}/fcntl.${SOABI_optimized}.so \
	  .${dynload_dir}/grp.${SOABI_optimized}.so \
	  .${dynload_dir}/math.${SOABI_optimized}.so \
	  .${dynload_dir}/mmap.${SOABI_optimized}.so \
	  .${dynload_dir}/nis.${SOABI_optimized}.so \
	  .${dynload_dir}/ossaudiodev.${SOABI_optimized}.so \
	  .${dynload_dir}/parser.${SOABI_optimized}.so \
	  .${dynload_dir}/_posixshmem.${SOABI_optimized}.so \
	  .${dynload_dir}/pyexpat.${SOABI_optimized}.so \
	  .${dynload_dir}/readline.${SOABI_optimized}.so \
	  .${dynload_dir}/resource.${SOABI_optimized}.so \
	  .${dynload_dir}/select.${SOABI_optimized}.so \
	  .${dynload_dir}/spwd.${SOABI_optimized}.so \
	  .${dynload_dir}/syslog.${SOABI_optimized}.so \
	  .${dynload_dir}/termios.${SOABI_optimized}.so \
	  .${dynload_dir}/unicodedata.${SOABI_optimized}.so \
	  .${dynload_dir}/_uuid.${SOABI_optimized}.so \
	  .${dynload_dir}/xxlimited.${SOABI_optimized}.so \
	  .${dynload_dir}/_xxsubinterpreters.${SOABI_optimized}.so \
	  .${dynload_dir}/zlib.${SOABI_optimized}.so \
	  .${pylibdir}/site-packages/README.txt \
	  .${pylibdir}/*.py \
	  .${pylibdir}/__pycache__/*${bytecode_suffixes} \
	  .${pylibdir}/collections/*.py \
	  .${pylibdir}/collections/__pycache__/*${bytecode_suffixes} \
	  .${pylibdir}/ctypes/*.py \
	  .${pylibdir}/ctypes/__pycache__/*${bytecode_suffixes} \
	  .${pylibdir}/ctypes/macholib \
	  .${pylibdir}/curses \
	  .${pylibdir}/dbm/*.py \
	  .${pylibdir}/dbm/__pycache__/*${bytecode_suffixes} \
	  .${pylibdir}/distutils/*.py \
	  .${pylibdir}/distutils/__pycache__/*${bytecode_suffixes} \
	  .${pylibdir}/distutils/README \
	  .${pylibdir}/distutils/command \
	  .${pylibdir}/email/*.py \
	  .${pylibdir}/email/__pycache__/*${bytecode_suffixes} \
	  .${pylibdir}/email/mime \
	  .${pylibdir}/encodings \
	  .${pylibdir}/html \
	  .${pylibdir}/http \
	  .${pylibdir}/importlib/*.py \
	  .${pylibdir}/importlib/__pycache__/*${bytecode_suffixes} \
	  .${pylibdir}/json/*.py \
	  .${pylibdir}/json/__pycache__/*${bytecode_suffixes} \
	  .${pylibdir}/logging \
	  .${pylibdir}/multiprocessing \
	  .${pylibdir}/sqlite3/*.py \
	  .${pylibdir}/sqlite3/__pycache__/*${bytecode_suffixes} \
	  .${pylibdir}/urllib \
	  .${pylibdir}/xml \
	  .${pylibdir}/config-${LDVERSION_optimized}-${DEB_HOST_MULTIARCH}/Makefile \
	  .${pylibdir}/__pycache__/*.pyc \
	  .${pylibdir}/lib2to3/__pycache__/*.pyc \
	  .${pylibdir}/lib2to3/*.py \
	  .${pylibdir}/lib2to3/*.txt \
	  .${pylibdir}/lib2to3/*.pickle \
	  .${pylibdir}/lib2to3/pgen2/*.py \
	  .${pylibdir}/lib2to3/pgen2/__pycache__/*.pyc \
	  .${pylibdir}/lib2to3/fixes/*.py \
	  .${pylibdir}/lib2to3/fixes/__pycache__/*.pyc \
	  .${pylibdir}/email/architecture.rst \
	  .${pylibdir}/LICENSE.txt \
	  .${_includedir}/python${LDVERSION_optimized}/${_pyconfig_h} \
	  .${_libdir}/${py_INSTSONAME_optimized} \
	  .${_libdir}/libpython3.so
ifeq ($(with_gdbm),1)
	dh_movefiles -palt-python$(pyshortver)-libs \
	  .${dynload_dir}/_gdbm.${SOABI_optimized}.so
endif
ifeq ($(with_rewheel),0)
	dh_movefiles -palt-python$(pyshortver)-libs \
	  .${pylibdir}/ensurepip/_bundled/*.whl
endif
	dh_installdocs -palt-python$(pyshortver)-libs \
	  README.rst

	dh_movefiles -palt-python$(pyshortver)-devel \
	  .${_bindir}/2to3 \
	  .${pylibdir}/config-${LDVERSION_optimized}-$(DEB_BUILD_MULTIARCH)/* \
	  -X.${pylibdir}/config-${LDVERSION_optimized}-$(DEB_BUILD_MULTIARCH)/Makefile \
	  -X.${_includedir}/python${LDVERSION_optimized}/${_pyconfig_h} \
	  .${_includedir}/python${LDVERSION_optimized}/*.h \
	  .${_includedir}/python${LDVERSION_optimized}/internal/ \
	  .${_includedir}/python${LDVERSION_optimized}/cpython/ \
	  .${_bindir}/python3-config \
	  .${_libdir}/pkgconfig/python3.pc \
	  .${_libdir}/pkgconfig/python3-embed.pc \
	  .${_bindir}/pathfix.py \
	  .${_bindir}/pygettext3.py \
	  .${_bindir}/msgfmt3.py \
	  .${_bindir}/pygettext${pybasever}.py \
	  .${_bindir}/msgfmt${pybasever}.py \
	  .${_bindir}/python${pybasever}-config \
	  .${_bindir}/python${LDVERSION_optimized}-config \
	  .${_bindir}/python${LDVERSION_optimized}-*-config \
	  .${_libdir}/libpython${LDVERSION_optimized}.so \
	  .${_libdir}/pkgconfig/python-${LDVERSION_optimized}.pc \
	  .${_libdir}/pkgconfig/python-${LDVERSION_optimized}-embed.pc \

	dh_installdocs -palt-python$(pyshortver)-devel \
	  Misc/README.valgrind \
	  Misc/valgrind-python.supp \
	  Misc/gdbinit

	dh_movefiles -palt-python$(pyshortver)-idle \
	  .${_bindir}/idle* \
	  .${pylibdir}/idlelib \
	  .${_metainfodir}/idle3.appdata.xml \
	  .${_datadir}/applications/idle3.desktop \
	  .${_datadir}/icons/hicolor/*/apps/idle3.*

	dh_movefiles -palt-python$(pyshortver)-tkinter \
	  .${pylibdir}/tkinter \
	  -X.${pylibdir}/tkinter/test \
	  .${dynload_dir}/_tkinter.${SOABI_optimized}.so \
	  .${pylibdir}/turtle.py \
	  .${pylibdir}/__pycache__/turtle*${bytecode_suffixes} \
	  .${pylibdir}/turtledemo/*.py \
	  .${pylibdir}/turtledemo/*.cfg \
	  .${pylibdir}/turtledemo/__pycache__/*${bytecode_suffixes} \

	dh_movefiles -palt-python$(pyshortver)-test \
	  .${pylibdir}/ctypes/test \
	  .${pylibdir}/distutils/tests \
	  .${pylibdir}/sqlite3/test \
	  .${pylibdir}/test \
	  .${dynload_dir}/_ctypes_test.${SOABI_optimized}.so \
	  .${dynload_dir}/_testbuffer.${SOABI_optimized}.so \
	  .${dynload_dir}/_testcapi.${SOABI_optimized}.so \
	  .${dynload_dir}/_testimportmultiple.${SOABI_optimized}.so \
	  .${dynload_dir}/_testinternalcapi.${SOABI_optimized}.so \
	  .${dynload_dir}/_testmultiphase.${SOABI_optimized}.so \
	  .${pylibdir}/lib2to3/tests \
	  .${pylibdir}/tkinter/test \
	  .${pylibdir}/unittest/test

	dh_strip

ifeq ($(with_debug_build),1)
	dh_movefiles -palt-python$(pyshortver)-debug \
	  .${_bindir}/python3-debug \
	  .${_bindir}/python${LDVERSION_debug} \
	  .${_libdir}/libpython3.8d.so.1.0 \
	  .${_bindir}/python3.8d-config \
	  .${_bindir}/python3.8d-$(uname_m)-config \
	  .${dynload_dir}/_blake2.${SOABI_debug}.so \
	  .${dynload_dir}/_md5.${SOABI_debug}.so \
	  .${dynload_dir}/_sha1.${SOABI_debug}.so \
	  .${dynload_dir}/_sha256.${SOABI_debug}.so \
	  .${dynload_dir}/_sha3.${SOABI_debug}.so \
	  .${dynload_dir}/_sha512.${SOABI_debug}.so \
	  .${dynload_dir}/_asyncio.${SOABI_debug}.so \
	  .${dynload_dir}/_bisect.${SOABI_debug}.so \
	  .${dynload_dir}/_bz2.${SOABI_debug}.so \
	  .${dynload_dir}/_codecs_cn.${SOABI_debug}.so \
	  .${dynload_dir}/_codecs_hk.${SOABI_debug}.so \
	  .${dynload_dir}/_codecs_iso2022.${SOABI_debug}.so \
	  .${dynload_dir}/_codecs_jp.${SOABI_debug}.so \
	  .${dynload_dir}/_codecs_kr.${SOABI_debug}.so \
	  .${dynload_dir}/_codecs_tw.${SOABI_debug}.so \
	  .${dynload_dir}/_contextvars.${SOABI_debug}.so \
	  .${dynload_dir}/_crypt.${SOABI_debug}.so \
	  .${dynload_dir}/_csv.${SOABI_debug}.so \
	  .${dynload_dir}/_ctypes.${SOABI_debug}.so \
	  .${dynload_dir}/_curses.${SOABI_debug}.so \
	  .${dynload_dir}/_curses_panel.${SOABI_debug}.so \
	  .${dynload_dir}/_dbm.${SOABI_debug}.so \
	  .${dynload_dir}/_elementtree.${SOABI_debug}.so \
	  .${dynload_dir}/_heapq.${SOABI_debug}.so \
	  .${dynload_dir}/_json.${SOABI_debug}.so \
	  .${dynload_dir}/_lsprof.${SOABI_debug}.so \
	  .${dynload_dir}/_lzma.${SOABI_debug}.so \
	  .${dynload_dir}/_multibytecodec.${SOABI_debug}.so \
	  .${dynload_dir}/_multiprocessing.${SOABI_debug}.so \
	  .${dynload_dir}/_opcode.${SOABI_debug}.so \
	  .${dynload_dir}/_pickle.${SOABI_debug}.so \
	  .${dynload_dir}/_posixsubprocess.${SOABI_debug}.so \
	  .${dynload_dir}/_queue.${SOABI_debug}.so \
	  .${dynload_dir}/_random.${SOABI_debug}.so \
	  .${dynload_dir}/_socket.${SOABI_debug}.so \
	  .${dynload_dir}/_sqlite3.${SOABI_debug}.so \
	  .${dynload_dir}/_ssl.${SOABI_debug}.so \
	  .${dynload_dir}/_statistics.${SOABI_debug}.so \
	  .${dynload_dir}/_struct.${SOABI_debug}.so \
	  .${dynload_dir}/array.${SOABI_debug}.so \
	  .${dynload_dir}/audioop.${SOABI_debug}.so \
	  .${dynload_dir}/binascii.${SOABI_debug}.so \
	  .${dynload_dir}/cmath.${SOABI_debug}.so \
	  .${dynload_dir}/_datetime.${SOABI_debug}.so \
	  .${dynload_dir}/fcntl.${SOABI_debug}.so \
	  .${dynload_dir}/grp.${SOABI_debug}.so \
	  .${dynload_dir}/math.${SOABI_debug}.so \
	  .${dynload_dir}/mmap.${SOABI_debug}.so \
	  .${dynload_dir}/nis.${SOABI_debug}.so \
	  .${dynload_dir}/ossaudiodev.${SOABI_debug}.so \
	  .${dynload_dir}/parser.${SOABI_debug}.so \
	  .${dynload_dir}/_posixshmem.${SOABI_debug}.so \
	  .${dynload_dir}/pyexpat.${SOABI_debug}.so \
	  .${dynload_dir}/readline.${SOABI_debug}.so \
	  .${dynload_dir}/resource.${SOABI_debug}.so \
	  .${dynload_dir}/select.${SOABI_debug}.so \
	  .${dynload_dir}/spwd.${SOABI_debug}.so \
	  .${dynload_dir}/syslog.${SOABI_debug}.so \
	  .${dynload_dir}/termios.${SOABI_debug}.so \
	  .${dynload_dir}/unicodedata.${SOABI_debug}.so \
	  .${dynload_dir}/_uuid.${SOABI_debug}.so \
	  .${dynload_dir}/_xxsubinterpreters.${SOABI_debug}.so \
	  .${dynload_dir}/_xxtestfuzz.${SOABI_debug}.so \
	  .${dynload_dir}/zlib.${SOABI_debug}.so \
	  .${dynload_dir}/_uuid.${SOABI_debug}.so \
	  .${dynload_dir}/_datetime.${SOABI_debug}.so \
	  .${dynload_dir}/spwd.${SOABI_debug}.so \
	  .${dynload_dir}/math.${SOABI_debug}.so \
	  .${dynload_dir}/_tkinter.${SOABI_debug}.so \
	  .${dynload_dir}/nis.${SOABI_debug}.so \
	  .${dynload_dir}/_decimal.${SOABI_debug}.so \
	  .${dynload_dir}/_pickle.${SOABI_debug}.so \
	  .${dynload_dir}/array.${SOABI_debug}.so \
	  .${dynload_dir}/unicodedata.${SOABI_debug}.so \
	  .${dynload_dir}/_random.${SOABI_debug}.so \
	  .${dynload_dir}/_ssl.${SOABI_debug}.so \
	  .${dynload_dir}/_posixsubprocess.${SOABI_debug}.so \
	  .${dynload_dir}/ossaudiodev.${SOABI_debug}.so \
	  .${dynload_dir}/select.${SOABI_debug}.so \
	  .${dynload_dir}/fcntl.${SOABI_debug}.so \
	  .${dynload_dir}/_testimportmultiple.${SOABI_debug}.so \
	  .${dynload_dir}/syslog.${SOABI_debug}.so \
	  .${dynload_dir}/_opcode.${SOABI_debug}.so \
	  .${dynload_dir}/_testcapi.${SOABI_debug}.so \
	  .${dynload_dir}/_multiprocessing.${SOABI_debug}.so \
	  .${dynload_dir}/parser.${SOABI_debug}.so \
	  .${dynload_dir}/termios.${SOABI_debug}.so \
	  .${dynload_dir}/_lzma.${SOABI_debug}.so \
	  .${dynload_dir}/readline.${SOABI_debug}.so \
	  .${dynload_dir}/grp.${SOABI_debug}.so \
	  .${dynload_dir}/_queue.${SOABI_debug}.so \
	  .${dynload_dir}/_socket.${SOABI_debug}.so \
	  .${dynload_dir}/_hashlib.${SOABI_debug}.so \
	  .${dynload_dir}/_struct.${SOABI_debug}.so \
	  .${dynload_dir}/_testinternalcapi.${SOABI_debug}.so \
	  .${dynload_dir}/_statistics.${SOABI_debug}.so \
	  .${dynload_dir}/_testmultiphase.${SOABI_debug}.so \
	  .${dynload_dir}/_testbuffer.${SOABI_debug}.so \
	  .${dynload_dir}/zlib.${SOABI_debug}.so \
	  .${dynload_dir}/_ctypes_test.${SOABI_debug}.so \
	  .${dynload_dir}/pyexpat.${SOABI_debug}.so \
	  .${dynload_dir}/_posixshmem.${SOABI_debug}.so \
	  .${dynload_dir}/_xxsubinterpreters.${SOABI_debug}.so \
	  .${dynload_dir}/resource.${SOABI_debug}.so \
	  .${dynload_dir}/audioop.${SOABI_debug}.so \
	  .${dynload_dir}/mmap.${SOABI_debug}.so \
	  .${dynload_dir}/_xxtestfuzz.${SOABI_debug}.so \
	  .${_libdir}/${py_INSTSONAME_debug} \
	  .${pylibdir}/config-${LDVERSION_debug}-$(DEB_BUILD_MULTIARCH) \
	  .${pylibdir}/config-3.8d-$(DEB_HOST_MULTIARCH)/makesetup \
	  .${pylibdir}/config-3.8d-$(DEB_HOST_MULTIARCH)/python-config.py \
	  .${pylibdir}/config-3.8d-$(DEB_HOST_MULTIARCH)/config.c.in \
	  .${pylibdir}/config-3.8d-$(DEB_HOST_MULTIARCH)/__pycache__/python-config.cpython-38.opt-1.pyc \
	  .${pylibdir}/config-3.8d-$(DEB_HOST_MULTIARCH)/__pycache__/python-config.cpython-38.opt-2.pyc \
	  .${pylibdir}/config-3.8d-$(DEB_HOST_MULTIARCH)/__pycache__/python-config.cpython-38.pyc \
	  .${pylibdir}/config-3.8d-$(DEB_HOST_MULTIARCH)/install-sh \
	  .${pylibdir}/config-3.8d-$(DEB_HOST_MULTIARCH)/python.o \
	  .${pylibdir}/config-3.8d-$(DEB_HOST_MULTIARCH)/config.c \
	  .${pylibdir}/config-3.8d-$(DEB_HOST_MULTIARCH)/Setup \
	  .${pylibdir}/config-3.8d-$(DEB_HOST_MULTIARCH)/Makefile \
	  .${pylibdir}/config-3.8d-$(DEB_HOST_MULTIARCH)/Setup.local \
	  .${_includedir}/python${LDVERSION_debug} \
	  .${_includedir}/python3.8d/token.h \
	  .${_includedir}/python3.8d/pyhash.h \
	  .${_includedir}/python3.8d/pymath.h \
	  .${_includedir}/python3.8d/patchlevel.h \
	  .${_includedir}/python3.8d/bytes_methods.h \
	  .${_includedir}/python3.8d/pyconfig-64.h \
	  .${_includedir}/python3.8d/pystrtod.h \
	  .${_includedir}/python3.8d/py_curses.h \
	  .${_includedir}/python3.8d/bytesobject.h \
	  .${_includedir}/python3.8d/pyconfig.h \
	  .${_includedir}/python3.8d/errcode.h \
	  .${_includedir}/python3.8d/frameobject.h \
	  .${_includedir}/python3.8d/pyerrors.h \
	  .${_includedir}/python3.8d/pystate.h \
	  .${_includedir}/python3.8d/graminit.h \
	  .${_includedir}/python3.8d/ceval.h \
	  .${_includedir}/python3.8d/pyctype.h \
	  .${_includedir}/python3.8d/bytearrayobject.h \
	  .${_includedir}/python3.8d/intrcheck.h \
	  .${_includedir}/python3.8d/pydebug.h \
	  .${_includedir}/python3.8d/node.h \
	  .${_includedir}/python3.8d/asdl.h \
	  .${_includedir}/python3.8d/dictobject.h \
	  .${_includedir}/python3.8d/import.h \
	  .${_includedir}/python3.8d/structmember.h \
	  .${_includedir}/python3.8d/tupleobject.h \
	  .${_includedir}/python3.8d/grammar.h \
	  .${_includedir}/python3.8d/pymacconfig.h \
	  .${_includedir}/python3.8d/pymem.h \
	  .${_includedir}/python3.8d/internal/pycore_context.h \
	  .${_includedir}/python3.8d/internal/pycore_initconfig.h \
	  .${_includedir}/python3.8d/internal/pycore_hamt.h \
	  .${_includedir}/python3.8d/internal/pycore_traceback.h \
	  .${_includedir}/python3.8d/internal/pycore_condvar.h \
	  .${_includedir}/python3.8d/internal/pycore_object.h \
	  .${_includedir}/python3.8d/internal/pycore_warnings.h \
	  .${_includedir}/python3.8d/internal/pycore_atomic.h \
	  .${_includedir}/python3.8d/internal/pycore_ceval.h \
	  .${_includedir}/python3.8d/internal/pycore_pymem.h \
	  .${_includedir}/python3.8d/internal/pycore_pystate.h \
	  .${_includedir}/python3.8d/internal/pycore_pathconfig.h \
	  .${_includedir}/python3.8d/internal/pycore_gil.h \
	  .${_includedir}/python3.8d/internal/pycore_tupleobject.h \
	  .${_includedir}/python3.8d/internal/pycore_fileutils.h \
	  .${_includedir}/python3.8d/internal/pycore_code.h \
	  .${_includedir}/python3.8d/internal/pycore_pyhash.h \
	  .${_includedir}/python3.8d/internal/pycore_getopt.h \
	  .${_includedir}/python3.8d/internal/pycore_pylifecycle.h \
	  .${_includedir}/python3.8d/internal/pycore_pyerrors.h \
	  .${_includedir}/python3.8d/internal/pycore_accu.h \
	  .${_includedir}/python3.8d/pythread.h \
	  .${_includedir}/python3.8d/memoryobject.h \
	  .${_includedir}/python3.8d/methodobject.h \
	  .${_includedir}/python3.8d/pyport.h \
	  .${_includedir}/python3.8d/bltinmodule.h \
	  .${_includedir}/python3.8d/weakrefobject.h \
	  .${_includedir}/python3.8d/pytime.h \
	  .${_includedir}/python3.8d/funcobject.h \
	  .${_includedir}/python3.8d/classobject.h \
	  .${_includedir}/python3.8d/fileutils.h \
	  .${_includedir}/python3.8d/setobject.h \
	  .${_includedir}/python3.8d/picklebufobject.h \
	  .${_includedir}/python3.8d/longobject.h \
	  .${_includedir}/python3.8d/pymacro.h \
	  .${_includedir}/python3.8d/Python.h \
	  .${_includedir}/python3.8d/tracemalloc.h \
	  .${_includedir}/python3.8d/dtoa.h \
	  .${_includedir}/python3.8d/pythonrun.h \
	  .${_includedir}/python3.8d/listobject.h \
	  .${_includedir}/python3.8d/osmodule.h \
	  .${_includedir}/python3.8d/context.h \
	  .${_includedir}/python3.8d/moduleobject.h \
	  .${_includedir}/python3.8d/bitset.h \
	  .${_includedir}/python3.8d/boolobject.h \
	  .${_includedir}/python3.8d/code.h \
	  .${_includedir}/python3.8d/odictobject.h \
	  .${_includedir}/python3.8d/osdefs.h \
	  .${_includedir}/python3.8d/complexobject.h \
	  .${_includedir}/python3.8d/dynamic_annotations.h \
	  .${_includedir}/python3.8d/floatobject.h \
	  .${_includedir}/python3.8d/ucnhash.h \
	  .${_includedir}/python3.8d/longintrepr.h \
	  .${_includedir}/python3.8d/abstract.h \
	  .${_includedir}/python3.8d/traceback.h \
	  .${_includedir}/python3.8d/unicodeobject.h \
	  .${_includedir}/python3.8d/pyexpat.h \
	  .${_includedir}/python3.8d/typeslots.h \
	  .${_includedir}/python3.8d/eval.h \
	  .${_includedir}/python3.8d/warnings.h \
	  .${_includedir}/python3.8d/datetime.h \
	  .${_includedir}/python3.8d/pyarena.h \
	  .${_includedir}/python3.8d/object.h \
	  .${_includedir}/python3.8d/pycapsule.h \
	  .${_includedir}/python3.8d/interpreteridobject.h \
	  .${_includedir}/python3.8d/compile.h \
	  .${_includedir}/python3.8d/genobject.h \
	  .${_includedir}/python3.8d/sliceobject.h \
	  .${_includedir}/python3.8d/iterobject.h \
	  .${_includedir}/python3.8d/pyfpe.h \
	  .${_includedir}/python3.8d/marshal.h \
	  .${_includedir}/python3.8d/parsetok.h \
	  .${_includedir}/python3.8d/cellobject.h \
	  .${_includedir}/python3.8d/descrobject.h \
	  .${_includedir}/python3.8d/cpython/pyerrors.h \
	  .${_includedir}/python3.8d/cpython/pystate.h \
	  .${_includedir}/python3.8d/cpython/dictobject.h \
	  .${_includedir}/python3.8d/cpython/tupleobject.h \
	  .${_includedir}/python3.8d/cpython/pymem.h \
	  .${_includedir}/python3.8d/cpython/initconfig.h \
	  .${_includedir}/python3.8d/cpython/abstract.h \
	  .${_includedir}/python3.8d/cpython/traceback.h \
	  .${_includedir}/python3.8d/cpython/unicodeobject.h \
	  .${_includedir}/python3.8d/cpython/object.h \
	  .${_includedir}/python3.8d/cpython/interpreteridobject.h \
	  .${_includedir}/python3.8d/cpython/fileobject.h \
	  .${_includedir}/python3.8d/cpython/objimpl.h \
	  .${_includedir}/python3.8d/cpython/pylifecycle.h \
	  .${_includedir}/python3.8d/cpython/sysmodule.h \
	  .${_includedir}/python3.8d/structseq.h \
	  .${_includedir}/python3.8d/enumobject.h \
	  .${_includedir}/python3.8d/pydtrace.h \
	  .${_includedir}/python3.8d/codecs.h \
	  .${_includedir}/python3.8d/opcode.h \
	  .${_includedir}/python3.8d/Python-ast.h \
	  .${_includedir}/python3.8d/modsupport.h \
	  .${_includedir}/python3.8d/fileobject.h \
	  .${_includedir}/python3.8d/objimpl.h \
	  .${_includedir}/python3.8d/ast.h \
	  .${_includedir}/python3.8d/symtable.h \
	  .${_includedir}/python3.8d/pystrcmp.h \
	  .${_includedir}/python3.8d/rangeobject.h \
	  .${_includedir}/python3.8d/pylifecycle.h \
	  .${_includedir}/python3.8d/pystrhex.h \
	  .${_includedir}/python3.8d/sysmodule.h \
	  .${_includedir}/python3.8d/namespaceobject.h \
	  .${_bindir}/python${LDVERSION_debug}-config \
	  .${_bindir}/python${LDVERSION_debug}-*-config \
	  .${_libdir}/libpython${LDVERSION_debug}.so \
	  .${_libdir}/libpython${LDVERSION_debug}.so.1.0 \
	  .${_libdir}/pkgconfig/python-${LDVERSION_debug}.pc \
	  .${_libdir}/pkgconfig/python-${LDVERSION_debug}-embed.pc \
	  .${_libdir}/libpython3.8d.so.1.0 \
	  .${_bindir}/python3.8d-config \
	  .${dynload_dir}/_tkinter.${SOABI_debug}.so \
	  .${dynload_dir}/_ctypes_test.${SOABI_debug}.so \
	  .${dynload_dir}/_testbuffer.${SOABI_debug}.so \
	  .${dynload_dir}/_testcapi.${SOABI_debug}.so \
	  .${dynload_dir}/_testimportmultiple.${SOABI_debug}.so \
	  .${dynload_dir}/_testinternalcapi.${SOABI_debug}.so \
	  .${dynload_dir}/_testmultiphase.${SOABI_debug}.so
ifeq ($(with_gdbm),1)
	dh_movefiles -palt-python$(pyshortver)-debug \
	  .${dynload_dir}/_gdbm.${SOABI_debug}.so
endif
endif # with_debug_build

override_dh_auto_test:

override_dh_auto_clean:

override_dh_builddeb:
	dh_builddeb -- -Zgzip
	if [ $(shell find $(buildroot) -type f | wc -l) -gt 0 ]; then \
		echo "Installed but unpackaged:"; \
		find $(buildroot) -type f -exec echo "{}" \; | sed -e 's#$(buildroot)##g'; \
		exit 1; \
	fi

