Okonomiyaki

3.0.0 · active · verified Fri Apr 17

Okonomiyaki is a self-contained Python library designed to handle metadata specifically for Enthought-specific egg and runtime archives. It provides tools for creating, reading, and manipulating package information, platforms, and versions. The current version is 3.0.0, with major versions introducing significant breaking changes and an irregular release cadence.

Common errors

Warnings

Install

Imports

Quickstart

This quickstart demonstrates how to create a `PackageInfo` object, which is central to defining metadata for packages. It shows how to specify the package's name, version, build, platform details, and Python compatibility. It also highlights accessing the renamed 'platform' attribute in version 3.0.0.

from okonomiyaki.package_info import PackageInfo, PackageInfoVersion
from okonomiyaki.platforms import EPDPlatform
from okonomiyaki.versions import PythonVersion, PEP440Version

# Create a PackageInfo object
package_info = PackageInfo(
    name="scipy",
    version=PEP440Version("1.7.3"),
    build=2,
    os_name="win",
    arch="x86_64",
    python_version=PythonVersion(3, 9, 7),
    platform_version="", # For Windows, platform_version is often empty
    package_info_version=PackageInfoVersion.from_string("2.1") # Default for v3.0.0
)

print(f"Package Name: {package_info.name}")
print(f"Package Version: {package_info.version}")
print(f"Platform: {package_info.platform.full_string}")
print(f"Python Version: {package_info.python_version.api_string}")

# Note: In Okonomiyaki 3.0.0, 'platforms' attribute was renamed to 'platform'
# And 'supported_platforms' was renamed to 'supported_platform'
# If this was an older version (pre-3.0.0), you might use package_info.platforms

view raw JSON →