-
Notifications
You must be signed in to change notification settings - Fork 0
Getting started
James Knight edited this page May 15, 2024
·
1 revision
- It is recommended to install using
pipx
. If not already installed, follow the installation instructions for pipx. Although, users are free to installfetchdep
from PyPA as they would other packages. - Install this utility using the following command:
pipx install fetchdep
- Verify the package is installed by running the command:
If the above command is not available for the running context, the following command can be used:
fetchdep --version
python -m fetchdep --version
If looking to support fetchdep fetching dependencies for a project, perform the following steps:
- At the root of a repository, create an empty file named
fetchdep.yml
. - Using a text editor, add the following to the file:
fetchdep: - name: myname1 site: mysite1
- Replace the value (
myname1
) for aname
entry with the expected directory name for the dependency. For example, if the expected dependency is to be checked out into a foldermy-awesome-lib
, the following should be set:fetchdep: - name: my-awesome-lib site: mysite1
- Next, replace the value (
mysite1
) for asite
entry with the expected clone/checkout site for the dependency. For example, if looking to clone a Git repository[email protected]:my-awesome-name/my-awesome-lib.git
, the following should be set (see other VCS type examples):fetchdep: - name: my-awesome-lib site: [email protected]:my-awesome-name/my-awesome-lib.git
- Save the file.
- Run
fetchdep
(orpython -m fetchdep
) to fetch the dependency for the project.
After verifying the configured dependency can fetch as expected, additional dependencies (if any) can be added to the configuration file. For example, the following shows two dependency entries:
fetchdep:
- name: my-awesome-lib
site: [email protected]:my-awesome-name/my-awesome-lib.git
- name: another-lib
site: svn+https://svn.code.example.com/c/myteam/another-lib/trunk
A user can invoke fetchdep
multiple times. Only missing dependencies will be fetched.