8000 Switch to Python 3 by aneeshusa · Pull Request #100 · lyft/metadataproxy · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Switch to Python 3 #100

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 6, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
language: python
python:
- "2.7"
- "3.6"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not familiar with this repo but it may be good to run tests against more recent versions of Python too? (though it gets tricky with the docker_push.sh script and stuff like that, so probably something to address in another PR).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Picked this since it matches what we use internally - agreed that another PR can look into extending the test matrix.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there's no tests 😓

env:
- REPO=lyft/metadataproxy
sudo: required
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:2.7.11
FROM python:3.6

RUN mkdir /srv/metadataproxy
COPY requirements.txt requirements_wsgi.txt /srv/metadataproxy/
Expand Down
20 changes: 14 additions & 6 deletions Dockerfile.private
Original file line number Diff line number Diff line change
@@ -1,15 +1,23 @@
FROM lyft/imagebase:d73781c2355e7b4dd3f04e9bf95a15c40761b359
FROM lyft/imagebase:c6f8b1b73eb5ba2a0e9e728f5b040df572fabb7d
RUN : \
&& apt-get update -y \
&& apt-get install -y \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
software-properties-common \
&& add-apt-repository ppa:deadsnakes \
&& apt-get update -y \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
iptables \
python-virtualenv
python3.6-venv \
python3.6-dev \
&& rm -rf /var/lib/apt/lists/* \
&& :
ENV PATH=/venv/bin:$PATH
COPY requirements.txt requirements_wsgi.txt /code/metadataproxy/
RUN : \
&& virtualenv /venv -ppython2.7 \
&& pip install -r/code/metadataproxy/requirements_wsgi.txt \
&& pip install -r/code/metadataproxy/requirements.txt
&& python3.6 -m venv /venv \
&& /venv/bin/pip install -r/code/metadataproxy/requirements_wsgi.txt \
&& /venv/bin/pip install -r/code/metadataproxy/requirements.txt \
&& :
RUN mkdir -p /etc/gunicorn /etc/metadataproxy
COPY config/gunicorn.conf /etc/gunicorn/gunicorn.conf
COPY config/logging.conf /etc/metadataproxy/logging.conf
Expand Down
0