Skip to content
This repository has been archived by the owner on Feb 13, 2021. It is now read-only.

Requirements in setup wrapper script #12

Open
valentinocossar opened this issue Jan 17, 2018 · 3 comments
Open

Requirements in setup wrapper script #12

valentinocossar opened this issue Jan 17, 2018 · 3 comments

Comments

@valentinocossar
Copy link

valentinocossar commented Jan 17, 2018

Hi, could I use requirements also in the setup wrapper script and not only in the setup command?

And if I install passlib with pip install passlib (and not as requirement), will be used with every version of Ansible that I've installed via AVM?

Thank you.

@ahelal
Copy link
Owner

ahelal commented Jan 17, 2018

Hi,

Yes the requirements will run with every install of Ansible.

Behind the scenes python virtualenv is being used so all virtualenv rules apply. So my best guess passlib will not work if you install outside the virtualenv. Although there is work around related to path, but could be ugly.

Hope that helps

@valentinocossar
Copy link
Author

Thank you for the answer.

How can I use requirements with setup wrapper script? I can't find any parameter to add to the file to declare the requirements for each virtualenv.

If I want to install a new pip package in a specific virtualenv, could I do it manually, running pip install passlib for every virtualenv?

I'm sorry for all these questions, but I have to break my environment to test this tool, so I would like to have some answers before starting the installation.

@ahelal
Copy link
Owner

ahelal commented Jan 18, 2018

Np :)

you can use PYTHON_REQUIREMENTS_INDEX

export ANSIBLE_VERSIONS_0="2.3.1.0"
export INSTALL_TYPE_0="pip"
export ANSIBLE_LABEL_0="v2.3"
export PYTHON_REQUIREMENTS_0="/path/requirements.txt"

# Use a special requirement file with passlib 
export ANSIBLE_VERSIONS_1="2.3.1.0"
export INSTALL_TYPE_1="pip"
export ANSIBLE_LABEL_1="v2.3-special"
export PYTHON_REQUIREMENTS_1="/path/requirements_special.txt"

Hope that helps

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants