Skip to main content

Ivy Dependency Parser

Project description

Parsing an Ivy module descriptor (ivy.xml) for its dependencies from a tool like CMake can be tough. This script takes a descriptor on the standard input and prints its dependencies in an easily parsable format.

Installation

$ sudo pip install ivydepparse

Usage

$ ivydepparse < ivy.xml

Example

ivy-example.xml:

...
    <dependency org="com.ttgf" name="myGreatDep" rev="1.2.3" conf="debug;release"/>
    <dependency org="com.ttgf" name="myGreatDep" rev="1.2.3" conf="other"/>
    <dependency org="com.ttgf" name="myGreatDebugDep" rev="2.3.4" conf="debug"/>
...

results in

$ ivydepparse < ivy-example.xml
org=com.ttgf|name=myGreatDebugDep|rev=2.3.4|conf=debug;org=com.ttgf|name=myGreatDep|rev=1.2.3|conf=debug,release,other

Details

The output is a one-liner, a semicolon-separated list of dependencies. Each dependency is a pipe-separated list of attributes as name=value.

If any value contains one of our separators, they get escaped as follows:

  • ; is replaced by ,

  • | is replaced by :

  • = is replaced by :

For each dependency, all attributes are guaranteed to be present and in that order: org, name, rev, conf.

Attributes can be empty. An empty attribute appears as name=.

Dependencies having the same key (org/name/rev) will be output as one single dependency.

The order inside conf in the output is not specified.

The order of the dependencies in the output is not specified.

Changelog

1.0.1 (2015-09-30):

  • Dependencies with same key are now aggregated.

1.0.0 (2015-09-30):

  • Initial version.

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

ivydepparse-1.0.1.tar.gz (4.1 kB view details)

Uploaded Source

File details

Details for the file ivydepparse-1.0.1.tar.gz.

File metadata

  • Download URL: ivydepparse-1.0.1.tar.gz
  • Upload date:
  • Size: 4.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for ivydepparse-1.0.1.tar.gz
Algorithm Hash digest
SHA256 7fcb246828d8a0e17cadf1aa69cbbd94ba0ba7c0cf683db91b4f557f64ab8e79
MD5 6d9ff043c4b8137a49413914ebfe8252
BLAKE2b-256 03d537a446ef7c59055771087d83eaa88975244c6c435ddf04846f1b313e924b

See more details on using hashes here.

Supported by

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