A small example package
Project description
https://packaging.python.org/en/latest/tutorials/packaging-projects/
- strutures:make sure have init.py in src -> project_name
- add LICENSE, README.MD, tests folder and pyproject.toml
- in pyproject.toml, add based on the backend package using: Hatchling,setuptools, Flit, PDM
- add requirement:requires is a list of packages that are needed to build your package. You don’t need to install them; build frontends like pip will install them automatically in a temporary, isolated virtual environment for use during the build process.
- build-backend is the name of the Python object that frontends will use to perform the build. 6.contunue config metas
- source distribution(sdist) or build distribution(wheel) By default, pip will always attempt to install a wheel unless there is no whl file for your operating system, at which point pip will attempt to build the wheel from the sdist (note that this can fail if you don't have the appropriate resources and requirements on your system).
sudo apt install python3-pip pip3 install build
apt install python3.10-venv
python3 -m build --sdist /home/yzh/Desktop/dl/example_package_zhaohany
python3 -m build --wheel source-tree-directory
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for example_package_zhaohany-0.0.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 200b895989a144d8d2c5fb68b1b473e0408eb920af8bd1bcd33bf07daf0a1286 |
|
MD5 | 24e05196d7a6f96bd6ae53aaae66681b |
|
BLAKE2b-256 | abd9b1f12f6612953dddf3f825a0e7c0ae1f9326be227f664d98a8233f455f78 |
Close
Hashes for example_package_zhaohany-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5f3728b160ee15fc0d80b8df1aea4186cf06733d5cb0dfa9410443966839361d |
|
MD5 | badd361abe8233995d8037e29573d8eb |
|
BLAKE2b-256 | 241b7dcb3b29e65f35879f0117f6d495828c613ced10649fa3233e36a9162902 |