Hi, Attached is a patch that seems to fix the problem in this bug.
The patch does mainly two things: * Enable support for compiling and cleaning up the .pyc files. * Remove pkg_resources dependency from /usr/bin/meson launcher. (This is also related to bug #909440.) Both changes improve the meson startup time significantly in my system, which was my main motivation for these changes. Uncommenting ${python3:Depends} in the control file enables .pyc handling, handles the /usr/bin/python3.*/ directory renaming, and fixes the following build error. E: dh_python3 dh_python3:176: no package to act on (python3-foo or one with ${python3:Depends} in Depends) The ${shlibs:Depends} dependency seems unnecessary and was removed. There is a new install file that takes care of debcrossgen and zsh/_meson installation, and overwrites the /usr/share/meson launcher with __main__.py that does not depend on pkg_resources. With these changes the override_dh_install is not needed anymore and can be removed from the rules. Note that the patch also removes the override_dh_clean rule, which may be incorrect. I only tested with a "nocheck" build, so I do not know if the full build with tests will run correctly. Thank you and best regards, Lasse
diff -Nru _org/debian/control _new/debian/control --- _org/debian/control 2019-10-30 06:48:25.000000000 +0900 +++ _new/debian/control 2019-11-20 21:18:34.000000000 +0900 @@ -8,6 +8,7 @@ Rules-Requires-Root: no Build-Depends: debhelper (>= 12), python3:any (>= 3.5), + dh-exec, dh-python, python3-setuptools, ninja-build (>= 1.6), @@ -88,11 +89,10 @@ Package: meson Architecture: all Multi-Arch: foreign -Depends: ${shlibs:Depends}, ${misc:Depends}, -# ${python3:Depends}, +Depends: + ${misc:Depends}, + ${python3:Depends}, ninja-build(>=1.6), - python3, - python3-pkg-resources, Description: high-productivity build system Meson is a build system designed to increase programmer productivity. It does this by providing a fast, simple and easy to diff -Nru _org/debian/install _new/debian/install --- _org/debian/install 1970-01-01 09:00:00.000000000 +0900 +++ _new/debian/install 2019-11-20 21:18:34.000000000 +0900 @@ -0,0 +1,4 @@ +#!/usr/bin/dh-exec +__main__.py => /usr/bin/meson +debian/debcrossgen /usr/share/meson/ +data/shell-completions/zsh/_meson /usr/share/zsh/vendor-completions diff -Nru _org/debian/rules _new/debian/rules --- _org/debian/rules 2019-10-30 05:34:27.000000000 +0900 +++ _new/debian/rules 2019-11-20 21:18:34.000000000 +0900 @@ -18,26 +18,3 @@ override_dh_auto_test: ./run_tests.py endif - -override_dh_clean: - dh_clean - rm -f meson-test-run.txt meson-test-run.xml - rm -rf __pycache__ - rm -rf mesonbuild/__pycache__ - rm -rf mesonbuild/*/__pycache__ - -override_dh_install: -# Helper script to autogenerate cross files. - dh_install - mkdir -p $$(pwd)/debian/meson/usr/share/meson - cp debian/debcrossgen $$(pwd)/debian/meson/usr/share/meson - mkdir -p $$(pwd)/debian/meson/usr/share/zsh/vendor-completions - cp data/shell-completions/zsh/_meson $$(pwd)/debian/meson/usr/share/zsh/vendor-completions - rm -rf $$(pwd)/debian/meson/usr/lib/python*/dist-packages/mesonbuild/__pycache__ - rm -rf $$(pwd)/debian/meson/usr/lib/python*/dist-packages/mesonbuild/*/__pycache__ - rm -rf $$(pwd)/debian/meson/usr/lib/python*/dist-packages/mesonbuild/*/*/__pycache__ -# For some reason Debian helpers install the files in the wrong -# directory, i.e. /usr/lib/python3.6 instead of /usr/lib/python3. I -# don't know why or how to fix it, since we just call the default -# tools with default parameters. Fix manually. - mv $$(pwd)/debian/meson/usr/lib/python3.* $$(pwd)/debian/meson/usr/lib/python3