diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 16:08:06 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 16:08:06 +0000 |
commit | ba6d96469df143b52295f8e79da648bf8a597407 (patch) | |
tree | 5ea0c3374f5c53209ad02008dcdddfc8ccae92e5 /tests/t302 | |
parent | Initial commit. (diff) | |
download | dh-python-ba6d96469df143b52295f8e79da648bf8a597407.tar.xz dh-python-ba6d96469df143b52295f8e79da648bf8a597407.zip |
Adding upstream version 5.20230130+deb12u1.upstream/5.20230130+deb12u1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/t302')
-rw-r--r-- | tests/t302/Makefile | 18 | ||||
-rw-r--r-- | tests/t302/debian/changelog | 5 | ||||
-rw-r--r-- | tests/t302/debian/compat | 1 | ||||
-rw-r--r-- | tests/t302/debian/control | 18 | ||||
-rw-r--r-- | tests/t302/debian/copyright | 2 | ||||
-rw-r--r-- | tests/t302/debian/install | 2 | ||||
-rwxr-xr-x | tests/t302/debian/rules | 30 | ||||
-rw-r--r-- | tests/t302/debian/source/format | 1 | ||||
-rw-r--r-- | tests/t302/lib/__init__.py | 0 | ||||
-rw-r--r-- | tests/t302/lib/bar.c | 0 | ||||
-rw-r--r-- | tests/t302/lib/foo.py | 6 | ||||
-rwxr-xr-x | tests/t302/setup.py | 13 |
12 files changed, 96 insertions, 0 deletions
diff --git a/tests/t302/Makefile b/tests/t302/Makefile new file mode 100644 index 0000000..2fc6b11 --- /dev/null +++ b/tests/t302/Makefile @@ -0,0 +1,18 @@ +#!/usr/bin/make -f +include ../common.mk + +check: + grep -q "py3compile -p python3-foo:$(DEB_HOST_ARCH) /usr/lib/python3-foo"\ + debian/python3-foo/DEBIAN/postinst + grep -q "pypy3compile -p python3-foo:$(DEB_HOST_ARCH) /usr/lib/python3-foo"\ + debian/python3-foo/DEBIAN/postinst + grep -q "py3clean -p python3-foo:$(DEB_HOST_ARCH)" debian/python3-foo/DEBIAN/prerm + [ "`find debian/python3-foo/usr/lib/python3/dist-packages/foo -name 'bar.cpython-*.so'`" != "" ] + test -e debian/python3-foo/usr/lib/python3-foo/empty-private-dir + test ! -e debian/python3-foo/usr/lib/python3/dist-packages/empty-public-dir + # test if moved from include/python3.X/ to include/python3.Xm/ (for Python << 3.8) + #test -f debian/python3-foo/usr/include/python$(DEBPYTHON3_DEFAULT)m/foo.h + +clean: + ./debian/rules clean + rm -rf lib/Foo.egg-info build diff --git a/tests/t302/debian/changelog b/tests/t302/debian/changelog new file mode 100644 index 0000000..d91e7a7 --- /dev/null +++ b/tests/t302/debian/changelog @@ -0,0 +1,5 @@ +foo (0.1.1) unstable; urgency=low + + * Initial release + + -- Piotr Ożarowski <piotr@debian.org> Sun, 19 Dec 2010 19:40:33 +0100 diff --git a/tests/t302/debian/compat b/tests/t302/debian/compat new file mode 100644 index 0000000..ec63514 --- /dev/null +++ b/tests/t302/debian/compat @@ -0,0 +1 @@ +9 diff --git a/tests/t302/debian/control b/tests/t302/debian/control new file mode 100644 index 0000000..01a7656 --- /dev/null +++ b/tests/t302/debian/control @@ -0,0 +1,18 @@ +Source: foo +Section: python +Priority: optional +Maintainer: Piotr Ożarowski <piotr@debian.org> +Build-Depends: debhelper (>= 7.0.50~), python3-all-dev +Standards-Version: 3.9.1 +X-Python3-Version: >= 3.2 + +Package: python3-foo +Architecture: any +Depends: ${python3:Depends}, ${shlibs:Depends}, ${misc:Depends} +Recommends: ${python3:Recommends} +Suggests: ${python3:Suggests} +Enhances: ${python3:Enhances} +Breaks: ${python3:Breaks} +Provides: ${python3:Provides} +Description: package with public and private Python 3 extension + example package #3 - Python extensions diff --git a/tests/t302/debian/copyright b/tests/t302/debian/copyright new file mode 100644 index 0000000..6382944 --- /dev/null +++ b/tests/t302/debian/copyright @@ -0,0 +1,2 @@ +The Debian packaging is © 2010, Piotr Ożarowski <piotr@debian.org> and +is licensed under the MIT License. diff --git a/tests/t302/debian/install b/tests/t302/debian/install new file mode 100644 index 0000000..61f42c3 --- /dev/null +++ b/tests/t302/debian/install @@ -0,0 +1,2 @@ +# private module in architecture dependent dir +lib/foo.py /usr/lib/python3-foo/ diff --git a/tests/t302/debian/rules b/tests/t302/debian/rules new file mode 100755 index 0000000..a85d729 --- /dev/null +++ b/tests/t302/debian/rules @@ -0,0 +1,30 @@ +#!/usr/bin/make -f + +%: + dh $@ --buildsystem=python_distutils + +override_dh_install: + dh_install + # install also as private extension + dh_install debian/python3-foo/usr/local/lib/python3*/dist-packages/foo/bar*.so \ + /usr/lib/python3-foo/ + mkdir -p debian/python3-foo/usr/lib/python3/dist-packages/empty-public-dir + mkdir -p debian/python3-foo/usr/lib/python3-foo/empty-private-dir + DH_VERBOSE=1 ../../dh_python3 + +comma:=, +empty:= +space:= $(empty) $(empty) +PYTHONS=$(subst $(comma),$(space),$(DEBPYTHON3_SUPPORTED)) +override_dh_auto_build: + for ver in $(PYTHONS); do\ + python$$ver setup.py build; done + +override_dh_auto_install: + for ver in $(PYTHONS); do\ + python$$ver setup.py install --root=debian/python3-foo;\ + done + mkdir -p debian/python3-foo/usr/include/python$(DEBPYTHON3_DEFAULT)/ + touch debian/python3-foo/usr/include/python$(DEBPYTHON3_DEFAULT)/foo.h + +override_dh_auto_clean: diff --git a/tests/t302/debian/source/format b/tests/t302/debian/source/format new file mode 100644 index 0000000..89ae9db --- /dev/null +++ b/tests/t302/debian/source/format @@ -0,0 +1 @@ +3.0 (native) diff --git a/tests/t302/lib/__init__.py b/tests/t302/lib/__init__.py new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/tests/t302/lib/__init__.py diff --git a/tests/t302/lib/bar.c b/tests/t302/lib/bar.c new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/tests/t302/lib/bar.c diff --git a/tests/t302/lib/foo.py b/tests/t302/lib/foo.py new file mode 100644 index 0000000..9dd52e6 --- /dev/null +++ b/tests/t302/lib/foo.py @@ -0,0 +1,6 @@ +import foo.bar + + +class Foo(object): + def __init__(self): + foo.bar diff --git a/tests/t302/setup.py b/tests/t302/setup.py new file mode 100755 index 0000000..1208046 --- /dev/null +++ b/tests/t302/setup.py @@ -0,0 +1,13 @@ +#! /usr/bin/python3 +from distutils.core import setup, Extension + +setup(name='Foo', + version='0.1', + description="package with Python extension", + author='Piotr Ożarowski', + author_email='piotr@debian.org', + url='http://www.debian.org/', + ext_modules=[Extension('foo/bar', ['lib/bar.c'])], + #py_modules=['package'], + packages=['foo'], + package_dir={'foo': 'lib'}) |