Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow installation from source-requirements.yml #83

Merged
merged 1 commit into from
Jan 23, 2024

Conversation

KB-perByte
Copy link
Contributor

@KB-perByte KB-perByte commented Dec 12, 2023

Enable source installation capabilities, it depends on the .config/source-requirements.yml file to pick up dependencies to source install them.

Command example -

ade install ".[test]" --venv venv --cpi

Attribute added -
cpi/ collection-pre-install

Example source-requirements.yml

---
collections:
  - git+https://github.com/ansible-collections/ansible.utils.git
  - git+https://github.com/ansible-collections/ansible.netcommon.git

Log -

ansible_development_environment install .\[test\] --venv venv --cpi
    Note: Source installed collections include: ansible.netcommon and ansible.utils
    Note: Installed collections include: ansible.netcommon, ansible.utils, and cisco.ios
    Note: All python requirements are installed.
    Note: All required system packages are installed.
    Note: A virtual environment was specified but has not been activated.
    Note: Please activate the virtual environment:
          source venv/bin/activate

Force installing collections from source, automatically make ansible-galaxy skip installing dependencies.

Fixes: #79

@KB-perByte KB-perByte changed the title [ade] add source install capabilities [wip][ade] add source install capabilities Dec 12, 2023
@KB-perByte KB-perByte added the enhancement New feature or request label Dec 12, 2023
.vscode/launch.json Outdated Show resolved Hide resolved
src/ansible_development_environment/arg_parser.py Outdated Show resolved Hide resolved
src/ansible_development_environment/cli.py Outdated Show resolved Hide resolved
@cidrblock
Copy link
Collaborator

@ssbarnea I'm fine with this one, I understand why it is needed.

ansible-galaxy is being used to install the collections in the new file, it just they need to be installed prior to the collection being developed being installed.

@ssbarnea ssbarnea changed the title [ade] add source install capabilities Allow installation from source-requirements.yml Jan 23, 2024
@ssbarnea ssbarnea enabled auto-merge (squash) January 23, 2024 13:35
@ssbarnea ssbarnea merged commit cf56667 into ansible:main Jan 23, 2024
15 of 17 checks passed
@KB-perByte KB-perByte deleted the add_git_source branch January 23, 2024 13:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add ability to pre-install collections from source prior to collection build
3 participants