Prep
See: https://packaging.python.org/en/latest/tutorials/packaging-projects/
Setup Testpypi and Pypi (one time only)
.pypirc file in $home (c:/users/dgsmith) directory
[testpypi]
username = __token__
password = token from test.pypi.org goes here
Project folder structure
pyexample
├── src
│ ├── pyexample_USERNAME_HERE
│ │ ├── __init__.py
│ │ ├── module_mpi4py_1.py
│ │ ├── module_numpy_1.py
│ │ └── module_numpy_2.py
│ │-- module2_USERNAME_HERE
│ │ ├── __init__.py
│ │ ├── ...
├── tests
│ ├── test1.py
├── .gitignore
├── LICENSE
├── pyproject.toml
├── README.md
Other Steps
- Create a virtual environment (.venv)
- pip install any dependencies
- pip freeze to create requirements.txt
Tools install
python -m pip install --upgrade pip
python -m pip install --upgrade build
python -m pip install --upgrade twine
Create pyproject.toml
under project folder create pyproject.toml
[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"
[project]
name = "dtscore_dsmi"
version = "0.0.2"
authors = [
{ name="D. Smith", email="dgsmith.hpot@gmail.com" },
]
description = "DTS Core Services"
readme = "README.md"
requires-python = ">= 3.10"
dependencies = [
'requests>=2.31',
'importlib-metadata; python_version>="3.10"',
'urllib3>=2.0'
]
classifiers = [
'Development Status :: 5 - Production/Stable',
'Environment :: Console',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Operating System :: Microsoft :: Windows :: Windows 11',
'Programming Language :: Python :: 3.10',
]
Build the distribution
- delete any previous versions from the dist folder
- check version number in pyproject.toml
| Command | Result |
|---|---|
| python -m build | builds the application |
| twine upload --repository testpypi dist/* | upload distribution to testpypi, or |
| twine upload dist/* | upload distribution to pypi |
Metadata
Release files for dtscore 2.7.11
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| dtscore-2.7.11.tar.gz | 87.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| dtscore-2.7.11-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 185.3 kB
Release files / dtscore-2.7.11.tar.gz
| Download URL | dtscore-2.7.11.tar.gz |
|---|---|
| Size | 87.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
cd4ccfe0d94a49e9b7668de13f437eb41fcf31afb2db58141d6aa7856a8ce9ca
|
|
BLAKE2b-256 checksum How to use checksums |
a9b910e72e4333465a26f66cd2f39e5b53a07bbd2173953479f5cd56a9947bfc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.7 {"installer":{"name":"uv","version":"0.12.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / dtscore-2.7.11-py3-none-any.whl
| Download URL | dtscore-2.7.11-py3-none-any.whl |
|---|---|
| Size | 97.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
89b3ae431a19e2e13a59b77244abc7ed39bf7c8c4f915069c5de8c95afd3e663
|
|
BLAKE2b-256 checksum How to use checksums |
a26e59cdec8be34051603b3691e5874a0fa4d880bc979ffe7a6ebc58536833be
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.7 {"installer":{"name":"uv","version":"0.12.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|