A small example package.
Project description
Project description
Make sure you have upgraded version of pip
Windows
py -m pip install --upgrade pip
Linux/MAC OS
python3 -m pip install --upgrade pip
Create a project with the following structure
packaging_tutorial/
├── dist
├── src/
│ └── example_package/
│ ├── __init__.py
│ └── example.py
│
├── tests/
│ └── test_example.py
│
├── LICENSE
├── pyproject.toml
└── README.md
mkdir dist
mkdir src/example_package
touch src/example_package/__init__.py
touch src/example_package/example.py
mkdir tests
touch tests/test_example.py
touch LICENSE
touch pyproject.toml
pyproject.toml
This file tells tools like pip and build how to create your project
[build-system]
requires = ["setuptools", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "example-pkg-YOUR-USERNAME-HERE"
version = "0.0.1"
authors = [
{ name = "Example Author", email = "author@example.com" },
]
description = "A small example package"
readme = "README.md"
keywords = ["key1", "key2"]
requires-python = ">=3.10"
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Operating System :: OS Independent",
]
[project.urls]
Homepage = "https://github.com/pypa/sampleproject"
build-system.requires gives a list of packages that are needed to build your package. Listing something here will only make it available during the build, not after it is installed.
build-system.build-backend is the name of Python object that will be used to perform the build. If you were to use a different build system, such as flit or poetry, those would go here, and the configuration details would be completely different than the setuptools configuration described below.
Running the build
Make sure your build tool is up to date
Windows
py -m pip install --upgrade build
Linux/MAC OS
python3 -m pip install --upgrade build
Create the build
py -m build
References
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mustafakilic-0.0.1.tar.gz.
File metadata
- Download URL: mustafakilic-0.0.1.tar.gz
- Upload date:
- Size: 2.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9807bee7c535eafe186b1276ca0f5b6a9e2a4e384b52ac0b231ed994cd1c683b
|
|
| MD5 |
d39f8e0932464d9d905e0359f0027ff4
|
|
| BLAKE2b-256 |
400f93feb923a2937d0accbdae64b0f14b277e5d0464bee850549200cfecc944
|
File details
Details for the file mustafakilic-0.0.1-py3-none-any.whl.
File metadata
- Download URL: mustafakilic-0.0.1-py3-none-any.whl
- Upload date:
- Size: 3.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f19df49324124fcd08af8aac1123f534a7fb931a3c3d2244a3e34c292b901f9f
|
|
| MD5 |
c78497db4771191f72707b339e5e41cb
|
|
| BLAKE2b-256 |
354243aa62cd1ccbee97ebf7b2a7d2dd111693b9009b1968d456e8d45923abf9
|