Hello, I try to use parameter substitution in one of my package.
something with this line
# install all the non .py files of the sources
# modules
dh_auto_install -- -s custom --install-args='find modules -path "modules/cctbx_project" -prune -o -name "__init__.py" -print0 |\
while read -d $$"\0" file; do fdir=`dirname "$$file"`\
; find "$fdir" -maxdepth 1 \\\
-name "*.py" -prune \\\
-o -name "*.c" \\\
-o -name "*.cc" \\\
-o -name "*.cpp" \\\
-o -name "*.h" \\\
-o -name "*.hpp" \\\
-o -name "*.f" \\\
-o -name "SConscript" \\\
-o -name "\.*" \\\
-o -name "*.rst" \\\
-o -name "*.md" \\\
-o -name "*.toml" \\\
-o -name "LICENSE*" \\\
-o -name "AUTHORS*" \\\
-o -type d \\\
-o -print0 |\
while read -d $$"\0" ffile; do \
dh_install -p python3-dials --sourcedir=modules "$${ffile#modules/}" {install_dir};\
done \
done'
But it failes with this error
E: pybuild pybuild:352: install: plugin custom failed with: 'ffile#modules/'
Traceback (most recent call last):
File "/usr/bin/pybuild", line 350, in main
run(func, i, version, c)
File "/usr/bin/pybuild", line 301, in run
result = func(context, args)
File "/usr/share/dh-python/dhpython/build/base.py", line 260, in wrapped_func
command = command.format(**quoted_args)
KeyError: 'ffile#modules/'
It seems that pybuild does not understand that it must not deal with ${
Cheers
Frederic