Change requirements pin method
This implements the following changes: - The sources-branch-updater script will only update SHA's/tags for OpenStack roles. This is primarily for usage in stable branches where external roles must not be changed after release. - The script will no longer update the *requirements.txt files. These files are managed by the OpenStack Global Requirements management process. - The pins for pip, setuptools and wheels are now set in the global-requirement-pins.txt file in order to ensure that it takes precedence in the repo build process above all other requirements. - The order of the requirements.txt file has been changed to ensure that pip, setuptools and wheels is installed first whenever the requirements.txt file is used. - The pin comment has been removed from the requirements.txt file as it no longer applies.. Change-Id: Ib98e63153ace7f02b9bbce878aa67fbdddd784b6
This commit is contained in:
parent
ea0ce6b5b1
commit
60bad86d54
@ -1,2 +1,14 @@
|
|||||||
# This file was created to set pins that are needed but should not be
|
# This file should only be used to set python package pins that are
|
||||||
# installed as base requirements
|
# not present in OpenStack's upper-constraints. Any pins present in
|
||||||
|
# this file will override any requirements set in *requirements.txt,
|
||||||
|
# upper-constraints and any roles/vars.
|
||||||
|
#
|
||||||
|
# Use this file with caution!
|
||||||
|
#
|
||||||
|
###
|
||||||
|
### These are pinned to ensure exactly the same behaviour forever! ###
|
||||||
|
### These pins are updated through the sources-branch-updater script ###
|
||||||
|
###
|
||||||
|
pip==8.1.2
|
||||||
|
setuptools==22.0.0
|
||||||
|
wheel==0.29.0
|
||||||
|
@ -1,15 +1,11 @@
|
|||||||
# The order of packages is significant, because pip processes them in the order
|
# The order of packages is significant, because pip processes them in the order
|
||||||
# of appearance. Changing the order has an impact on the overall integration
|
# of appearance. Changing the order has an impact on the overall integration
|
||||||
# process, which may cause wedges in the gate later.
|
# process, which may cause wedges in the gate later.
|
||||||
|
pip>=6.0 # MIT
|
||||||
|
setuptools!=24.0.0,>=16.0 # PSF/ZPL
|
||||||
|
wheel # MIT
|
||||||
netaddr!=0.7.16,>=0.7.12 # BSD
|
netaddr!=0.7.16,>=0.7.12 # BSD
|
||||||
PrettyTable<0.8,>=0.7 # BSD
|
PrettyTable<0.8,>=0.7 # BSD
|
||||||
pycrypto>=2.6 # Public Domain
|
pycrypto>=2.6 # Public Domain
|
||||||
PyYAML>=3.1.0 # MIT
|
PyYAML>=3.1.0 # MIT
|
||||||
virtualenv # MIT
|
virtualenv # MIT
|
||||||
###
|
|
||||||
### These are pinned to ensure exactly the same behaviour forever! ###
|
|
||||||
### These pins are updated through the sources-branch-updater script ###
|
|
||||||
###
|
|
||||||
pip>=6.0 # MIT
|
|
||||||
setuptools!=24.0.0,>=16.0 # PSF/ZPL
|
|
||||||
wheel # MIT
|
|
||||||
|
@ -186,7 +186,7 @@ PIP_CURRENT_OPTIONS=$(./scripts/get-pypi-pkg-version.py -p pip setuptools wheel
|
|||||||
sed -i.bak "s|^PIP_INSTALL_OPTIONS=.*|PIP_INSTALL_OPTIONS=\$\{PIP_INSTALL_OPTIONS:-'${PIP_CURRENT_OPTIONS}'\}|" scripts/scripts-library.sh
|
sed -i.bak "s|^PIP_INSTALL_OPTIONS=.*|PIP_INSTALL_OPTIONS=\$\{PIP_INSTALL_OPTIONS:-'${PIP_CURRENT_OPTIONS}'\}|" scripts/scripts-library.sh
|
||||||
|
|
||||||
for pin in ${PIP_CURRENT_OPTIONS}; do
|
for pin in ${PIP_CURRENT_OPTIONS}; do
|
||||||
sed -i.bak "s|^$(echo ${pin} | cut -f1 -d=).*|${pin}|" *requirements.txt
|
sed -i.bak "s|^$(echo ${pin} | cut -f1 -d=).*|${pin}|" global-requirement-pins.txt
|
||||||
sed -i.bak "s|^ - $(echo ${pin} | cut -f1 -d=).*| - ${pin}|" playbooks/inventory/group_vars/all.yml
|
sed -i.bak "s|^ - $(echo ${pin} | cut -f1 -d=).*| - ${pin}|" playbooks/inventory/group_vars/all.yml
|
||||||
done
|
done
|
||||||
|
|
||||||
@ -197,8 +197,8 @@ echo "Updated pip install options/pins"
|
|||||||
if [[ "${OSA_BRANCH}" != "master" ]]; then
|
if [[ "${OSA_BRANCH}" != "master" ]]; then
|
||||||
echo "Updating ansible-role-requirements.yml"
|
echo "Updating ansible-role-requirements.yml"
|
||||||
|
|
||||||
# Loop through each of the role git sources
|
# Loop through each of the role git sources, only looking for openstack roles
|
||||||
for role_src in $(awk '/src: / {print $2}' ansible-role-requirements.yml); do
|
for role_src in $(awk '/src: .*\/openstack\// {print $2}' ansible-role-requirements.yml); do
|
||||||
|
|
||||||
# Determine the role's name
|
# Determine the role's name
|
||||||
role_name=$(sed 's/^[ \t-]*//' ansible-role-requirements.yml | awk '/src: / || /name: / {print $2}' | grep -B1 "${role_src}" | head -n 1)
|
role_name=$(sed 's/^[ \t-]*//' ansible-role-requirements.yml | awk '/src: / || /name: / {print $2}' | grep -B1 "${role_src}" | head -n 1)
|
||||||
|
Loading…
Reference in New Issue
Block a user