Projet

Général

Profil

Assistance #436

Mis à jour par Davy Gigan il y a presque 8 ans

Generate a binary from script : 
 <pre> 
 mkdir /tmp/ntbclient_cxfreeze 
 cxfreeze --install-dir /tmp/ntbclient_cxfreeze/ /usr/bin/ntbclient | tee cxfreeze.log 
 </pre> 

 The generated program reports some errors : 
 <pre> 
 /tmp/ntbclient_cxfreeze$ ./ntbclient  
 Traceback (most recent call last): 
   File "/usr/lib/pymodules/python2.7/cx_Freeze/initscripts/Console.py", line 27, in <module> 
     exec code in m.__dict__ 
   File "/usr/bin/ntbclient", line 97, in <module> 
     from argparse import ArgumentParser, ArgumentDefaultsHelpFormatter, FileType 
   File "/usr/lib/python2.7/argparse.py", line 90, in <module> 
     import textwrap as _textwrap 
   File "/usr/lib/python2.7/textwrap.py", line 10, in <module> 
     import string, re 
 ImportError: No module named string 
 </pre> 

 The cxfreze logs for trusty (generated binary that works) shows some differences with the one for xenial. 

 Especially this, that could be related : 

 <pre> 
 -m string                      /usr/lib/python2.7/string.py 
 +m string                     
 </pre> 

 The /usr/lib/python2.7/string.py(c) files are present on both 16.04 and 14.04 python directories. 

 The generated ntbclient binary seems to contain the string.pyc file on 14.04 : 
 <pre> 
 $ strings ntbclient | grep string.py 
 string.pyc 
 string.pycPK 
 </pre> 

 No corresponding stuff on xenial generated binary. 

Retour