mypythontools_cicd.deploy package¶
Allow to deploy project.
Possible destinations:
PyPi
Check deploy_to_pypi function docs for how to use it.
Usually this function is not called manually, but it’s a part of cicd_pipeline from cicd. Check it’s docs where it is described, how to use VS Code Task to be able to optionally test, push and deploy with tasks (one button click).
- mypythontools_cicd.deploy.deploy_to_pypi(setup_path: None | PathLike = None, clean: bool = True, verbosity: Literal[(0, 1, 2)] = 1, pep517: bool = False, venv: None | Venv = <mypythontools_cicd.venvs.venvs_internal.Venv object>) None [source]¶
Publish python library to PyPi.
Username and password are set with env vars TWINE_USERNAME and TWINE_PASSWORD.
Note
You need working setup.py file. If you want to see example, try the one from project-starter on
https://github.com/Malachov/mypythontools/blob/master/content/project-starter/setup.py
- Parameters
setup_path (None | PathLike, optional) – Function suppose, that there is a setup.py somewhere in cwd. If not, path will be inferred. Build and dist folders will be created in same directory. Defaults to None.
clean (bool, optional) – Whether delete created build and dist folders.
verbosity (Literal[0, 1, 2], optional) – If 0, prints nothing, if 1, then one line description of what happened is printed. If 3, all the results from terminal are printed. Defaults to 1.
pep517 (bool, optional) – Whether using PEP 517, that use pyproject.toml to build distribution. Without it it’s faster, but with it, pyproject.TOML can be used. Defaults to False.
venv (None | Venv) – Venv used for building distribution. Defaults to Venv(“venv”).