Skip to content

Commit

Permalink
Build ST2 on Ubuntu 16 with Python 3
Browse files Browse the repository at this point in the history
  • Loading branch information
blag committed Dec 2, 2020
1 parent 260cb5a commit bcc5a93
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
resource_class: large
docker:
# The primary container is an instance of the first list image listed. Your build commands run in this container.
- image: circleci/python:2.7
- image: circleci/python:3.6
working_directory: ~/st2-packages
environment:
DISTROS: "xenial bionic el7 el8"
Expand Down
10 changes: 5 additions & 5 deletions packages/st2/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ else
DEB_DISTRO := unstable
endif

ifeq ($(DEB_DISTRO),bionic)
ifeq ($(DEBIAN),1)
PYTHON_BINARY := /usr/bin/python3
PIP_BINARY := pip
PIP_BINARY := pip3
else ifeq ($(EL_VERSION),8)
PYTHON_BINARY := /usr/bin/python3
PIP_BINARY := /usr/local/bin/pip3
Expand All @@ -32,9 +32,9 @@ else ifeq ($(EL_VERSION),7)
PIP_BINARY := /usr/local/bin/pip3
PYTHON_ALT_BINARY := python3
else
PYTHON_BINARY := python
PIP_BINARY := pip
PYTHON_ALT_BINARY := python
PYTHON_BINARY := python3
PIP_BINARY := pip3
PYTHON_ALT_BINARY := python3
endif

RUNNERS := $(shell ls ../contrib/runners)
Expand Down
2 changes: 1 addition & 1 deletion packages/st2/debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Section: Python
Priority: optional
Maintainer: StackStorm Engineering <[email protected]>
Build-Depends: debhelper (>= 9),
python,
python3 (>= 3.6),
dh-virtualenv (>= 0.8),
libldap2-dev,
libsasl2-dev
Expand Down
6 changes: 3 additions & 3 deletions packages/st2/debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ IS_SYSTEMD = $(shell command -v dh_systemd_enable > /dev/null 2>&1 && echo true)
DEB_DISTRO := $(shell lsb_release -cs)

# Xenial and Bionic depend on different libraries.
# Most important, Bionic uses Python 3 and others use Python 2.7.
# Most important, Bionic uses Python 3 distutils others use libpython3-dev
ifeq ($(DEB_DISTRO),bionic)
BUILD_PRE_DEPENDS := python3 (>= 3.6)
BUILD_DEPENDS := python3-distutils, python3-dev
else
BUILD_PRE_DEPENDS := python2.7
BUILD_DEPENDS := libpython-dev | python-dev
BUILD_PRE_DEPENDS := python3 (>= 3.6)
BUILD_DEPENDS := python3-setuptools, python3-dev
endif

%:
Expand Down

0 comments on commit bcc5a93

Please sign in to comment.