A tool to help fetch sources for a project
Project description
fetchdep
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 includecvs+,git+,hg+andsvn+. 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file fetchdep-1.0.0.tar.gz.
File metadata
- Download URL: fetchdep-1.0.0.tar.gz
- Upload date:
- Size: 38.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f8fd62fc0ee148bc3c828b54df23c857b9208fd9e9860f47c8929b5054da020c
|
|
| MD5 |
c6f361426c760e43e88c8e79405ca250
|
|
| BLAKE2b-256 |
04b39530176e69276922dc5d0409bd00885da1c9705a78ddeb957ffd663bd1fc
|
Provenance
The following attestation bundles were made for fetchdep-1.0.0.tar.gz:
Publisher:
publish-pypi.yml on jdknight/fetchdep
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
fetchdep-1.0.0.tar.gz -
Subject digest:
f8fd62fc0ee148bc3c828b54df23c857b9208fd9e9860f47c8929b5054da020c - Sigstore transparency entry: 169790649
- Sigstore integration time:
-
Permalink:
jdknight/fetchdep@d55c4959b9737857c68d95b11fbc3346af0ed6a9 -
Branch / Tag:
refs/tags/v1.0 - Owner: https://github.com/jdknight
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@d55c4959b9737857c68d95b11fbc3346af0ed6a9 -
Trigger Event:
push
-
Statement type:
File details
Details for the file fetchdep-1.0.0-py2.py3-none-any.whl.
File metadata
- Download URL: fetchdep-1.0.0-py2.py3-none-any.whl
- Upload date:
- Size: 34.6 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bb63fc9d76cf90e3e7464dbb85ccaa8d203912596a5b4bcffb1002ee6606d393
|
|
| MD5 |
e38012a5eaa7bbf9c5ccc4ed00f08cf5
|
|
| BLAKE2b-256 |
36c41061faf480dad90bc3ca06153af4a9e037cb100859550b3d0701e539c208
|
Provenance
The following attestation bundles were made for fetchdep-1.0.0-py2.py3-none-any.whl:
Publisher:
publish-pypi.yml on jdknight/fetchdep
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
fetchdep-1.0.0-py2.py3-none-any.whl -
Subject digest:
bb63fc9d76cf90e3e7464dbb85ccaa8d203912596a5b4bcffb1002ee6606d393 - Sigstore transparency entry: 169790650
- Sigstore integration time:
-
Permalink:
jdknight/fetchdep@d55c4959b9737857c68d95b11fbc3346af0ed6a9 -
Branch / Tag:
refs/tags/v1.0 - Owner: https://github.com/jdknight
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@d55c4959b9737857c68d95b11fbc3346af0ed6a9 -
Trigger Event:
push
-
Statement type: