Skip to main content

zest.releaser/setuptools_scm plugin.

Project description

icrs.releaser

https://github.com/jamadden/icrs.releaser/workflows/tests/badge.svg https://coveralls.io/repos/github/jamadden/icrs.releaser/badge.svg?branch=master Documentation Status

This package provides support for releasing projects using zest.releaser, especially in combination with setuptools_scm.

This package does three things:

  • Insert the correct version number in source files.

    It’s helpful for readers of the source code and the documentation when object docstrings contain abbreviated change logs. Sphinx supports this with the special directives versionadded, versionchanged, and deprecated. For example, a docstring might contain:

    .. versionchanged:: 2.0.1
       Now frob the frizzle correctly when *frob_frizzle* is true.

    But the author of the docstring doesn’t always know what the version number that contains the change will ultimately be. In a scheme like CalVer, that will depend on when the release is made, and in a scheme like SemVer, that will depend on what other changes are part of the release. In either case, it can’t be determined until the release is actually made.

    To solve this, this package has a plugin that lets you write your docstrings like so:

    .. deprecated:: NEXT
       Turns out frobbing the frizzle was a bad idea.

    When a release is made, all .py files that are found in the src/<PROJECT>/ directory are examined for those three directives with an argument of NEXT, and the NEXT value is replaced with the version number the user selected.

    The user will be presented a diff of the changes made and asked whether to commit them before continuing.

  • Removes C compiler flags from the environment.

    You may have custom C compiler flags in your environment (CFLAGS, etc). These may contain non-portable options such as -ffast-math or -march=native that would prevent binary wheels built on your machine from working on other machines.

    This package removes those flags from the environment that builds binary wheels.

  • Makes setuptools_scm respect the version number the user entered.

    zest.releaser asks setuptools what version to use when it tags the repository. It expects to get back the version that the user entered, and which it wrote to disk (typically in setup.py).

    But because setuptools_scm overrides the value stored in setup.py based on the last tag in the repository, this doesn’t work: it would only work if the tag was already made! Instead of getting the correct tag like 0.0.2, zest.releaser wants to create a tag like 0.0.1.dev11+gbeb8b20.

    This package forces setuptools_scm to respect the version that the user entered so that the tag is correct.

Installation And Usage

This package registers certain entry points with zest.releaser when it is installed, so it is only necessary to pip install icrs.releaser and then invoke icrs_release to use the plugins mentioned above.

This package provides the recommended extra to install the same things that zest.releaser[recommended] does.

$ pip install 'icrs.releaser[recommended]'

Changes

1.1.0 (2022-03-03)

  • Fix handling the case where the project name is a namespace (icrs.releaser), but the source directory on disk doesn’t include the namespace (src/releaser). This is a legacy case, supported for projects that are transitioning to a standard layout.

1.0.1 (2022-02-25)

  • Add the ‘recommended’ extra for installing the same things that zest.releaser[recommended] does.

1.0.0 (2022-02-25)

  • Initial PyPI release.

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

icrs.releaser-1.1.0.tar.gz (22.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

icrs.releaser-1.1.0-py2.py3-none-any.whl (16.5 kB view details)

Uploaded Python 2Python 3

File details

Details for the file icrs.releaser-1.1.0.tar.gz.

File metadata

  • Download URL: icrs.releaser-1.1.0.tar.gz
  • Upload date:
  • Size: 22.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.10.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.3 CPython/3.10.2

File hashes

Hashes for icrs.releaser-1.1.0.tar.gz
Algorithm Hash digest
SHA256 12411d7d1790f80913fb46e10dfc0bcad6e5b2eebd0e8d8dd5b2df94bab45ecb
MD5 8a043200786a15d5e8a266be77969449
BLAKE2b-256 c1c6987201f0c48d85e2c3970500913cca1f48f39f7d6304fbe217ad7e60b49c

See more details on using hashes here.

File details

Details for the file icrs.releaser-1.1.0-py2.py3-none-any.whl.

File metadata

  • Download URL: icrs.releaser-1.1.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 16.5 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.10.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.3 CPython/3.10.2

File hashes

Hashes for icrs.releaser-1.1.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 20387248ae051d67b59cfa7b1f0d8024337f0987b94063e4965df2a5dd34a246
MD5 1ad0d84f1650325d884bedc7568e8c8b
BLAKE2b-256 b14f8dcde0345a1f33fc8803c4907d38fcc46a1da9b749f7c7034dc918294f2b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page