Git Product home page Git Product logo

gerb's Introduction

GERB: Override dependencies in Python wheels

GERB downloads Python wheels, overrides dependency information in them, and store the overriden artifacts in a specified directory (aka "wheelhouse"). Those wheels can then be installed with:

pip install --find-links=<wheelhouse-path> ...

Specification

Specify packages to override in a TOML file named gerb.toml:

[gerb]
# Relative to the directory containing gerb.toml.
wheelhouse = "./wheelhouse"
# Specify alternative PEP 503 repository URLs to use.
# This is the default value.
repositories = ["https://pypi.org/simple"]
# Wheels generated by GERB use this as the "local version" to
# distinguish themselves from the publicly-available ones.
# Change this version when you update the override information.
# Read more about local versions in PEP 440.
override-version = "1"

[[gerb.packages]]
requirement = "pkg-a ==1.0.0"

[gerb.package.override-dependencies]
dep-a = "~=3.0"  # Override dep-a to use this.
dep-b = "@ https://example.com/dep-b.zip ; os_name != 'nt'"
# Key and value are joined as a PEP 508 requirement string,
# so you can use markers and URL specs freely.

[[gerb.packages]]
requirement = "pkg-b ~=2.1.0,!=2.1.3"
remove-dependencies = ["dep-a"]  # Remove this dependency.
# By default, all wheels will be fetched. These can be used to
# filter. Valid keys are "python", "abi", and "platform".
# Read more about tags in PEP 427.
include-tags = [{python = "cp36", abi = "cp36m"}]
exclude-tags = [{platform = "win32"}]

[[gerb.packages]]
requirement = "pkg-c ==3.0.1"
# If "override-dependencies" is an array (instead of a table),
# its content overrides the dependency list entirely.
override-dependencies = [
    "dep-x ==1.0.2",
    "dep-y ==2.0.0",
]

Invocation

This creates the wheelhouse in the default directory:

gerb

Configurations wheelhouse and repositories can be overriden:

gerb --wheelhouse=/path/to/my/global/wheelhouse
     --repository=https://example.com/simple
     --repository=https://my-domain.dev/python/simple

gerb's People

Contributors

uranusjr avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.