Skip to content
This repository has been archived by the owner on Mar 3, 2023. It is now read-only.

Commit

Permalink
Fixes towards python3 support
Browse files Browse the repository at this point in the history
 * update heronpy release scripts for python3
 * update dist Dockerfiles to only use python3
 * remove python2 from docker images

Additionally:
 * fix Ubuntu 16.04 images
  • Loading branch information
Code0x58 committed May 3, 2020
1 parent 802abc4 commit d9c9dbf
Show file tree
Hide file tree
Showing 19 changed files with 47 additions and 39 deletions.
2 changes: 1 addition & 1 deletion docker/base/Dockerfile.base.debian9
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ FROM openjdk:8-jdk-slim

RUN apt-get -y update && apt-get -y install \
netcat-openbsd \
python \
python3 \
unzip \
curl \
supervisor && \
Expand Down
2 changes: 1 addition & 1 deletion docker/compile/Dockerfile.centos7
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ RUN yum -y install \
libtool \
make \
patch \
python-devel \
python3-devel \
zip \
unzip \
wget \
Expand Down
6 changes: 3 additions & 3 deletions docker/compile/Dockerfile.debian10
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ RUN apt-get update && apt-get -y install \
libtool-bin \
libcppunit-dev \
pkg-config \
python \
python-dev \
python3 \
python3-dev \
software-properties-common \
python-setuptools \
python3-setuptools \
tree \
zip \
unzip \
Expand Down
2 changes: 1 addition & 1 deletion docker/compile/Dockerfile.debian9
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ RUN apt-get update && apt-get -y install \
git \
libtool \
libtool-bin \
python-dev \
python3-dev \
python3-dev \
software-properties-common \
python3-setuptools \
Expand Down
2 changes: 1 addition & 1 deletion docker/compile/Dockerfile.ubuntu14.04
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ RUN apt-get update && apt-get -y install \
libssl-dev \
git \
libtool \
python-dev \
python3-dev \
zip \
unzip \
wget \
Expand Down
18 changes: 11 additions & 7 deletions docker/compile/Dockerfile.ubuntu16.04
Original file line number Diff line number Diff line change
Expand Up @@ -21,22 +21,26 @@ FROM ubuntu:16.04
ENV TARGET_PLATFORM ubuntu
ENV bazelVersion 3.0.0

RUN apt-get update && apt-get -y install \

RUN apt-get -y update && apt-get -y install \
automake \
build-essential \
cmake \
curl \
libssl-dev \
git \
libssl-dev \
libtool-bin \
libunwind8 \
libunwind-setjmp0-dev \
python-dev \
libunwind8 \
python3-dev \
software-properties-common \
tree \
zip \
unzip \
wget \
openjdk-11-jdk-headless
zip \
wget

RUN add-apt-repository ppa:openjdk-r/ppa && apt-get -y update && \
apt-get -y install openjdk-11-jdk-headless

ENV JAVA_HOME /usr/lib/jvm/java-11-openjdk-amd64

Expand Down
2 changes: 1 addition & 1 deletion docker/compile/Dockerfile.ubuntu18.04
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ RUN apt-get update && apt-get -y install \
libunwind8 \
libcppunit-dev \
patch \
python-dev \
python3-dev \
pkg-config \
wget \
zip \
Expand Down
10 changes: 6 additions & 4 deletions docker/dist/Dockerfile.dist.centos7
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,16 @@
FROM centos:centos7

RUN yum -y upgrade
RUN yum -y install python; yum clean all
RUN yum -y install unzip; yum clean all
RUN yum -y install which; yum clean all
RUN yum -y install curl; yum clean all
RUN yum -y install nmap-ncat; yum clean all
RUN yum -y install python python3-setuptools; yum clean all
RUN easy_install supervisor
RUN echo_supervisord_conf > /etc/supervisord.conf
RUN yum -y install python3 python3-setuptools; yum clean all
RUN yum -y install epel-release \
&& yum -y update \
&& yum -y install supervisor \
&& yum clean all \
&& echo_supervisord_conf > /etc/supervisord.conf

RUN yum -y install java-11-openjdk java-11-openjdk-devel; yum clean all

Expand Down
4 changes: 2 additions & 2 deletions docker/dist/Dockerfile.dist.debian10
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ FROM openjdk:11.0.6-slim-buster
RUN apt-get update && apt-get -y install \
netcat-openbsd \
curl \
python \
python2.7-dev \
python3 \
python3-dev \
supervisor \
unzip

Expand Down
4 changes: 2 additions & 2 deletions docker/dist/Dockerfile.dist.debian9
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ FROM openjdk:11-jdk-slim-stretch

RUN apt-get -y update && apt-get -y install \
netcat-openbsd \
python \
python-dev \
python3 \
python3-dev \
unzip \
curl \
vim \
Expand Down
1 change: 0 additions & 1 deletion docker/dist/Dockerfile.dist.ubuntu14.04
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
FROM ubuntu:14.04

RUN apt-get -y update && apt-get -y install \
python \
python3 \
unzip \
software-properties-common \
Expand Down
8 changes: 5 additions & 3 deletions docker/dist/Dockerfile.dist.ubuntu16.04
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,15 @@ FROM ubuntu:16.04
RUN apt-get update

RUN apt-get -y install \
python \
python3 \
python3 \
unzip \
software-properties-common \
curl \
supervisor \
openjdk-11-jdk-headless
supervisor

RUN add-apt-repository ppa:openjdk-r/ppa && apt-get -y update && \
apt-get -y install openjdk-11-jdk-headless

ENV JAVA_HOME /usr/lib/jvm/java-11-openjdk-amd64
RUN update-ca-certificates -f
Expand Down
2 changes: 1 addition & 1 deletion docker/dist/Dockerfile.dist.ubuntu18.04
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ FROM ubuntu:18.04

RUN apt-get update
RUN apt-get -y install \
unzip software-properties-common curl python python3 supervisor openjdk-11-jdk-headless
unzip software-properties-common curl python3 supervisor openjdk-11-jdk-headless

ENV JAVA_HOME /usr/lib/jvm/java-11-openjdk-amd64
RUN update-ca-certificates -f
Expand Down
2 changes: 1 addition & 1 deletion docker/test/Dockerfile.centos7
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ RUN yum -y install \
libtool \
make \
patch \
python-devel \
python3-devel \
python3-devel \
python3-setuptools \
zip \
Expand Down
1 change: 0 additions & 1 deletion docker/test/Dockerfile.ubuntu18.04
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ RUN apt-get update && apt-get -y install \
libtool-bin \
libunwind8 \
patch \
python-dev \
python3-dev \
wget \
zip \
Expand Down
8 changes: 4 additions & 4 deletions scripts/packages/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -644,12 +644,12 @@ genrule(
'find heronpy -type f -name "*.bak" -delete',
"rm setup.py.template",
"tree $$HERONPY_DIR",
"/usr/bin/env python2.7 setup.py sdist",
"/usr/bin/env python2.7 setup.py bdist_wheel --universal",
"/usr/bin/env python3 setup.py sdist",
"/usr/bin/env python3 setup.py bdist_wheel",
"cd -",
"ls -l $$HERONPY_DIR/dist",
"cp $$HERONPY_DIR/dist/heronpy-*-py2.py3-*.whl $$OUTPUT_DIR",
'cp $$HERONPY_DIR/dist/heronpy-*-py2.py3-*.whl "$@"',
"cp $$HERONPY_DIR/dist/heronpy-*-py3-*.whl $$OUTPUT_DIR",
'cp $$HERONPY_DIR/dist/heronpy-*-py3-*.whl "$@"',
"cp $$HERONPY_DIR/dist/heronpy-*.tar.gz $$OUTPUT_DIR",
"touch $$OUTPUT_DIR/heronpy.whl",
"rm -rf $$TMP_DIR",
Expand Down
8 changes: 5 additions & 3 deletions scripts/packages/heronpy/setup.py.template
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ with open(requirement_file, 'r') as f:
raw_requirements = f.read().strip()

requirements = raw_requirements.split('\n')
print "Requirements: %s" % requirements
print("Requirements: %s" % requirements)

long_description = "The heronpy package enables you to write Heron topologies in Python. " \
"Topologies can be run using a variety of schedulers, including Mesos/Aurora," \
Expand All @@ -51,14 +51,16 @@ setup(

'Intended Audience :: Developers',

'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
],

keywords='heron topology python',
packages=find_packages(),

install_requires=requirements
install_requires=requirements,
python_requires='~=3.4',
)
2 changes: 1 addition & 1 deletion website2/docs/schedulers-nomad.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ The advantages of this mode is that it is incredibly lightweight and likely do n
When setting up your Nomad cluster, the following are required:

* The [Heron CLI tool](user-manuals-heron-cli) must be installed on each machine used to deploy Heron topologies
* Python 2.7, Java 7 or 8, and [curl](https://curl.haxx.se/) must be installed on every machine in the cluster
* Python 3, Java 7 or 8, and [curl](https://curl.haxx.se/) must be installed on every machine in the cluster
* A [ZooKeeper cluster](https://zookeeper.apache.org)

## Configuring Heron settings
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ RUN apt-get update && apt-get -y install \
libunwind8 \
libunwind-setjmp0-dev \
python \
python2.7-dev \
python3-dev \
python-software-properties \
software-properties-common \
python-setuptools \
Expand Down

0 comments on commit d9c9dbf

Please sign in to comment.