Package: dh-python
Version: 4.20200315
Severity: normal

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 


-- System Information:
Debian Release: bullseye/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 5.6.0-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8), 
LANGUAGE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages dh-python depends on:
ii  python3            3.8.2-3
ii  python3-distutils  3.8.2-2

dh-python recommends no packages.

Versions of packages dh-python suggests:
ii  dpkg-dev      1.19.7
ii  libdpkg-perl  1.19.7

-- no debconf information

Reply via email to