apply @edmonds patch to use pybuild, yay!

This commit is contained in:
nick black 2020-02-11 19:03:12 -05:00
parent 3cf4c3c064
commit 203547c537
4 changed files with 5 additions and 28 deletions

View File

@ -1 +0,0 @@
usr/lib/python3/dist-packages/*

View File

@ -1,11 +0,0 @@
#!/bin/sh
set -e
# --------------------- copied from dh-python 4.20191017 ---------
if which py3compile >/dev/null 2>&1; then
py3compile -p python3-notcurses
fi
if which pypy3compile >/dev/null 2>&1; then
pypy3compile -p python3-notcurses || true
fi
# --------------------- end material copied from dh-python -------

View File

@ -1,11 +0,0 @@
#!/bin/sh
set -e
# --------------------- copied from dh-python 4.20191017 ---------
if which py3clean >/dev/null 2>&1; then
py3clean -p python3-notcurses
else
dpkg -L python3-notcurses | perl -ne 's,/([^/]*)\.py$,/__pycache__/\1.*, or next; unlink $_ or die $! foreach glob($_)'
find /usr/lib/python3/dist-packages/ -type d -name __pycache__ -empty -print0 | xargs --null --no-run-if-empty rmdir
fi
# --------------------- end material copied from dh-python -------

10
debian/rules vendored
View File

@ -3,8 +3,9 @@
DEB_HOST_MULTIARCH?=$(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
export DEB_BUILD_MAINT_OPTIONS=hardening=+all
export PYBUILD_NAME=notcurses
export PYBUILD_DIR=python
export PYBUILD_DESTDIR=debian/python3-notcurses
CFLAGS += -ffile-prefix-map=$(CURDIR)=/
@ -16,10 +17,9 @@ override_dh_auto_configure:
override_dh_auto_build:
dh_auto_build
cd python && python3 setup.py build_ext -L../obj-$(DEB_HOST_MULTIARCH) -I../include
cd python && python3 setup.py build_py
CFLAGS="$(CFLAGS) -I$(CURDIR)/include" LDFLAGS="$(LDFLAGS) \
-L$(CURDIR)/obj-$(DEB_HOST_MULTIARCH)" pybuild --build
override_dh_auto_install:
dh_auto_install -B $(BUILDDIR)
cd python && python3 setup.py install --prefix=/usr --skip-build --root=../debian/tmp --install-layout=deb --single-version-externally-managed
rm -rf debian/tmp/usr/lib/python3/dist-packages/__pycache__
pybuild --install