Package: icrs.releaser
icrs.releaserThis package provides support for releasing projects usingzest.releaser, especially in
combination withsetuptools_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 withthe special directivesversionadded,versionchanged, anddeprecated. 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 likeCalVer, that will depend on when the release is made, and in a
scheme likeSemVer, 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.pyfiles that are found in thesrc/<PROJECT>/directory are examined for those three directives with an argument
ofNEXT, and theNEXTvalue 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-mathor-march=nativethat 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.Makessetuptools_scmrespect the version number the user entered.zest.releaseraskssetuptoolswhat 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 insetup.py).But becausesetuptools_scmoverrides the value stored insetup.pybased 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 like0.0.2,zest.releaserwants to
create a tag like0.0.1.dev11+gbeb8b20.This package forcessetuptools_scmto respect the version that
the user entered so that the tag is correct.Installation And UsageThis package registers certain entry points withzest.releaserwhen it is installed, so it is only necessary topip install icrs.releaserand then invokeicrs_releaseto use the plugins
mentioned above.This package provides therecommendedextra to install the same
things thatzest.releaser[recommended]does.$pipinstall'icrs.releaser[recommended]'ImportantThis package assumes that your project uses the standardsrc/layout. That is, for a package namedfoo, there will be a
directory next tosetup.py,src/foo/, containing the Python
source. Likewise, for a namespace packagefoo.bar, the code
will be insrc/foo/bar/.ImportantBecause this package is a plugin tozest.releaser, the two
packages must be installed in the same environment (same Python
path). The easiest way to ensure this is to just install this
package, and then use the command from the next point.ImportantFor this package to work, you must use theicrs_releasecommand.This is a simple wrapper for thefullreleasecommand provided
byzest.releaser. It’s use is necessitated by the fact that
this package works in part by setting and unsetting environment
variables.Changes1.2.0 (2024-01-30)Add support for Python 3.11 and 3.12.Drop support for Python 3.8. The minimum supported version is now 3.9.Depend on newerzest.releaser >= 9.1.1.Remove dependency on setuptools; now uses the so-called
“native” namespace packages.Add a new release check that forbids having development dependencies
(e.g., “icrs.releaser >= 3.0.dev0” would be forbidden). This only
works forsetuptoolsprojects that have dependencies listed in setup.py.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 thatzest.releaser[recommended]does.1.0.0 (2022-02-25)Initial PyPI release.