releasecmd


Namereleasecmd JSON
Version 0.10.3 PyPI version JSON
download
home_pagehttps://github.com/thombashi/releasecmd
Summaryreleasecmd is a release subcommand for setup.py (setuptools.setup). the subcommand create a git tag and push, and upload packages to PyPI.
upload_time2024-04-07 07:32:28
maintainerNone
docs_urlNone
authorTsuyoshi Hombashi
requires_python>=3.8
licenseMIT License
keywords release setuptools
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            releasecmd
============================================

|PyPI pkg ver| |Supported Python versions| |CI status| |CodeQL|

.. |PyPI pkg ver| image:: https://badge.fury.io/py/releasecmd.svg
    :target: https://badge.fury.io/py/releasecmd
    :alt: PyPI package version

.. |Supported Python versions| image:: https://img.shields.io/pypi/pyversions/releasecmd.svg
    :target: https://pypi.org/project/releasecmd
    :alt: Supported Python versions

.. |CI status| image:: https://github.com/thombashi/releasecmd/actions/workflows/ci.yml/badge.svg
    :target: https://github.com/thombashi/releasecmd/actions/workflows/ci.yml
    :alt: CI status

.. |CodeQL| image:: https://github.com/thombashi/releasecmd/actions/workflows/github-code-scanning/codeql/badge.svg
    :target: https://github.com/thombashi/releasecmd/actions/workflows/github-code-scanning/codeql
    :alt: CodeQL

Summary
---------
``releasecmd`` is a ``release`` subcommand for ``setup.py`` (``setuptools.setup``).
The subcommand creates a git tag and pushes and uploads packages to ``PyPI``.

The subcommand class (``releasecmd.ReleaseCommand``) is implemented as a subclass of ``setuptools.Command`` class.
The ``release`` subcommand performs the following tasks:

1. Locates a file that defines the package version (``__version__`` variable)
2. Creates a git tag using the package version information
    - Optionally signs the git tag with GPG if the ``--sign`` option is specified
3. Pushes the git tag
4. Upload package files to PyPI using ``twine``.
 
Installation
============================================
::

    pip install releasecmd


Usage
============================================

:setup.py:
    .. code-block:: python

        import setuptools

        from releasecmd import ReleaseCommand

        setuptools.setup(
            ...
            cmdclass={"release": ReleaseCommand},
        )


Example
============================================
.. code-block::

    $ python3 setup.py release
    running release
    [get the version from ./releasecmd/__version__.py]
    [pull git tags]
    Already up to date.
    [check existing git tags]
    [create a git tag: v0.0.15]
    [push git tags]
    [upload the package to PyPI]
    ...

prerequisite: package binaries must be in the ``dist/`` directory.


Specify version manually
------------------------------------------------------
You can specify a version manually by ``--version`` option:

.. code-block::

    $ python3 setup.py release --version 0.1.0
    [create a git tag: v0.1.0]
    [pull git tags]
    Already up to date.
    [check existing git tags]
    [push git tags]
    [upload packages to PyPI]


Create a GPG signed tag and upload packages
------------------------------------------------------
.. code-block::

    $ python3 setup.py release --sign
    running release
    [get the version from ./releasecmd/__version__.py]
    [pull git tags]
    Already up to date.
    [check existing git tags]
    [create a git tag with gpg signing: v0.1.0]
    [push git tags]
    [upload packages to PyPI]
    ...

Skip create a git tag and upload packages
------------------------------------------------------
.. code-block::

    $ python3 setup.py release --skip-tagging
    running release
    [get the version from ./releasecmd/__version__.py]
    skip git tagging
    [upload packages to PyPI]
    ...


release command options
============================================
::

    Options for 'ReleaseCommand' command:
      --skip-tagging    skip a git tag creation
      --skip-uploading  skip uploading packages to PyPI
      --dry-run         do no harm
      --sign            make a GPG-signed git tag
      --verbose         show verbose output
      --search-dir      specify a root directory path to search a version file.
                        defaults to the current directory.
      --tag-template    specify git tag format. defaults to 'v{version}'.
      --version         specify version manually


Dependencies
============================================
- Python 3.8+
- `Git <https://git-scm.com/>`__

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/thombashi/releasecmd",
    "name": "releasecmd",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "release, setuptools",
    "author": "Tsuyoshi Hombashi",
    "author_email": "tsuyoshi.hombashi@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/67/10/690db19afabc4866de01351104120a9836e46419aa6da57fa7e31cc65ec3/releasecmd-0.10.3.tar.gz",
    "platform": null,
    "description": "releasecmd\n============================================\n\n|PyPI pkg ver| |Supported Python versions| |CI status| |CodeQL|\n\n.. |PyPI pkg ver| image:: https://badge.fury.io/py/releasecmd.svg\n    :target: https://badge.fury.io/py/releasecmd\n    :alt: PyPI package version\n\n.. |Supported Python versions| image:: https://img.shields.io/pypi/pyversions/releasecmd.svg\n    :target: https://pypi.org/project/releasecmd\n    :alt: Supported Python versions\n\n.. |CI status| image:: https://github.com/thombashi/releasecmd/actions/workflows/ci.yml/badge.svg\n    :target: https://github.com/thombashi/releasecmd/actions/workflows/ci.yml\n    :alt: CI status\n\n.. |CodeQL| image:: https://github.com/thombashi/releasecmd/actions/workflows/github-code-scanning/codeql/badge.svg\n    :target: https://github.com/thombashi/releasecmd/actions/workflows/github-code-scanning/codeql\n    :alt: CodeQL\n\nSummary\n---------\n``releasecmd`` is a ``release`` subcommand for ``setup.py`` (``setuptools.setup``).\nThe subcommand creates a git tag and pushes and uploads packages to ``PyPI``.\n\nThe subcommand class (``releasecmd.ReleaseCommand``) is implemented as a subclass of ``setuptools.Command`` class.\nThe ``release`` subcommand performs the following tasks:\n\n1. Locates a file that defines the package version (``__version__`` variable)\n2. Creates a git tag using the package version information\n    - Optionally signs the git tag with GPG if the ``--sign`` option is specified\n3. Pushes the git tag\n4. Upload package files to PyPI using ``twine``.\n \nInstallation\n============================================\n::\n\n    pip install releasecmd\n\n\nUsage\n============================================\n\n:setup.py:\n    .. code-block:: python\n\n        import setuptools\n\n        from releasecmd import ReleaseCommand\n\n        setuptools.setup(\n            ...\n            cmdclass={\"release\": ReleaseCommand},\n        )\n\n\nExample\n============================================\n.. code-block::\n\n    $ python3 setup.py release\n    running release\n    [get the version from ./releasecmd/__version__.py]\n    [pull git tags]\n    Already up to date.\n    [check existing git tags]\n    [create a git tag: v0.0.15]\n    [push git tags]\n    [upload the package to PyPI]\n    ...\n\nprerequisite: package binaries must be in the ``dist/`` directory.\n\n\nSpecify version manually\n------------------------------------------------------\nYou can specify a version manually by ``--version`` option:\n\n.. code-block::\n\n    $ python3 setup.py release --version 0.1.0\n    [create a git tag: v0.1.0]\n    [pull git tags]\n    Already up to date.\n    [check existing git tags]\n    [push git tags]\n    [upload packages to PyPI]\n\n\nCreate a GPG signed tag and upload packages\n------------------------------------------------------\n.. code-block::\n\n    $ python3 setup.py release --sign\n    running release\n    [get the version from ./releasecmd/__version__.py]\n    [pull git tags]\n    Already up to date.\n    [check existing git tags]\n    [create a git tag with gpg signing: v0.1.0]\n    [push git tags]\n    [upload packages to PyPI]\n    ...\n\nSkip create a git tag and upload packages\n------------------------------------------------------\n.. code-block::\n\n    $ python3 setup.py release --skip-tagging\n    running release\n    [get the version from ./releasecmd/__version__.py]\n    skip git tagging\n    [upload packages to PyPI]\n    ...\n\n\nrelease command options\n============================================\n::\n\n    Options for 'ReleaseCommand' command:\n      --skip-tagging    skip a git tag creation\n      --skip-uploading  skip uploading packages to PyPI\n      --dry-run         do no harm\n      --sign            make a GPG-signed git tag\n      --verbose         show verbose output\n      --search-dir      specify a root directory path to search a version file.\n                        defaults to the current directory.\n      --tag-template    specify git tag format. defaults to 'v{version}'.\n      --version         specify version manually\n\n\nDependencies\n============================================\n- Python 3.8+\n- `Git <https://git-scm.com/>`__\n",
    "bugtrack_url": null,
    "license": "MIT License",
    "summary": "releasecmd is a release subcommand for setup.py (setuptools.setup). the subcommand create a git tag and push, and upload packages to PyPI.",
    "version": "0.10.3",
    "project_urls": {
        "Changlog": "https://github.com/thombashi/releasecmd/releases",
        "Homepage": "https://github.com/thombashi/releasecmd",
        "Source": "https://github.com/thombashi/releasecmd",
        "Tracker": "https://github.com/thombashi/releasecmd/issues"
    },
    "split_keywords": [
        "release",
        " setuptools"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "3309fcb5d197bca0b93afcaf6c906e9a19d9ea464fcfb48901074011496ea107",
                "md5": "ab3f3f8532a52da280d9af541ecd45a2",
                "sha256": "f73c908c78fcae2c58b60b7cd62b36b9cb72b0287742503c4256a8e3bd38cbdb"
            },
            "downloads": -1,
            "filename": "releasecmd-0.10.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "ab3f3f8532a52da280d9af541ecd45a2",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 7162,
            "upload_time": "2024-04-07T07:32:26",
            "upload_time_iso_8601": "2024-04-07T07:32:26.243221Z",
            "url": "https://files.pythonhosted.org/packages/33/09/fcb5d197bca0b93afcaf6c906e9a19d9ea464fcfb48901074011496ea107/releasecmd-0.10.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "6710690db19afabc4866de01351104120a9836e46419aa6da57fa7e31cc65ec3",
                "md5": "4221811fb77a0eb9cef4f40642b9daf5",
                "sha256": "725fb130b575d121e07b837fcb2439e961b49c48e85d34a30e010e961eb6cf57"
            },
            "downloads": -1,
            "filename": "releasecmd-0.10.3.tar.gz",
            "has_sig": false,
            "md5_digest": "4221811fb77a0eb9cef4f40642b9daf5",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 7879,
            "upload_time": "2024-04-07T07:32:28",
            "upload_time_iso_8601": "2024-04-07T07:32:28.103630Z",
            "url": "https://files.pythonhosted.org/packages/67/10/690db19afabc4866de01351104120a9836e46419aa6da57fa7e31cc65ec3/releasecmd-0.10.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-07 07:32:28",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "thombashi",
    "github_project": "releasecmd",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "tox": true,
    "lcname": "releasecmd"
}
        
Elapsed time: 0.22185s