rlsbl.registries.pypi
PyPI registry adapter for rlsbl.
DEPRECATED: This module is retained for backward compatibility with code that imports bare functions (e.g. pypi.read_version()) or patches module-level symbols (e.g. rlsbl.registries.pypi.run). New code should use rlsbl.targets.PypiTarget instead. Scheduled for removal in the next major version.
Functions
read_version
def read_version(dir_path)
Read the version from pyproject.toml in the given directory.
write_version
def write_version(dir_path, version)
Write a new version to pyproject.toml using regex replacement.
tomllib is read-only (no stdlib TOML writer), so we use a regex to replace the version string within the [project] section only, preserving all other formatting.
get_version_file
def get_version_file()
Returns the filename that holds the version for this registry.
get_template_dir
def get_template_dir()
Returns path to the pypi-specific template directory.
get_shared_template_dir
def get_shared_template_dir()
Returns path to the shared template directory.
get_template_vars
def get_template_vars(dir_path)
Extract template variables from the target project's pyproject.toml.
get_template_mappings
def get_template_mappings()
Returns pypi-specific template mappings (template file -> target path).
get_shared_template_mappings
def get_shared_template_mappings()
Returns shared template mappings.
check_project_exists
def check_project_exists(dir_path)
Returns True if a pyproject.toml exists in the given directory.
get_project_init_hint
def get_project_init_hint()
Hint for users who haven't initialized their project yet.