Skip to main content

A tool to help fetch sources for a project

Project description

fetchdep

pip Version Supports Various Python versions Build Status

Overview

The fetchdep utility provides an easy way for developers to fetch dependencies for software projects that work under a container path. If a project contains a fetchdep configuration at its root, a user can invoke fetchdep to automatically download sources alongside the working path of a project. This can be useful for projects which may not have package management capabilities.

The following version control systems are supported: CVS, Git, Mercurial, SVN.

Requirements

Installation

This tool can be installed using pip:

pip install fetchdep
 (or)
python -m pip install fetchdep

Usage

This tool can be invoked from a command line using:

fetchdep --help
 (or)
python -m fetchdep --help

Examples

Consider a project that is cloned in the following path:

└── ~/workdir
    └── my-awesome-project/
        └── fetchdep.yml

If a user is working inside the project directory and invokes fetchdep:

$ cd workdir/my-awesome-project
$ fetchdep

This can automatically clone dependencies alongside the project as follows:

└── ~/workdir
    ├── my-awesome-library-a/
    |   └── ...
    ├── my-awesome-library-b/
    |   └── ...
    ├── my-awesome-library-c/
    |   └── ...
    └── my-awesome-project/
        └── fetchdep.yml

Configuration

A fetchdep configuration file can be named either one of the following:

  • fetchdep.yml
  • .fetchdep.yml
  • .fetchdep

Configuration files are YAML defined configurations. Each configuration is expected to have a root fetchdep list, which holds one or more dependencies to be fetched. For example:

fetchdep:
  # cvs
  - name: my-module-a
    site: :pserver:anonymous@cvs.example.org:/cvsroot/my-module-a my-module-a
  # git
  - name: my-module-b
    site: https://example.com/myteam/my-module-b.git
  # hg
  - name: my-module-c
    site: hg+https://www.example.org/repo/my-module-c
  # svn
  - name: my-module-d
    site: svn+https://svn.code.example.com/c/myteam/my-module-d/trunk
  • Each entry must have a name, which will be used for the folder name to checkout sources to.
  • Each entry must also have a site, defining what type of source will be fetched. Accepted site prefixes include cvs+, git+, hg+ and svn+. Although, some sites may omit the prefix if this utility can determine what type of sources are being fetched.

Capabilities

Tags

This utility supports tagged dependencies. A project can define one or more tags for a project. For example:

fetchdep:
  - name: my-test-module
    site: https://example.com/myteam/my-test-module.git
    tags:
      - test

By default, if a user invokes fetchdep with no other arguments, the my-test-module module above will not be fetched. To include sources which have a tag assigned, the tag must be added to the command line:

fetchdep --tag test

Multiple tags can be added by repeating the --tag argument. Users can also use the --all-tags argument to fetch every dependency.

Recursive

The fetchdep utility will fetch only the current project's defined dependencies. If a project dependency defines their own fetchdep configuration, additional dependencies will not be fetched by default.

To support downloading a project's dependency's dependencies, the --recursive option can be used:

fetchdep --recursive

Fetching too many projects may cause fetchdep to prompt to continue. This can be overridden using the -y argument.

Dry-run

Users can always invoke with the --dry-run argument to inspect which dependencies will be fetched without invoking a fetch operation.

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

fetchdep-0.0.0.tar.gz (37.6 kB view details)

Uploaded Source

Built Distribution

fetchdep-0.0.0-py2.py3-none-any.whl (34.0 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file fetchdep-0.0.0.tar.gz.

File metadata

  • Download URL: fetchdep-0.0.0.tar.gz
  • Upload date:
  • Size: 37.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.0.0 CPython/3.12.3

File hashes

Hashes for fetchdep-0.0.0.tar.gz
Algorithm Hash digest
SHA256 464dc89a7779e24d04869b1146dd7f180e80b202bbaa3c23f548b69c376d283a
MD5 a69c4974e5b7714a519d4b91e58aa1a0
BLAKE2b-256 f570526b4a19f42523f08f7f00a36dfbc45db9f13f6b5d964ee080ce68f5a571

See more details on using hashes here.

File details

Details for the file fetchdep-0.0.0-py2.py3-none-any.whl.

File metadata

  • Download URL: fetchdep-0.0.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 34.0 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.0.0 CPython/3.12.3

File hashes

Hashes for fetchdep-0.0.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 c847e6de54799f1497ae17097b2facaa2e301363ef81df6273c4df5cc1905d48
MD5 f6179a82f3ea75af3e0e616e70ae765b
BLAKE2b-256 f9c2a1f927111c37da83e01015f02b9733a7f3351e7d1a36743a44045dd2373c

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