From fb60f7f6c1ea4152f05e11b4fb45c8391d5df1cc Mon Sep 17 00:00:00 2001 From: Zhe Brah Date: Wed, 5 Oct 2016 11:42:06 +0200 Subject: [PATCH 01/10] [INFRA-317] rewrite to use Ansible --- Dockerfile | 69 ++----------------- README.md | 4 +- circle.yml | 8 ++- create_python_image.sh | 13 ++++ image/environment | 1 + image/id_rsa | 51 ++++++++++++++ image/id_rsa.pub | 1 + provision-python-codebox.yml | 5 ++ .../files/external_requirements.txt | 1 - python/files/pkglist | 15 ++++ .../files/requirements.txt | 0 .../files/requirements_base.txt | 0 .../files/requirements_python3.txt | 0 .../files/requirements_v42.txt | 0 python/tasks/common.yml | 38 ++++++++++ python/tasks/envs.yml | 43 ++++++++++++ python/tasks/main.yml | 24 +++++++ 17 files changed, 204 insertions(+), 69 deletions(-) create mode 100755 create_python_image.sh create mode 100644 image/environment create mode 100644 image/id_rsa create mode 100644 image/id_rsa.pub create mode 100644 provision-python-codebox.yml rename external_requirements.txt => python/files/external_requirements.txt (98%) create mode 100644 python/files/pkglist rename requirements.txt => python/files/requirements.txt (100%) rename requirements_base.txt => python/files/requirements_base.txt (100%) rename requirements_python3.txt => python/files/requirements_python3.txt (100%) rename requirements_v42.txt => python/files/requirements_v42.txt (100%) create mode 100644 python/tasks/common.yml create mode 100644 python/tasks/envs.yml create mode 100644 python/tasks/main.yml diff --git a/Dockerfile b/Dockerfile index 8540e86..846fd37 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,66 +1,9 @@ FROM ubuntu:trusty MAINTAINER "Syncano DevOps Team" -ENV LAST_REFRESHED 2016-03-25 -ENV SYNCANO_APIROOT https://api.syncano.io/ - -RUN groupadd -r syncano && \ - useradd -u 1000 -r -g syncano syncano -d /tmp -s /bin/bash && \ - mkdir /home/syncano && \ - chown -R syncano /home/syncano - -# enable everyone to use /tmp -RUN chmod 1777 /tmp -# -- CUT BEGIN -- - -COPY *requirements*.txt /tmp/ -COPY *.tar.gz /tmp/ - -RUN apt-get update && apt-get install -qqy \ - git \ - libffi-dev \ - libssl-dev \ - libjpeg-dev \ - python-dev \ - python3-dev \ - python-tk \ - python3-tk \ - python-numpy \ - python3-numpy \ - python-scipy \ - python3-scipy \ - wget && \ - wget https://bootstrap.pypa.io/get-pip.py && \ - python get-pip.py && \ - pip install -r /tmp/requirements_base.txt - -WORKDIR /home/syncano/ -RUN virtualenv --system-site-packages v4.2 && \ - tar xzvf /tmp/42.tar.gz --skip-old-files && \ - . v4.2/bin/activate && \ - pip install -r /tmp/requirements_v42.txt && \ - pip install -r /tmp/external_requirements.txt && \ - deactivate - -RUN virtualenv --system-site-packages v5.0 && \ - tar xzvf /tmp/50.tar.gz --skip-old-files && \ - . v5.0/bin/activate && \ - pip install -r /tmp/requirements.txt && \ - pip install -r /tmp/external_requirements.txt && \ - deactivate - -RUN virtualenv --system-site-packages -p python3 p3v5.0 && \ - . p3v5.0/bin/activate && \ - pip install -r /tmp/requirements_python3.txt && \ - pip install -r /tmp/external_requirements.txt - -RUN ln -sf /home/syncano/v5.0/bin/python /usr/bin/python && \ - ln -sf /home/syncano/v5.0/bin/python /usr/bin/python27-lib5.0 && \ - ln -sf /home/syncano/v4.2/bin/python /usr/bin/python27-lib4.2 && \ - ln -sf /home/syncano/p3v5.0/bin/python /usr/bin/python3 && \ - ln -sf /home/syncano/p3v5.0/bin/python /usr/bin/python3-lib5.0 - -# -- CUT END -- -USER syncano -WORKDIR /tmp -CMD "python" +RUN apt-get update && apt-get install -y openssh-server +RUN mkdir /var/run/sshd /root/.ssh +COPY image/id_rsa.pub /root/.ssh/authorized_keys +RUN wget https://github.com/Yelp/dumb-init/releases/download/v1.0.3/dumb-init_1.0.3_amd64.deb +RUN dpkg -i dumb-init_*.deb +EXPOSE 22 diff --git a/README.md b/README.md index 9d6f9c1..b9b6be7 100644 --- a/README.md +++ b/README.md @@ -2,10 +2,10 @@ This repository contains Dockerfile for Python 2.7 image with built-in support for Syncano and selected Python libraries. -You can build the image yourself: +You can build the image yourself (Ansible 2.1.0 is required): ``` -$ docker build -t quay.io/syncano/python-codebox . +$ ./create_python_image.sh ``` or pull it from Docker registry: diff --git a/circle.yml b/circle.yml index 2ea99f5..6f7c766 100644 --- a/circle.yml +++ b/circle.yml @@ -4,9 +4,11 @@ machine: dependencies: override: - - wget https://s3.amazonaws.com/codebox-bucket/python/42.tar.gz - - wget https://s3.amazonaws.com/codebox-bucket/python/50.tar.gz - - docker build -t quay.io/syncano/python-codebox . + - sudo pip install ansible==2.1.0 + - chmod 600 image/id_rsa + - ./create_python_image.sh $BUILD_LEVEL + - docker images + - docker history quay.io/syncano/python-codebox test: override: diff --git a/create_python_image.sh b/create_python_image.sh new file mode 100755 index 0000000..0a12684 --- /dev/null +++ b/create_python_image.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +if [ $1 != "--partial" ] +then + docker build -t quay.io/syncano/python-codebox . +fi + +docker run -d -p 2200:22 --env-file image/environment --name ansible quay.io/syncano/python-codebox dumb-init /usr/sbin/sshd -D +ansible-playbook -i "`docker inspect --format '{{ .NetworkSettings.IPAddress }}' ansible`," -u root --private-key image/id_rsa provision-python-codebox.yml +docker commit ansible quay.io/syncano/python-codebox + +docker run -d --env-file image/environment -u syncano --name python quay.io/syncano/python-codebox dumb-init /usr/sbin/sshd -D +docker commit python quay.io/syncano/python-codebox diff --git a/image/environment b/image/environment new file mode 100644 index 0000000..7228805 --- /dev/null +++ b/image/environment @@ -0,0 +1 @@ +SYNCANO_APIROOT=https://api.syncano.io/ diff --git a/image/id_rsa b/image/id_rsa new file mode 100644 index 0000000..1f1b49a --- /dev/null +++ b/image/id_rsa @@ -0,0 +1,51 @@ +-----BEGIN RSA PRIVATE KEY----- +MIIJKgIBAAKCAgEAqdVP3R97ex0midPnCFkya/AWZG+tNDjHlHarTwEWjenxYfJu +eJTpUCxCFVomhVQVwdHQ9egdyy6KlsxC7fhPKNkLkkv+rCNk8Fn4m3NjmIv5eGN/ +YxpojxjNivfxK0PaTB9FrnZmJQNW/vLPuq92gl2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WpmslzjqnAVKfTDTopDr8LNTepqCcTIqc43+TO+G5Sb65ycs +URqcNOyWPOo459BH5JRwb6NA8MNaqkvVGM5idSVTYmmPGp/9yVLS96BO7tIC8H8D +ZDgJQ6ux49rjRbyvxsGlBiOFQ2TpfFg20LGUE/k2BzgSfANMRGMK0zK+l2yH2JCq +NmeKlQKCAQEAugsLaxiZa58Vz7qTCT4T4U80SQLiovVDN5vV2gI2h3gezNfTbKMU +Wopc7NEKr6UlBhnojQT/ylY8F+FGrcSxViSeX1mCVYGRtE3YI2xCAEZ4tNRQvJgq +4wALM7H5AMXKmps9xtBs33kF7QT7gXmywTkOEfEJhsrXJW8TRv+OH4AJTI6QNA4J +V1cfISEKky3wUw/BPwuiSGHQAqUSr9/pFJtzaJ0U6A1RZQwhIXWWVNS35hJoPSFI +MA97mfZ7FiLhBHwh6WtqM3QeLrpl4es4oGnoW2JDYVgiZ3Tqd2G3u/Kyqg8y0XLW +jYSZyhXYIvsJyNh4espJPTiDNS/6XY2l4QKCAQEAzzRobY+LOLJUt1HAQdbJEeXS +4EH3vn7vPoxME56bSPvnz/w/u8RSh1mvnMx41ANYccUsNBbBdyZClG3UAToAxuxu +Z9j2ptNPFIlhZxGgf7o3p7hCU0DosMZVR1ADNJb+tGgXjHwctYIbX9Prbf30y06l +G3XlStZE0rVeC9RnM/OD4ymaXfp/wRsEGMX1vGhdsFebRFCauuimvRDOw8bRhUbI +oWXCUVSP5PqY/io0QAFZgCgi9OgtHO8qKzzK98bWPprHBXUGDWnuzXB/irbiQhBJ +tE6FDAh56fnBOxiYjdvh5iKv6rbuT3esoWe4S9H7vNjI7kHer95/tAsqVseTag== +-----END RSA PRIVATE KEY----- diff --git a/image/id_rsa.pub b/image/id_rsa.pub new file mode 100644 index 0000000..11354bd --- /dev/null +++ b/image/id_rsa.pub @@ -0,0 +1 @@ +ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCp1U/dH3t7HSaJ0+cIWTJr8BZkb600OMeUdqtPARaN6fFh8m54lOlQLEIVWiaFVBXB0dD16B3LLoqWzELt+E8o2QuSS/6sI2TwWfibc2OYi/l4Y39jGmiPGM2K9/ErQ9pMH0WudmYlA1b+8s+6r3aCXY540d/AjHoHj/ILFC03WFN8Dl/oMpaisPzvhnfanAmIkSc3KBBegd9dl2/j6mZs4sApiMozA2b56nL4IPSvCsKGb8pv2FxX2b1nmzSpblThyo8Gq3dBmCErCyPWDSthBzSkcWDnQ29Y5B48ncYLGy1V/Lm4CTschCPXnGdxvrzFaYVpkstg/Et6Dgsx0SxPB6PGmhvWnW+0IYsgtUVOKXFAI7F8kJFdo0M9AzDEdHJNK8nlfom9eW+zttawrclQaebNJriz0H83jj86s2MtbfsBXHuPsGjUZsGio18BhncZi8p8FMhxnl9JTAfkDuYNI8OAE8vJQ4lSDjKZmnIqKVkBIhVOn3B4ZTQEygecgUFqD8l3rpj3yMJaOke8IYpBQP14gVRztNHC2IjxVUPf4WLphz1LyUIHU7kSIsPiiz8OarX4X9iIfNNac8SlXG5nD6/LPNC/OCuh60creRYbCf2IMHYAEqKfUYGOtClZzSwflq7o1fR2kMvVF9pcdGT+b3qSvpktMF4D1nqDCytMgw== syncano diff --git a/provision-python-codebox.yml b/provision-python-codebox.yml new file mode 100644 index 0000000..62fdb24 --- /dev/null +++ b/provision-python-codebox.yml @@ -0,0 +1,5 @@ +--- +- hosts: all + connection: ssh + roles: + - python diff --git a/external_requirements.txt b/python/files/external_requirements.txt similarity index 98% rename from external_requirements.txt rename to python/files/external_requirements.txt index b3826da..8788358 100644 --- a/external_requirements.txt +++ b/python/files/external_requirements.txt @@ -1,3 +1,2 @@ -i https://pypi.fury.io/Nx-poGuiakLbsCzaLwNm/aexol aexol==0.1.5 - diff --git a/python/files/pkglist b/python/files/pkglist new file mode 100644 index 0000000..7c1c2ee --- /dev/null +++ b/python/files/pkglist @@ -0,0 +1,15 @@ +git +libffi-dev +libssl-dev +libjpeg-dev +python-dev +python3-dev +python-tk +python3-tk +python-numpy +python3-numpy +python-pip +python3-pip +python-scipy +python3-scipy +wget diff --git a/requirements.txt b/python/files/requirements.txt similarity index 100% rename from requirements.txt rename to python/files/requirements.txt diff --git a/requirements_base.txt b/python/files/requirements_base.txt similarity index 100% rename from requirements_base.txt rename to python/files/requirements_base.txt diff --git a/requirements_python3.txt b/python/files/requirements_python3.txt similarity index 100% rename from requirements_python3.txt rename to python/files/requirements_python3.txt diff --git a/requirements_v42.txt b/python/files/requirements_v42.txt similarity index 100% rename from requirements_v42.txt rename to python/files/requirements_v42.txt diff --git a/python/tasks/common.yml b/python/tasks/common.yml new file mode 100644 index 0000000..1f4fcb0 --- /dev/null +++ b/python/tasks/common.yml @@ -0,0 +1,38 @@ +--- +- name: Add syncano group + group: + name: syncano + gid: 1000 + state: present + +- name: Add syncano user + user: + name: syncano + group: syncano + uid: 1000 + shell: /bin/bash + home: /home/syncano + state: present + +- name: Copy apt pkgs + copy: + src: pkglist + dest: /tmp/ + +- name: List apt packages + shell: + cat /tmp/pkglist + register: pkgs + +- name: Install packages + apt: + name: "{{ item }}" + state: present + update_cache: yes + with_items: + "{{ pkgs.stdout_lines }}" + +- name: Allow public usage of /tmp + file: + name: /tmp + mode: "1777" \ No newline at end of file diff --git a/python/tasks/envs.yml b/python/tasks/envs.yml new file mode 100644 index 0000000..e35faad --- /dev/null +++ b/python/tasks/envs.yml @@ -0,0 +1,43 @@ +- name: Install Python packages in envs + pip: + virtualenv: "/home/syncano/{{ item.env }}" + virtualenv_python: "{{ item.python }}" + virtualenv_site_packages: yes + requirements: "/tmp/{{ item.requirements }}" + with_items: + - env: v4.2 + python: python2.7 + requirements: requirements_v42.txt + - env: v4.2 + python: python2.7 + requirements: external_requirements.txt + - env: v5.0 + python: python2.7 + requirements: requirements.txt + - env: v5.0 + python: python2.7 + requirements: external_requirements.txt + - env: p3v5.0 + python: python3 + requirements: requirements_python3.txt + - env: p3v5.0 + python: python3 + requirements: external_requirements.txt + +- name: Set soft links to runtimes + file: + src: "/home/syncano/{{ item.env }}/bin/python" + dest: "/usr/bin/{{ item.python }}" + state: link + force: yes + with_items: + - env: v5.0 + python: python + - env: v5.0 + python: python27-lib5.0 + - env: v4.2 + python: python27-lib4.2 + - env: p3v5.0 + python: python3 + - env: p3v5.0 + python: python3-lib5.0 diff --git a/python/tasks/main.yml b/python/tasks/main.yml new file mode 100644 index 0000000..d7cb095 --- /dev/null +++ b/python/tasks/main.yml @@ -0,0 +1,24 @@ +--- +- include: common.yml + +- name: Install requirements + pip: + name: pip + extra_args: "--upgrade" + +- name: Copy requirements files + copy: + src: "{{ item }}" + dest: /tmp/ + with_items: + - requirements.txt + - requirements_base.txt + - requirements_v42.txt + - requirements_python3.txt + - external_requirements.txt + +- name: Install requirements + pip: + requirements: /tmp/requirements_base.txt + +- include: envs.yml From 7b5167449f73d1c7a3ffd59db9f36ed168156def Mon Sep 17 00:00:00 2001 From: Zhe Brah Date: Fri, 7 Oct 2016 11:44:25 +0200 Subject: [PATCH 02/10] [INFRA-317] correct default param [ci skip] --- create_python_image.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/create_python_image.sh b/create_python_image.sh index 0a12684..e66953b 100755 --- a/create_python_image.sh +++ b/create_python_image.sh @@ -1,6 +1,6 @@ #!/bin/bash -if [ $1 != "--partial" ] +if [ ${1:-full} != "--partial" ] then docker build -t quay.io/syncano/python-codebox . fi From c2c869a87ae3add943369c1141ba429d87fb0c1c Mon Sep 17 00:00:00 2001 From: Robert Kopaczewski Date: Thu, 17 Nov 2016 15:37:39 +0100 Subject: [PATCH 03/10] [version_bump] Syncano version bump to 5.4.6 --- python/files/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/files/requirements.txt b/python/files/requirements.txt index de76d71..5cbac2d 100644 --- a/python/files/requirements.txt +++ b/python/files/requirements.txt @@ -23,7 +23,7 @@ fastly==0.0.2 pandas==0.17.1 BeautifulSoup==3.2.1 boto3==1.2.5 -syncano==5.4.4 +syncano==5.4.6 mixpanel==4.3.0 mixpanel-query-py==0.1.7 Sendinblue==2.0.4 From 6f6e4ed4a191937787c02e806c71eece5263c129 Mon Sep 17 00:00:00 2001 From: Robert Kopaczewski Date: Thu, 17 Nov 2016 15:38:23 +0100 Subject: [PATCH 04/10] [syncano_546] python3 update --- python/files/requirements_python3.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/files/requirements_python3.txt b/python/files/requirements_python3.txt index 7af2a33..475eb13 100644 --- a/python/files/requirements_python3.txt +++ b/python/files/requirements_python3.txt @@ -23,7 +23,7 @@ fastly==0.0.2 pandas==0.17.1 beautifulsoup4==4.4.1 boto3==1.2.5 -syncano==5.4.4 +syncano==5.4.6 mixpanel==4.3.0 sendgrid==3.2.10 python-telegram-bot==5.0.0 From 93971e1dfee31dfcd7ee294813cb49b1026ac632 Mon Sep 17 00:00:00 2001 From: Robert Kopaczewski Date: Thu, 17 Nov 2016 16:15:14 +0100 Subject: [PATCH 05/10] [syncano_546] Version bump --- test_v50.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test_v50.py b/test_v50.py index 521fbac..e929731 100644 --- a/test_v50.py +++ b/test_v50.py @@ -1,2 +1,2 @@ -for lib, version in (('numpy', '1.8.2'), ('scipy', '0.13.3'), ('syncano', '5.4.4')): +for lib, version in (('numpy', '1.8.2'), ('scipy', '0.13.3'), ('syncano', '5.4.6')): assert __import__(lib).__version__ == version From 6428826a89703eaf5c6caa922124677f95a17f8a Mon Sep 17 00:00:00 2001 From: Robert Kopaczewski Date: Thu, 17 Nov 2016 17:53:17 +0100 Subject: [PATCH 06/10] [syncano_546] explicit future requirement --- python/files/requirements.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/python/files/requirements.txt b/python/files/requirements.txt index 5cbac2d..9d6bbd3 100644 --- a/python/files/requirements.txt +++ b/python/files/requirements.txt @@ -33,3 +33,4 @@ sendgrid==3.2.10 python-telegram-bot==5.0.0 Jinja2==2.8 wit==4.1.0 +future==0.15.2 From d1134976dce7c14658023c5bf91621a3775d26ab Mon Sep 17 00:00:00 2001 From: Zhe Brah Date: Thu, 24 Nov 2016 14:48:36 +0100 Subject: [PATCH 07/10] [INFRA-425] add workdir and cmd --- Dockerfile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Dockerfile b/Dockerfile index 846fd37..bb55724 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,3 +7,6 @@ COPY image/id_rsa.pub /root/.ssh/authorized_keys RUN wget https://github.com/Yelp/dumb-init/releases/download/v1.0.3/dumb-init_1.0.3_amd64.deb RUN dpkg -i dumb-init_*.deb EXPOSE 22 + +WORKDIR /tmp +CMD "python" From 37c696d41bf236358abfcb034853265d841c5c94 Mon Sep 17 00:00:00 2001 From: Robert Kopaczewski Date: Mon, 9 Jan 2017 19:21:24 +0100 Subject: [PATCH 08/10] [sendinblue] Force updated Due to incredibly stupid policy on behalf of sendinblue (they remove older versions from PyPI when they release new ones). --- python/files/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/files/requirements.txt b/python/files/requirements.txt index 9d6bbd3..4a6be6c 100644 --- a/python/files/requirements.txt +++ b/python/files/requirements.txt @@ -26,7 +26,7 @@ boto3==1.2.5 syncano==5.4.6 mixpanel==4.3.0 mixpanel-query-py==0.1.7 -Sendinblue==2.0.4 +Sendinblue==2.0.5.1 GitPython==2.0.5 Mako==1.0.4 sendgrid==3.2.10 From 7b56db3647aec8d3714b3167aaa5161ca3f40686 Mon Sep 17 00:00:00 2001 From: Robert Kopaczewski Date: Fri, 1 Jun 2018 21:35:46 +0200 Subject: [PATCH 09/10] fix: upgrade setuptools --- python/tasks/main.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python/tasks/main.yml b/python/tasks/main.yml index d7cb095..6b0e8af 100644 --- a/python/tasks/main.yml +++ b/python/tasks/main.yml @@ -3,8 +3,11 @@ - name: Install requirements pip: - name: pip + name: " {{ item }}" extra_args: "--upgrade" + with_items: + - pip + - setuptools - name: Copy requirements files copy: From 927a38e6bacf662c2940d56b8f08b85fa92793a5 Mon Sep 17 00:00:00 2001 From: Robert Kopaczewski Date: Fri, 1 Jun 2018 22:38:35 +0200 Subject: [PATCH 10/10] fix: fix reqs --- python/files/requirements.txt | 61 ++++++++++++++------------- python/files/requirements_python3.txt | 53 +++++++++++------------ python/files/requirements_v42.txt | 41 +++++++++--------- python/tasks/main.yml | 1 - 4 files changed, 79 insertions(+), 77 deletions(-) diff --git a/python/files/requirements.txt b/python/files/requirements.txt index 4a6be6c..0770e7f 100644 --- a/python/files/requirements.txt +++ b/python/files/requirements.txt @@ -1,36 +1,37 @@ -Pillow==2.7.0 -requests==2.7.0 -icalendar==3.8.4 -pytz==2014.10 -html2text==2015.2.18 -pkgtools==0.7.3 -names==0.3.0 -httplib2==0.9.1 -twilio==4.4.0 -qrcode==5.1 analytics-python==1.0.3 -osa==0.1.6.6 -google-api-python-client==1.5.2 -six==1.9.0 -uritemplate==0.6 -oauth2client==1.4.11 -oauthlib==1.0.3 -requests-oauthlib==0.5.0 -tweepy==3.4.0 -braintree==3.20.0 -googleads==4.3.0 -fastly==0.0.2 -pandas==0.17.1 BeautifulSoup==3.2.1 boto3==1.2.5 -syncano==5.4.6 -mixpanel==4.3.0 -mixpanel-query-py==0.1.7 -Sendinblue==2.0.5.1 +braintree==3.20.0 +cryptography==2.0.3 +fastly==0.0.2 +future==0.15.2 GitPython==2.0.5 +google-api-python-client==1.5.2 +googleads==4.3.0 +html2text==2015.2.18 +httplib2==0.9.1 +icalendar==3.8.4 +Jinja2==2.8 Mako==1.0.4 -sendgrid==3.2.10 +mixpanel-query-py==0.1.7 +mixpanel==4.3.0 +names==0.3.0 +oauth2client==1.4.11 +oauthlib==1.0.3 +osa==0.1.6.6 +pandas==0.17.1 +Pillow==2.7.0 +pkgtools==0.7.3 python-telegram-bot==5.0.0 -Jinja2==2.8 -wit==4.1.0 -future==0.15.2 +pytz==2014.10 +qrcode==5.1 +requests-oauthlib==0.5.0 +requests==2.7.0 +sendgrid==3.2.10 +Sendinblue==2.0.5.1 +six==1.9.0 +syncano==5.4.6 +tweepy==3.4.0 +twilio==4.4.0 +uritemplate==0.6 +wit==4.1.0 \ No newline at end of file diff --git a/python/files/requirements_python3.txt b/python/files/requirements_python3.txt index 475eb13..a55b8a9 100644 --- a/python/files/requirements_python3.txt +++ b/python/files/requirements_python3.txt @@ -1,32 +1,33 @@ -Pillow==2.7.0 -requests==2.7.0 -icalendar==3.8.4 -pytz==2014.10 -html2text==2015.2.18 -pkgtools==0.7.3 -names==0.3.0 -httplib2==0.9.1 -twilio==4.4.0 -qrcode==5.1 analytics-python==1.0.3 -osa==0.1.6.6 +beautifulsoup4==4.4.1 +boto3==1.2.5 +braintree==3.20.0 +cryptography==2.0.3 +fastly==0.0.2 google-api-python-client==1.5.2 -six==1.9.0 -uritemplate==0.6 +googleads==3.11.0 +html2text==2015.2.18 +httplib2==0.9.1 +icalendar==3.8.4 +Jinja2==2.8 +mixpanel-query-py==0.1.7 +mixpanel==4.3.0 +names==0.3.0 oauth2client==1.4.11 oauthlib==1.0.3 -requests-oauthlib==0.5.0 -tweepy==3.4.0 -braintree==3.20.0 -googleads==3.11.0 -fastly==0.0.2 +osa==0.1.6.6 pandas==0.17.1 -beautifulsoup4==4.4.1 -boto3==1.2.5 -syncano==5.4.6 -mixpanel==4.3.0 -sendgrid==3.2.10 +Pillow==2.7.0 +pkgtools==0.7.3 python-telegram-bot==5.0.0 -Jinja2==2.8 -wit==4.1.0 -mixpanel-query-py==0.1.7 +pytz==2014.10 +qrcode==5.1 +requests-oauthlib==0.5.0 +requests==2.7.0 +sendgrid==3.2.10 +six==1.9.0 +syncano==5.4.6 +tweepy==3.4.0 +twilio==4.4.0 +uritemplate==0.6 +wit==4.1.0 \ No newline at end of file diff --git a/python/files/requirements_v42.txt b/python/files/requirements_v42.txt index b711e79..f04ff33 100644 --- a/python/files/requirements_v42.txt +++ b/python/files/requirements_v42.txt @@ -1,26 +1,27 @@ -Pillow==2.7.0 -requests==2.7.0 -icalendar==3.8.4 -pytz==2014.10 -html2text==2015.2.18 -pkgtools==0.7.3 -names==0.3.0 -httplib2==0.9.1 -twilio==4.4.0 -qrcode==5.1 analytics-python==1.0.3 -osa==0.1.6.6 +BeautifulSoup==3.2.1 +boto3==1.2.5 +braintree==3.20.0 +cryptography==2.0.3 +fastly==0.0.2 google-api-python-client==1.4.1 -six==1.9.0 -uritemplate==0.6 +googleads==3.11.0 +html2text==2015.2.18 +httplib2==0.9.1 +icalendar==3.8.4 +names==0.3.0 oauth2client==1.4.11 oauthlib==1.0.3 -requests-oauthlib==0.5.0 -tweepy==3.4.0 -braintree==3.20.0 -googleads==3.11.0 -fastly==0.0.2 +osa==0.1.6.6 pandas==0.17.1 -BeautifulSoup==3.2.1 -boto3==1.2.5 +Pillow==2.7.0 +pkgtools==0.7.3 +pytz==2014.10 +qrcode==5.1 +requests-oauthlib==0.5.0 +requests==2.7.0 +six==1.9.0 syncano==4.2.0 +tweepy==3.4.0 +twilio==4.4.0 +uritemplate==0.6 \ No newline at end of file diff --git a/python/tasks/main.yml b/python/tasks/main.yml index 6b0e8af..0a75bf1 100644 --- a/python/tasks/main.yml +++ b/python/tasks/main.yml @@ -7,7 +7,6 @@ extra_args: "--upgrade" with_items: - pip - - setuptools - name: Copy requirements files copy: