Package: poetry-publish
About poetry-publishHelper to build and upload a project that used poetry to PyPi, with prechecks:User must confirm:If__version__contains ‘dev’ or ‘rc’If git repository is not onmainormasterAbort publish if git repository contains changesAbort if git repository is not up-to-dateAbort ifpoetry checkfailsAbort iftwine checkfailsAbort if git version tag already existsAfter a successful upload to PyPi:create a git version taggit push tag to remote serverCompatible Python Versions (seetox.inior.travis.yml):3.10, 3.9, 3.8, 3.7, 3.6PyPy3github.com/jedie/poetry-publish/actionstravis-ci.org/jedie/poetry-publishcodecov.io/gh/jedie/poetry-publishlandscape.io/github/jedie/poetry-publish/masterpypi.org/project/poetry-publish/example~/repos/python-creole$ poetry run publish

Check if we are on "master" branch:
    Call: 'git branch --no-color'
OK

Set version in "pyproject.toml" to: v1.4.3
    Call: 'poetry version 1.4.3'

Bumping version from 1.4.3 to 1.4.3

check if if git repro is clean:
    Call: 'git status --porcelain'
OK

Run "poetry check":
OK

check if pull is needed
    Call: 'git fetch --all'

Fordere an von origin
    Call: 'git log HEAD..origin/master --oneline'
OK
    Call: 'git push'

Everything up-to-date

Cleanup old builds:
    remove tree: /home/jens/repos/python-creole/dist

build but do not upload...
    Call: 'poetry build'
Build log file is here: 'publish.log'

check git tag
OK

Upload to PyPi via poetry:
    Call: 'poetry publish'


Publishing python-creole (1.4.3) to PyPI
 - Uploading python-creole-1.4.3.tar.gz 100%
 - Uploading python_creole-1.4.3-py3-none-any.whl 100%

git tag version
    Call: 'git tag v1.4.3'


git push tag to server
    Call: 'git push --tags'

Total 0 (delta 0), reused 0 (delta 0)
To github.com:jedie/python-creole.git
 * [new tag]         v1.4.3 -> v1.4.3setup usage in projectsCreate a publish hook in you project, e.g. createyour_project/publish.pywith:from pathlib import Path

import your_project
from poetry_publish.publish import poetry_publish


def publish():
    poetry_publish(
        package_root=Path(your_project.__file__).parent.parent,
        version=your_project.__version__,
    )Add this to your poetrypyproject.toml, e.g.:[tool.poetry.scripts]
publish = 'your_project:publish'To publish do this:~$ cd your_project
~/your_project$ poetry run publishNote:Don’t miss therun! It’s not the same aspoetry publishbased on:https://github.com/jedie/python-code-snippets/blob/master/CodeSnippets/setup_publish.pyunittests# clone repository (or use your fork):
~$ git clone https://github.com/jedie/poetry-publish.git
~$ cd poetry-publish

# install or update poetry:
~/poetry-publish$ make install-poetry

# install poetry-publish via poetry:
~/poetry-publish$ make install

# Run pytest:
~/poetry-publish$ make pytest

# Run pytest via tox with all environments:
~/poetry-publish$ make tox

# Run pytest via tox with one Python version:
~/poetry-publish$ make tox-py38
~/poetry-publish$ make tox-py37
~/poetry-publish$ make tox-py36make targetsTo see all make targets, just callmake:~/poetry-publish$ make
help                 List all commands
install-poetry       install or update poetry
install              install python-poetry_publish via poetry
update               Update the dependencies as according to the pyproject.toml file
lint                 Run code formatters and linter
fix-code-style       Fix code formatting
tox-listenvs         List all tox test environments
tox                  Run pytest via tox with all environments
tox-py36             Run pytest via tox with *python v3.6*
tox-py37             Run pytest via tox with *python v3.7*
tox-py38             Run pytest via tox with *python v3.8*
tox-py39             Run pytest via tox with *python v3.9*
pytest               Run pytest
update-rst-readme    update README.rst from README.creole
publish              Release new version to PyPihistorydev-compare v0.5.0…masterTBCv0.5.0 - 2022-07-19 -compare v0.4.1…v0.5.0Test with Python 3.10Fix twine check call.Fixpoetry publishcall.v0.4.1 - 2021-03-19 -compare v0.4.0…v0.4.1Bugfix if gitmainbranch is used, instead ofmasterv0.4.0 - 2020-10-17 -compare v0.3.2…v0.4.0Calltwine checkdist/*.*, too.Some meta updates to project setupv0.3.2 - 2020-10-16 -compare v0.3.1…v0.3.2Create git annotated tags instead of a lightweight tag.Contributed by sebhmg in #9Makepython-creoleto an optional dependency. Based on a contribution by sebhmgAllowmainbesidemasteras stable branch.Addmake updateUpdatepytest.iniChange supported Python version inpyproject.tomlRun tests with Python 3.9, toov0.3.1 - 2020-02-19 -compare v0.3.0…v0.3.1less restricted dependency specificationAdd:}v0.3.0 - 2020-02-10 -compare v0.2.3…v0.3.0Poetry publish error -> fallback and use twinecallpoetry publishwith-vvvcallgit pushwithorigin<current-branch>add isort configv0.2.3 - 2020-02-02 -compare v0.2.2…v0.2.3makepoetry_publish.tests.test_project_setupusable for external packagesv0.2.2 - 2020-02-01 -compare v0.2.1…v0.2.2Fix missing project description on PyPiv0.2.1 - 2020-02-01 -compare v0.2.0…v0.2.1call “poetry version” after “branch is master” checkadd many teststest with PyPy v3, tooUpload coverage reportsfix code styleupdate READMEv0.2.0 - 2020-02-01 -compare 92e584…v0.2.0first released version cut out frompython-creolefirst source code was written 27.11.2008:Forum thread (de)Project linksGitHubhttps://github.com/jedie/poetry-publish/PyPihttps://pypi.org/project/poetry-publish/donationpaypal.me/JensDiemerFlattr This!SendBitcoinsto1823RZ5Md1Q2X5aSXRC5LRPcYdveCiVX6FNote: this file is generated from README.creole2022-07-1912:48:48 with"python-creole"