Python packaging, made simple.
Project description
makepkg: A Python package for ...
Installation - development
Create a virtual environment, for example using venv:
$ python -m venv venv-makepkg
$ source venv-makepkg/bin/activate
$ mkdir makepkg
$ cd makepkg
$ python -m pip install -e .[dev]
Note that the last command installs a development environment, as it also
installs packages needed for development, like black (for code formatting),
pytest (for unit testing) and wheel (for creating wheel files from the package).
Testing
Running the tests requires to run the following command in the root folder (of course in the virtual environment):
(venv-makepkg) > pytest
If you use doctests in your docstrings (as makepackage assumes), you can run them
using the following command (in the root folder):
(venv-makepkg) > python -m doctest makepkg/makepkg.py
In a similar way, you can run doctests from any other file that contains doctests.
Versioning
Remember to update package version once a change is made to the package and the new version is pushed to the repository. Don't forget about releases, too.
How to build a Python package?
To build the package, you need to go to the root folder of the package and run the following command:
(venv-makepkg) > python -m build .
Note that this assumes you have wheel installed in your virtual environment, and
makepackage does this for you.
The built package is now located in the dist/ folder.
Publishing your package in PyPi
If you want to publish it to PyPi, you need to install twine, create an account there, and run the following command (also in the package's root folder):
(venv-makepkg) > twine upload dist/*
Nonetheless, if you first want to check what it will look like in PyPi, you can first upload the package to a test version of PyPi, that is,
twine upload -r testpypi dist/*
Check if everything is fine, and if so, you're ready to publish the package to PyPi.
Installation from PyPi
If the package is in PyPi, you can install it from there like any other Python package, that is,
pip install makepkg
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
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 makepkg-0.0.1.tar.gz.
File metadata
- Download URL: makepkg-0.0.1.tar.gz
- Upload date:
- Size: 3.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4b618b5dd8947dfcd7dfb4eeb7fe258afbf95d7e71cba23ee1c91d2f5df35f96
|
|
| MD5 |
d5a00ceeb3f371ff570887350e869350
|
|
| BLAKE2b-256 |
6b176eb0b65a66c7e90a15c3e95b68cece0d0ed598f7c2b6692db2601f481835
|
Provenance
The following attestation bundles were made for makepkg-0.0.1.tar.gz:
Publisher:
makepkg-publish.yml on patrickboateng/makepkg
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
makepkg-0.0.1.tar.gz -
Subject digest:
4b618b5dd8947dfcd7dfb4eeb7fe258afbf95d7e71cba23ee1c91d2f5df35f96 - Sigstore transparency entry: 404579657
- Sigstore integration time:
-
Permalink:
patrickboateng/makepkg@aab05947593c5e75d8d9aab942535d6e1914b755 -
Branch / Tag:
refs/tags/v0.0.1 - Owner: https://github.com/patrickboateng
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
makepkg-publish.yml@aab05947593c5e75d8d9aab942535d6e1914b755 -
Trigger Event:
push
-
Statement type:
File details
Details for the file makepkg-0.0.1-py3-none-any.whl.
File metadata
- Download URL: makepkg-0.0.1-py3-none-any.whl
- Upload date:
- Size: 3.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2916200353953f05897e3ec45960ef89166275cd4fc834d163c8006905b2f063
|
|
| MD5 |
117e657c8f5b44379d1b1fe3301d4133
|
|
| BLAKE2b-256 |
73a956ce49962baf78f9737b942d3957c7e775ca9de8549302b8759bdf9924a6
|
Provenance
The following attestation bundles were made for makepkg-0.0.1-py3-none-any.whl:
Publisher:
makepkg-publish.yml on patrickboateng/makepkg
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
makepkg-0.0.1-py3-none-any.whl -
Subject digest:
2916200353953f05897e3ec45960ef89166275cd4fc834d163c8006905b2f063 - Sigstore transparency entry: 404579660
- Sigstore integration time:
-
Permalink:
patrickboateng/makepkg@aab05947593c5e75d8d9aab942535d6e1914b755 -
Branch / Tag:
refs/tags/v0.0.1 - Owner: https://github.com/patrickboateng
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
makepkg-publish.yml@aab05947593c5e75d8d9aab942535d6e1914b755 -
Trigger Event:
push
-
Statement type: