python打包编译成pyd或者_「pyd」python打包编译成pyd或者.so,保护代码。 - 金橙教程网...

本文介绍了如何将Python代码打包编译成pyd文件,包括使用setup.py和Cython的方法。详细步骤从创建源代码、编写setup.py、执行编译命令到解决可能出现的导入错误。此外,还提到了pyd与pyc、pyo的区别,以及生成.so文件的过程。
摘要由CSDN通过智能技术生成

pyd

一、准备工作, setup.py的打包

Standard commands:

build build everything needed to install

build_py "build" pure Python modules (copy to build Directory)

build_ext build C/C++ extensions (compile/link to build directory)

build_clib build C/C++ libraries used by Python extensions

build_scripts "build" scripts (copy and fixup #! line)

clean clean up temporary files fROM 'build' command

install install everything from build directory

install_lib install all Python modules (extensions and pure Python)

install_headers install C/C++ header files

install_scripts install scripts (Python or otherwise)

install_DATa install data files

sdist create a source distribution (tarball, zip file, etc.)

register register the distribution with the Python package index

bdist create a built (binary) distribution

bdist_dumb create a "dumb" built distribution

bdist_rpm create an RPM distribution

bdist_wininst create an executable installer for MS windows

upload upload binary package to PyPI

check perform some checks on the package

Extra commands:

rotate delete older distributions,

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值