Skip to main content

验证打包功能的测试包, 请勿下载

Project description

韩灵稚打包测试

Hanlingzhi's Package PyPi Demo ##工程结构说明

.
├── LICENSE.txt    	// 证书文件
├── README.md		// MD文件
├── hanlingzhi
│   ├── __init__.py
│   └── math_h.py
├── setup.py			// 打包配置
└── string_h
    ├── __init__.py
    └── reverse.py

##测试服务器打包流程

  • 升级setuptools和wheel包
python3 -m pip install --user --upgrade setuptools wheel
  • 打包到本地文件
python3 setup.py sdist bdist_wheel
会生成build、dist、hanlingzhi_test.egg-info文件,其中dist文件就是制品
├── dist
│   ├── hanlingzhi-test-0.0.1.tar.gz
│   └── hanlingzhi_test-0.0.1-py3-none-any.whl
  • 分发到PyPi私服(pypi提供的测试版 test.pypi.org),首先安装twine
pip3 install twine
python3 -m twine upload --repository-url https://test.pypi.org/legacy/ dist/*
Uploading distributions to https://test.pypi.org/legacy/
Enter your username: hanlingzhi  // 私服注册的用户名
Enter your password:                 // 私服注册的密码
Uploading hanlingzhi_test-0.0.1-py3-none-any.whl
100%|████| 7.96k/7.96k [00:16<00:00, 486B/s]
Uploading hanlingzhi-test-0.0.1.tar.gz
100%|████| 7.28k/7.28k [00:01<00:00, 4.34kB/s]
  • 下载依赖
最好在虚拟环境下测试  python3 -m venv venv
python3 -m pip install --index-url https://test.pypi.org/simple/ --no-deps hanlingzhi_test
Looking in indexes: https://test.pypi.org/simple/
Collecting hanlingzhi_test
  Downloading https://test-files.pythonhosted.org/packages/a7/ca/3e5ecda3c564a721642a756e31ec2f6f340067cfa4dddb119e2eb2c98dd0/hanlingzhi_test-0.0.1-py3-none-any.whl
Installing collected packages: hanlingzhi-test
Successfully installed hanlingzhi-test-0.0.1
  • 测试
python3
>>> from hanlingzhi import math_h
>>> math_h.addition(3,4)
7			// 成功
  • 上传正式服务
python3 -m twine upload --repository-url https://upload.pypi.org/legacy/  dist/*

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

heyang-test-0.1.0.tar.gz (77.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

heyang_test-0.1.0-py3-none-any.whl (76.6 kB view details)

Uploaded Python 3

File details

Details for the file heyang-test-0.1.0.tar.gz.

File metadata

  • Download URL: heyang-test-0.1.0.tar.gz
  • Upload date:
  • Size: 77.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.9

File hashes

Hashes for heyang-test-0.1.0.tar.gz
Algorithm Hash digest
SHA256 25aa00e73c7815f26fda27cf26e48e36e6b3c05ae096508a255319823a3e00da
MD5 ea770da699e852879e3c0b9216f4aab6
BLAKE2b-256 f6d25f3bc7725b08b11bf1613a2688002bd5fb661ec770cbab0bd560126e7973

See more details on using hashes here.

File details

Details for the file heyang_test-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: heyang_test-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 76.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.9

File hashes

Hashes for heyang_test-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6baebd6ac06cf19f1b60222ce513a72d67996cab8a2a840e8328ee1be01e0f01
MD5 cd28f62226b00b0f503b49ffbd8a0410
BLAKE2b-256 ee355b53d64a4be77fc1b74273c5ed9386fbff2b72bb334e5d98f6765a52335d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page