Packaging Module Docs¶
Creates the authors file, if not in a package.
Returns: None Raises: RuntimeError
– If the authors could not be retrieved
-
autosemver.packaging.
create_changelog
(project_dir='.', bugtracker_url='', rpm_format=False)¶ Creates the changelog file, if not in a package.
Parameters: Rises RuntimeError: If the changelog could not be retrieved
-
autosemver.packaging.
create_releasenotes
(project_dir='.', bugtracker_url='')¶ Creates the release notes file, if not in a package.
Parameters: Returns: None
Raises: RuntimeError
– If the release notes could not be retrieved
Retrieves the authors list, from the AUTHORS file (if in a package) or generates it from the git history.
Returns: List of authors Return type: list(str) Raises: RuntimeError
– If the authors could not be retrieved
-
autosemver.packaging.
get_changelog
(project_dir='.', bugtracker_url='', rpm_format=False)¶ Retrieves the changelog, from the CHANGELOG file (if in a package) or generates it from the git history. Optionally in rpm-compatible format.
Parameters: Returns: changelog
Return type: Rises RuntimeError: If the changelog could not be retrieved
-
autosemver.packaging.
get_current_version
(project_name=None, project_dir='.', repo_dir=None)¶ Retrieves the version of the package, checking in this order of priority:
- From an environment variable named ${project_name}_VERSION (all in caps) if project_name was specified.
- From the PKG-INFO file if inside a packaged distro.
- From the git history.
Parameters: project_name (str) – Name of the project to get the version for, if none passed, will not use any environment variable override. Returns: Version for the package. Return type: str Raises: RuntimeError
– If the version could not be retrieved.
-
autosemver.packaging.
get_releasenotes
(project_dir='.', bugtracker_url='')¶ Retrieves the release notes, from the RELEASE_NOTES file (if in a package) or generates it from the git history.
Parameters: Returns: release notes
Return type: Raises: RuntimeError
– If the release notes could not be retrieved