Skip to content

Commit

Permalink
Don't hard-code yelpcorp PyPI registry
Browse files Browse the repository at this point in the history
This is controlled via the /etc/pip.conf file which is managed by Puppet
on yelpcorp hosts.
  • Loading branch information
chriskuehl committed Jul 27, 2023
1 parent b17c5c2 commit 8490152
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 9 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ endif

NOOP = true
ifeq ($(PAASTA_ENV),YELP)
export PIP_INDEX_URL ?= https://pypi.yelpcorp.com/simple
export PIP_INDEX_URL ?= $(shell pip3 config get --global global.index-url)
export NPM_CONFIG_REGISTRY ?= https://npm.yelpcorp.com/
ADD_MISSING_DEPS_MAYBE:=-diff --unchanged-line-format= --old-line-format= --new-line-format='%L' ./requirements.txt ./yelp_package/extra_requirements_yelp.txt >> ./requirements.txt
else
Expand Down Expand Up @@ -87,7 +87,7 @@ example_cluster:
tox -e example-cluster

yelpy:
.tox/py36/bin/pip-custom-platform install -i https://pypi.yelpcorp.com/simple -r yelp_package/extra_requirements_yelp.txt
.tox/py36/bin/pip install -r yelp_package/extra_requirements_yelp.txt

LAST_COMMIT_MSG = $(shell git log -1 --pretty=%B | sed -e 's/[\x27\x22]/\\\x27/g')
release:
Expand Down
5 changes: 2 additions & 3 deletions debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,11 @@ override_dh_auto_test:
override_dh_virtualenv:
echo $(PIP_INDEX_URL)
dh_virtualenv --index-url $(PIP_INDEX_URL) \
--extra-pip-arg --trusted-host=169.254.255.254 \
--python=/usr/bin/python3.6 \
--preinstall cython==0.29.36 \
--preinstall pip-custom-platform \
--preinstall pip==9.0.1 \
--preinstall setuptools==46.1.3 \
--pip-tool pip-custom-platform \
--preinstall setuptools==46.1.3

override_dh_installinit:
dh_installinit --noscripts
5 changes: 2 additions & 3 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
[tox]
envlist = py36
tox_pip_extensions_ext_pip_custom_platform = true
tox_pip_extensions_ext_venv_update = true

[testenv]
Expand All @@ -9,7 +8,7 @@ deps =
--requirement={toxinidir}/requirements.txt
--requirement={toxinidir}/requirements-dev.txt
usedevelop = true
passenv = USER PIP_INDEX_URL
passenv = USER
setenv =
YARN_REGISTRY = {env:NPM_CONFIG_REGISTRY:https://registry.npmjs.org/}
whitelist_externals=
Expand All @@ -27,7 +26,7 @@ commands =
check-requirements
# optionally install yelpy requirements - this is after check-requirements since
# check-requirements doesn't understand these extra requirements
-pip install --index-url https://pypi.yelpcorp.com/simple -r yelp_package/extra_requirements_yelp.txt
-pip install -r yelp_package/extra_requirements_yelp.txt
# we then run tests at the very end so that we can run tests with yelpy requirements
py.test -s {posargs:tests}

Expand Down
2 changes: 1 addition & 1 deletion yelp_package/bionic/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,5 @@ RUN echo "deb http://dl.yarnpkg.com/debian/ stable main" > /etc/apt/sources.list
RUN echo "deb http://deb.nodesource.com/node_10.x bionic main" > /etc/apt/sources.list.d/nodesource.list
RUN apt-get -q update && apt-get -q install -y --no-install-recommends yarn nodejs

RUN pip3 install --index-url ${PIP_INDEX_URL} virtualenv==16.7.5
RUN pip3 install --trusted-host 169.254.255.254 --index-url ${PIP_INDEX_URL} virtualenv==16.7.5
WORKDIR /work

0 comments on commit 8490152

Please sign in to comment.