Skip to main content

('Self-contained library to deal with metadata in Enthought-specific eggs',)

Project description

https://travis-ci.org/enthought/okonomiyaki.png?branch=master

Okonomiyaki is an experimental library aimed at consolidating a lot of our low-level code used for Enthought’s eggs.

The library contains code for the following:

  • producing EDM and enpkg-compatible egg from a tree + metadata

  • object models for eggs metadata, as well as versions and platform representations

It works on both python 2 and 3, and pypy. It is expected to work on pretty much any compliant python implementation.

Examples

Version parsing

To parse versions:

from okonomiyaki.versions import EnpkgVersion
# Every Version class has a from_string constructor
v1 = EnpkgVersion.from_string("1.3.3-1")
v2 = EnpkgVersion.from_string("1.3.2-3")

assert v1 > v2

Version instances are designed to be immutable, and to be used as keys in dictionaries.

Platform parsing

To parse epd platform strings (rh5-64, rh6_x86_64, etc.) consistently:

from okonomiyaki.platforms import EPDPlatform
# Internal representation is normalized.
rh5_new_name = EPDPlatform.from_string("rh5-x86_64")
rh5_old_name = EPDPlatform.from_string("rh5-64")

assert rh5_old_name == rh5_new_name

As for Version instances, EPDPlatform instances are designed to be immutable and to be used as keys in dictionaries.

Egg metadata

To parse Enthought eggs:

from okonomiyaki.file_formats import EggMetadata

# Only works for Enthought eggs
metadata = EggMetadata.from_egg("numpy-1.10.1-1.egg")
print(metadata.metadata_version)
print(metadata.name)
print(metadata.version)

This will take care of a lot of low-level, legacy details you don’t want to know about.

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

okonomiyaki-0.17.1.tar.gz (449.8 kB view details)

Uploaded Source

Built Distribution

okonomiyaki-0.17.1-py2.py3-none-any.whl (497.8 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file okonomiyaki-0.17.1.tar.gz.

File metadata

File hashes

Hashes for okonomiyaki-0.17.1.tar.gz
Algorithm Hash digest
SHA256 9a2078a6be7335aa97ba61fc408296825c6d39217503bbb0cb54ca68e6c89960
MD5 7ed36ca4f0ba3ea306a4aad6ff33dacd
BLAKE2b-256 e93fccdbe5269367a25539c5dd66380e0a672c14704339f24bbf83f84e246d7d

See more details on using hashes here.

File details

Details for the file okonomiyaki-0.17.1-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for okonomiyaki-0.17.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 5e490e5c3e5cf8bb316578f3b79ac868a89e261312a2e88c874311bcd8c7ef23
MD5 9f5424b75ff7b8e8a574a1f162b16e0d
BLAKE2b-256 348abfa5018472e37788eb9454a8685d70f5022e049ffcae0d0149ffc2aab4fa

See more details on using hashes here.

Supported by

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