1

たとえば、py2exe を使用したコードと一緒に美しいスープを exe にバンドルするにはどうすればよいでしょうか。

現在 setup.py に使用しているコードは

from distutils.core import setup
import py2exe

# equivalent command line with options is:
# python setup.py py2exe --compressed --bundle-files=2 --dist-dir="my/dist/dir" --dll-excludes="w9xpopen.exe"
options = {'py2exe': {
           'compressed':1,  
           'bundle_files': 1, 
           'dist_dir': "exe/dist/dir"
           'dll_excludes'  }}

setup(console=[''], options=options,zipfile = None)
4

1 に答える 1

4

options属性includesを追加して、そのようにライブラリを追加できます。例:

options = { "py2exe": {
                "includes": ["LIBRARY HERE", ...]
          }}

これには、Py2exe によってまだ検出されていない外部ライブラリが含まれます。私の記憶が正しければ、Py2exe はそれ自体で依存関係を見つけようとする必要があり、見つからない場合は上記の方法を使用できます。

Beautiful Soup のライブラリ構造については使用したことがないのでよくわかりませんが、例としては次のようになります。

"includes": ["matplotlib.backends.backend_tkagg"]

于 2012-08-02T02:03:02.830 に答える