Skip to main content

质量考试题库

正式编译打包发布项目

编译

python3 setup.py build

打包

python3 setup.py sdist bdist_wheel

上传

python3 -m twine upload dist/*

本地编译

  1. py_modules 只能指定一个文件
  2. packages 配置包地址,默认不包含包的子包
  3. 打包模块给别人安装
python3 setup.py build
python setup.py sdist
dist/mypk1-1.0.zip
解压后使用
python setup.py install即可

开发调试

发布模块到本地环境

在项目根目录下,

python setup.py install

这样,系统会编译启动命令道script,但是lib指向的是本地开发代码

开发

在根目录下执行 python3 package2/test3.py 不要在package2里面直接执行test3.py这样会报依赖找不到 可以指定PYTHONPATH为E:\wk\myproj\mypython4,再执行

Metadata

Release files for mytodo2 0.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mytodo2 0.0.2
File Size Uploaded
mytodo2-0.0.2.tar.gz 4.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for mytodo2 0.0.2
File Interpreter ABI Platform
mytodo2-0.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 10.5 kB

Release files / mytodo2-0.0.2.tar.gz

Download URL mytodo2-0.0.2.tar.gz
Size 4.3 kB
Tags Source
SHA-256 checksum
How to use checksums
f0099edcad1d2644c04935a638286e7b3d27963310dde402dd3c58b982ded0c4
BLAKE2b-256 checksum
How to use checksums
01b8970963bcc72a6064f4bc20565be400aa5e0ee604a9e247f52540ad845d75
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.25.1 requests-toolbelt/0.9.1 urllib3/1.26.5 tqdm/4.56.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.7.7

Release files / mytodo2-0.0.2-py3-none-any.whl

Download URL mytodo2-0.0.2-py3-none-any.whl
Size 6.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1d43450c998dab9778917a6110413ccdf2c1ba9ec16de603dc53d173eeccba21
BLAKE2b-256 checksum
How to use checksums
77685839579f3657904e33791c8049423fb85d8d87e1f094f401c12e8c7d45e6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.25.1 requests-toolbelt/0.9.1 urllib3/1.26.5 tqdm/4.56.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.7.7

Release history Release notifications | RSS feed

This release

0.0.2 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page