Skip to content

Commit

Permalink
use flags to resolve the unsafe and cache problems
Browse files Browse the repository at this point in the history
  • Loading branch information
AlanCoding committed Apr 23, 2019
1 parent d4671b7 commit 9c71647
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 11 deletions.
12 changes: 3 additions & 9 deletions requirements/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
The requirements.txt and requirements_ansible.txt files are generated from requirements.in and requirements_ansible.in, respectively, using `pip-tools` `pip-compile`. The following commands should do this if ran inside the tools_awx container.

At the end of both `.in` files, pip and setuptools need to have their versions pinned.
After producing the `.txt` files, the versions need to be manually added back at the end.

Run these commands from the root of the awx repo. This will produce python 3 requirements files.

```
Expand All @@ -11,8 +8,8 @@ source /buildit/bin/activate
pip install pip-tools
pip install pip --upgrade
pip-compile -U --output-file requirements/requirements.txt requirements/requirements.in
pip-compile -U --output-file requirements/requirements_ansible_py3.txt requirements/requirements_ansible.in
pip-compile -U -r --allow-unsafe --output-file requirements/requirements.txt requirements/requirements.in
pip-compile -U -r --allow-unsafe --output-file requirements/requirements_ansible_py3.txt requirements/requirements_ansible.in
```

The Ansible venv requirements file needs to start with the python 2 version
Expand All @@ -25,17 +22,14 @@ source /buildit_py2/bin/activate
pip install pip-tools
pip install pip --upgrade
pip-compile -U --output-file requirements/requirements_ansible.txt requirements/requirements_ansible.in
pip-compile -U -r --allow-unsafe --output-file requirements/requirements_ansible.txt requirements/requirements_ansible.in
diff requirements/requirements_ansible_py3.txt requirements/requirements_ansible.txt
rm requirements/requirements_ansible_py3.txt
```

Python 3 exceptions should be added to relevant `requirements_ansible.txt` lines
after version numbers with the syntax of `; python_version < '3'`.

If running the `pip-compile` command multiple times, and you see warnings that
cache entry deserialization has failed, then `rm -rf ~/.cache/pip` and re-run the command.

## Licenses and Source Files

If any library has a change to its license with the upgrade, then the license for that library
Expand Down
2 changes: 1 addition & 1 deletion requirements/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# This file is autogenerated by pip-compile
# To update, run:
#
# pip-compile -U --output-file requirements/requirements.txt requirements/requirements.in
# pip-compile -U -r --allow-unsafe --output-file requirements/requirements.txt requirements/requirements.in
#
adal==1.2.1 # via msrestazure
amqp==2.4.2 # via kombu
Expand Down
2 changes: 1 addition & 1 deletion requirements/requirements_ansible.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# This file is autogenerated by pip-compile
# To update, run:
#
# pip-compile -U --output-file requirements/requirements_ansible.txt requirements/requirements_ansible.in
# pip-compile -U -r --allow-unsafe --output-file requirements/requirements_ansible.txt requirements/requirements_ansible.in
#
adal==1.2.1 # via msrestazure
appdirs==1.4.3 # via openstacksdk
Expand Down

0 comments on commit 9c71647

Please sign in to comment.