pybuild: Make --ext-dest-dir work again, when --name is specified. (closes: 942882)
Stefano Rivera
1 year, 8 months ago
17 | 17 |
${python3:Depends}, too. (closes: 1017001)
|
18 | 18 |
* Port dh_python2/dh_python3/dh_pypy to argparse.
|
19 | 19 |
* dh_*: Parse -O=... options provided by debhelper. (closes: 949286)
|
|
20 |
* pybuild: Make --ext-dest-dir work again, when --name is specified.
|
|
21 |
(closes: 942882)
|
20 | 22 |
|
21 | 23 |
-- Stefano Rivera <stefanor@debian.org> Wed, 11 May 2022 11:45:37 -0400
|
22 | 24 |
|
331 | 331 |
|
332 | 332 |
def move_to_ext_destdir(i, version, context):
|
333 | 333 |
"""Move built C extensions from the general destdir to ext_destdir"""
|
|
334 |
args = get_args(context, 'install', version, interpreter)
|
334 | 335 |
ext_destdir = get_option('ext_destdir', i, version)
|
335 | 336 |
if ext_destdir:
|
336 | |
move_matching_files(context['destdir'], ext_destdir,
|
|
337 |
move_matching_files(args['destdir'], ext_destdir,
|
337 | 338 |
get_option('ext_pattern', i, version),
|
338 | 339 |
get_option('ext_sub_pattern', i, version),
|
339 | 340 |
get_option('ext_sub_repl', i, version))
|
2 | 2 |
|
3 | 3 |
check:
|
4 | 4 |
test -f debian/python3-foo/usr/lib/python3/dist-packages/foo.py
|
|
5 |
test -f debian/python3-foo-ext/usr/lib/python3/dist-packages/_foo.abi3.so
|
5 | 6 |
test -e test-executed
|
6 | 7 |
|
7 | 8 |
clean:
|
2 | 2 |
Priority: optional
|
3 | 3 |
Maintainer: Piotr Ożarowski <piotr@debian.org>
|
4 | 4 |
Build-Depends: debhelper-compat (= 12)
|
5 | |
, python3-all
|
|
5 |
, python3-all-dev
|
6 | 6 |
, python3-setuptools
|
7 | 7 |
, python3-tomli
|
8 | 8 |
, tox
|
|
14 | 14 |
Depends: ${python3:Depends}, ${shlibs:Depends}, ${misc:Depends}
|
15 | 15 |
Description: package with public CPython modules
|
16 | 16 |
example package #1
|
|
17 |
|
|
18 |
Package: python3-foo-ext
|
|
19 |
Architecture: any
|
|
20 |
Depends: ${python3:Depends}, ${shlibs:Depends}, ${misc:Depends}
|
|
21 |
Description: package with public CPython extensions
|
|
22 |
example package #2
|
0 | 0 |
#!/usr/bin/make -f
|
1 | 1 |
|
2 | 2 |
export PYBUILD_NAME=foo
|
|
3 |
export PYBUILD_EXT_DESTDIR_python3=debian/python3-foo-ext
|
3 | 4 |
|
4 | 5 |
%:
|
5 | 6 |
dh $@
|
0 | |
from setuptools import setup
|
|
0 |
from setuptools import setup, Extension
|
1 | 1 |
|
2 | |
setup()
|
|
2 |
setup(ext_modules=[
|
|
3 |
Extension(
|
|
4 |
'_foo',
|
|
5 |
['_foo.c'],
|
|
6 |
py_limited_api = True,
|
|
7 |
)
|
|
8 |
])
|