如何编译一个Python包到一个dll [英] How to compile a Python package to a dll
问题描述
*。pyc
。但我在某处读到任何 *。pyc
可以轻松反编译! 更新:
遵循这些:
1)我写了一个python包
2)想分发它
3)不要分发源代码< br>
4)* .pyc是可反编译的>>源可以提取!
5)dll是标准的
写出你想隐藏在Cython中的所有内容,并将其编译为 pyd
。这就像你可以得到编译的python代码。
此外,dll不是一个标准,不是在Python世界。他们也不便携。
Well, I have a Python package. I need to compile it as dll before distribute it in a way easily importable. How? You may suggest that *.pyc
. But I read somewhere any *.pyc
can be easily decompiled!
Update:
Follow these:
1) I wrote a python package
2) want to distribute it
3) do NOT want distribute the source
4) *.pyc is decompilable >> source can be extracted!
5) dll is standard
Write everything you want to hide in Cython, and compile it to pyd
. That's as close as you can get to making compiled python code.
Also, dll is not a standard, not in Python world. They're not portable, either.
这篇关于如何编译一个Python包到一个dll的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!