Skip to main content

Dependency management between git repositories made easy

Project description

gitdep

Dependency management between git repositories made easy

About

Git-Dependencies is a tool that allows developers to establish and resolve dependencies between git projects just like it is done by a package manager.

Principles

Whether it's a scripted language or a compiled language, sometimes a build is required outside the traditional package management system (like doing an integration test between release candidates or working on bleeding edge branches), so a dependency relation must be expressed in terms of source code rather than deployed packages.

Although git-submodules works well for cloning dependencies into projects, the subdirectory approach makes it unsuitable for libraries, where dependencies are not subdirectories.

Most build systems try to solve this, but we think they shouldn't, mostly because it ties management responsibilities to software where the build is the actual star of the show. Furthermore, it will require every dependant project to use their choice of build system.

We believe that a dependency manager for source code should be simple and able to get you the dependencies that you asked, where you asked, with versioning restrictions resolved (or inform you of any conflicts) and let you decide how to handle it.

Versioning with GIT

The relation between versions (hashes and tags) is extracted from the git's internal tree, so a hash A is older than B if it A is an ancestor of B. Because of that, gitdep can also detect version conflicts when projects depend on hashes from incompatible branches.

Quickstart

  • Install gitdep through pip install --user gitdep;
  • Create a gd.txt file in the root directory of your project;
  • Express dependencies in the format: REPO_URL RELATION HASH_OR_TAG, where RELATION can be either ==, <= or >=;
  • Clone and resolve the dependencies to your clone_dir directory of choice by calling gitdep clone_dir.

The last command will clone and scan repositories recursively until the dependencies for all repositories are met.

To be easily integrated with existing tools and scripts, gitdep clone_dir will print the resulting list of cloned repositories to stdout along with their versions:

for i in $(./gd.py include/ 2>/dev/null | cut -d' ' -f2); do
    echo "Cloned repository $i"
done

Multi-resolve

For testing, one may require additional dependencies, so gitdep also supports a list of dependency files in the same format as gd.txt, just call gitdep clone_dir project_dep_file test_dep_file and it will resolve the dependencies together.

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

gitdep-0.0.2.tar.gz (5.3 kB view details)

Uploaded Source

Built Distribution

gitdep-0.0.2-py3-none-any.whl (17.7 kB view details)

Uploaded Python 3

File details

Details for the file gitdep-0.0.2.tar.gz.

File metadata

  • Download URL: gitdep-0.0.2.tar.gz
  • Upload date:
  • Size: 5.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.4.2 requests/2.22.0 setuptools/50.3.0 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.8.2

File hashes

Hashes for gitdep-0.0.2.tar.gz
Algorithm Hash digest
SHA256 80bae137753ebde3b59f224a1f6495257fcc1617ac6c8c4da1a796186d5f2fae
MD5 8f44cc834af76c4395355ba479bf090d
BLAKE2b-256 4ec3ce1b97a6a2bfba4de68415dbabefba1a78a9eb65b7aa9ede555a32e67556

See more details on using hashes here.

File details

Details for the file gitdep-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: gitdep-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 17.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.4.2 requests/2.22.0 setuptools/50.3.0 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.8.2

File hashes

Hashes for gitdep-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 f1335033b66ebe0c56d7ac3ccea152ba9939c8e12fb2823e4211986ab6cf091b
MD5 2f8439c06f83509a8986829ccbe06818
BLAKE2b-256 4495a3fd4360ce7ebb99fde54271f48b005de1d481847c8bb4cc3f9e42e54a28

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