Merge "Stop installing bindep via git"
This commit is contained in:
commit
da23ac465d
|
@ -0,0 +1,48 @@
|
|||
50c50,52
|
||||
< selector = ws '[' profile:p1 (ws profile)*:p2 ']' -> [p1] + p2
|
||||
---
|
||||
> profiles = '(' (ws? profile)*:p ws? ')' -> p
|
||||
> group = profiles | profile
|
||||
> selector = ws '[' (ws? group)*:p ws? ']' -> p
|
||||
141c143,147
|
||||
< for sense, profile in rule[1]:
|
||||
---
|
||||
> for group in rule[1]:
|
||||
> if isinstance(group, list):
|
||||
> user.append(group)
|
||||
> continue
|
||||
> sense, profile = group
|
||||
161a168,169
|
||||
> group_found = False
|
||||
> group_match_found = False
|
||||
163c171,177
|
||||
< for sense, profile in partition_rule:
|
||||
---
|
||||
> for group in partition_rule:
|
||||
> if isinstance(group, list):
|
||||
> group_found = True
|
||||
> if self._match_all(group, profiles):
|
||||
> group_match_found = True
|
||||
> continue
|
||||
> sense, profile = group
|
||||
172c186,189
|
||||
< if not negative and (match_found or not positive):
|
||||
---
|
||||
> if not negative:
|
||||
> if group_match_found or match_found:
|
||||
> return True
|
||||
> if not group_found and not positive:
|
||||
174a192,204
|
||||
>
|
||||
> def _match_all(self, partition_rules, profiles):
|
||||
> """Evaluate rules. Do they all match the profiles?
|
||||
>
|
||||
> :return Result True if all profiles match else False
|
||||
> """
|
||||
> def matches(sense, profile, profiles):
|
||||
> return sense if profile in profiles else not sense
|
||||
>
|
||||
> for sense, profile in partition_rules:
|
||||
> if not matches(sense, profile, profiles):
|
||||
> return False
|
||||
> return True
|
|
@ -6,11 +6,14 @@ case ${distro} in
|
|||
debian|ubuntu)
|
||||
apt-get purge -y --auto-remove \
|
||||
git \
|
||||
patch \
|
||||
python3-virtualenv \
|
||||
virtualenv
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
;;
|
||||
centos)
|
||||
# NOTE(SamYaple): We should be removing 'patch' here, but that breaks
|
||||
# centos as it tries to rip out systemd for some reason
|
||||
yum -y autoremove \
|
||||
git \
|
||||
python-virtualenv \
|
||||
|
|
|
@ -22,6 +22,7 @@ case ${distro} in
|
|||
ca-certificates \
|
||||
netbase \
|
||||
lsb-release \
|
||||
patch \
|
||||
sudo \
|
||||
${dpkg_python_packages[@]}
|
||||
;;
|
||||
|
@ -29,6 +30,7 @@ case ${distro} in
|
|||
yum upgrade -y
|
||||
yum install -y --setopt=skip_missing_names_on_install=False \
|
||||
git \
|
||||
patch \
|
||||
redhat-lsb-core \
|
||||
sudo \
|
||||
${rpm_python_packages[@]}
|
||||
|
@ -49,13 +51,16 @@ if [[ "${PLUGIN}" == "no" ]]; then
|
|||
$(dirname $0)/create_user.sh
|
||||
$(dirname $0)/setup_pip.sh
|
||||
$(dirname $0)/pip_install.sh \
|
||||
bindep==2.5.1.dev1 \
|
||||
bindep==2.5.0 \
|
||||
cryptography \
|
||||
pymysql \
|
||||
python-memcached \
|
||||
uwsgi
|
||||
fi
|
||||
|
||||
# NOTE(SamYaple): Remove when bindep>2.5.0 is released
|
||||
patch /var/lib/openstack/lib/python*/site-packages/bindep/depends.py < /opt/loci/scripts/bindep.depends.patch
|
||||
|
||||
$(dirname $0)/clone_project.sh
|
||||
$(dirname $0)/pip_install.sh /tmp/${PROJECT} ${PIP_PACKAGES}
|
||||
$(dirname $0)/install_packages.sh
|
||||
|
|
|
@ -2,8 +2,27 @@
|
|||
|
||||
set -eux
|
||||
|
||||
case ${distro} in
|
||||
debian|ubuntu)
|
||||
apt-get update
|
||||
apt-get upgrade -y
|
||||
apt-get install -y --no-install-recommends patch
|
||||
;;
|
||||
centos)
|
||||
yum upgrade -y
|
||||
yum install -y --setopt=skip_missing_names_on_install=False patch
|
||||
;;
|
||||
*)
|
||||
echo "Unknown distro: ${distro}"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
$(dirname $0)/setup_pip.sh
|
||||
pip install git+https://github.com/openstack-infra/bindep
|
||||
pip install bindep==2.5.0
|
||||
# NOTE(SamYaple): Remove when bindep>2.5.0 is released
|
||||
patch /var/lib/openstack/lib/python*/site-packages/bindep/depends.py < /opt/loci/scripts/bindep.depends.patch
|
||||
|
||||
$(dirname $0)/install_packages.sh
|
||||
$(dirname $0)/clone_project.sh
|
||||
mv /tmp/requirements/{global-requirements.txt,upper-constraints.txt} /
|
||||
|
@ -33,7 +52,7 @@ ls -1 | xargs -n1 -P20 -t pip wheel --no-deps --wheel-dir / -c /upper-constraint
|
|||
popd
|
||||
# NOTE(SamYaple): Handle packages not in upper-constriants and not in PyPI as
|
||||
# native whls
|
||||
additional_packages=(git+https://github.com/openstack-infra/bindep@24427065c5f30047ac80370be0a390e7f417ce34 uwsgi)
|
||||
additional_packages=(uwsgi)
|
||||
echo "${additional_packages[@]}" | xargs -n1 -P20 pip wheel --wheel-dir / -c /upper-constraints.txt | tee -a /tmp/wheels.txt
|
||||
|
||||
# NOTE(SamYaple) Remove native-binary wheels, we only want to keep wheels that
|
||||
|
|
Loading…
Reference in New Issue