簡體   English   中英

如何使用 py2exe 構建 com dll

[英]How to build com dll with py2exe

我正在嘗試使用http://www.py2exe.org/index.cgi/Py2exeAndWin32com將我的 python 項目轉換為 com dll

我的setup.py

from distutils.core import setup
import py2exe
import sys


class Target:
    def __init__(self, **kw):
        self.__dict__.update(kw)
        # for the version info resources (Properties -- Version)
        self.version = "0.0.1"
        self.company_name = "my company"
        self.copyright = "© 2006, my company"
        self.name = "python server"


Test = Target(
    description="TestServer",
    # use module name for win32com exe/dll server
    modules=["test"],
    # specify which type of com server you want (exe and/or dll)
    create_exe=False,
    create_dll=True
    )

setup(
    name="TestServer",
    # the following two parameters embed support files within exe/dll file
    options={"py2exe": {"bundle_files": 1, }},
    zipfile=None,
    version="0.0.1",
    description="Python.TestServer",
    # author, maintainer, contact go here:
    author="First Last",
    author_email="some_name@some_company.com",
    com_server=[Test]
    )

運行python setup.ty py2exe后,在 dist 目錄下沒有創建 dll

Py2exeAndWin32com 不再工作了嗎?

刪除了對 win32com 對象的支持albertosottile 評論

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM