Projet

Général

Profil

Assistance #436

fermé

cx_freeze on ntblcient python script does not work in Ubuntu 14.04

Ajouté par Davy Gigan il y a environ 8 ans. Mis à jour il y a presque 6 ans.

Statut:
Rejeté
Priorité:
Haut
Assigné à:
Début:
27/04/2016
Echéance:
% réalisé:

0%

Temps estimé:

Description

Generate a binary from script :

mkdir /tmp/ntbclient_cxfreeze
cxfreeze --install-dir /tmp/ntbclient_cxfreeze/ /usr/bin/ntbclient | tee cxfreeze.log

The generated program reports some errors :

/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

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

Especially this, that could be related :

-m string                    /usr/lib/python2.7/string.py
+m string                    

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 :

$ strings ntbclient | grep string.py
string.pyc
string.pycPK

No corresponding stuff on xenial generated binary.


Fichiers

Formats disponibles : Atom PDF