You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by di...@apache.org on 2022/02/17 14:42:31 UTC
[allura] 01/01: python3.7 - upgrade docs and docker config to support python3.7
This is an automated email from the ASF dual-hosted git repository.
dill0wn pushed a commit to branch python3.7
in repository https://gitbox.apache.org/repos/asf/allura.git
commit 60105d261ec8590e99ecf601193b4357f06f5926
Author: Dillon Walls <di...@slashdotmedia.com>
AuthorDate: Wed Feb 16 21:56:06 2022 -0500
python3.7 - upgrade docs and docker config to support python3.7
---
Allura/docs/getting_started/install_each_step.rst | 17 +++++----
Allura/docs/getting_started/installation.rst | 2 +-
CHANGES | 2 ++
Dockerfile | 44 ++++++++++++++---------
scripts/init-docker-dev.sh | 5 +--
5 files changed, 43 insertions(+), 27 deletions(-)
diff --git a/Allura/docs/getting_started/install_each_step.rst b/Allura/docs/getting_started/install_each_step.rst
index e1ed1e8..b132df3 100644
--- a/Allura/docs/getting_started/install_each_step.rst
+++ b/Allura/docs/getting_started/install_each_step.rst
@@ -47,19 +47,22 @@ In these instructions, we'll use `VirtualBox <http://www.virtualbox.org>`__ and
System Packages
^^^^^^^^^^^^^^^
-Before we begin, you'll need to install some system packages. Allura currently supports Python 3.6 and 3.7.
+Before we begin, you'll need to install some system packages. Allura currently supports Python 3.7.
.. code-block:: bash
- ~$ sudo apt-get install git-core python3-dev gcc libmagic1 libssl-dev libldap2-dev libsasl2-dev libjpeg8-dev zlib1g-dev libffi-dev
+ ~$ sudo apt-get update
+ ~$ sudo apt-get install software-properties-common
+ ~$ sudo add-apt-repository ppa:deadsnakes/ppa
+ ~$ sudo apt-get update
+ ~$ sudo apt-get install git-core python3.7 python3-dev gcc libmagic1 libssl-dev libldap2-dev libsasl2-dev libjpeg8-dev zlib1g-dev libffi-dev
To install MongoDB, follow the instructions `here <https://docs.mongodb.org/manual/tutorial/install-mongodb-on-ubuntu/>`_.
Optional, for SVN support:
.. code-block:: bash
-
- ~$ sudo apt-get install subversion python3-svn
+ ~$ sudo apt-get install subversion libsvn-dev make g++ python3-svn
Setting up a python virtual environment
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -116,11 +119,11 @@ We'll upgrade `pip <https://pip.pypa.io/en/stable/>`_ to make sure its a current
This may take a little while.
-Optional, for SVN support: symlink the system pysvn package into our virtual environment
+Optional, for SVN support: install the wheel package then use the pysvn-installer script to build a pysvn wheel.
.. code-block:: bash
-
- (env-allura)~/src/allura$ ln -s /usr/lib/python3/dist-packages/pysvn ~/env-allura/lib/python3.*/site-packages/
+ (env-allura)~/src/allura$ pip install wheel
+ (env-allura)~/src/allura$ curl https://raw.githubusercontent.com/reviewboard/pysvn-installer/master/install.py | python
Next, run this to set up all the Allura tools:
diff --git a/Allura/docs/getting_started/installation.rst b/Allura/docs/getting_started/installation.rst
index 2b24fe4..9c449db 100644
--- a/Allura/docs/getting_started/installation.rst
+++ b/Allura/docs/getting_started/installation.rst
@@ -273,7 +273,7 @@ If you'd like to use another webserver, here are a few options:
.. code-block:: bash
~$ pip install mod_wsgi # requires httpd2 devel libraries installed in the system
- ~$ mod_wsgi-express start-server development.ini --application-type paste --user allura --group allura --port 8080 --python-path /PATH/TO/VIRTUALENV/lib/python3.6/site-packages/
+ ~$ mod_wsgi-express start-server development.ini --application-type paste --user allura --group allura --port 8080 --python-path /PATH/TO/VIRTUALENV/lib/python3.7/site-packages/
For any other wsgi server (e.g. mod_wsgi with Apache, or waitress) you will need a wsgi callable set up like this:
diff --git a/CHANGES b/CHANGES
index 3cf2136..314bd84 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,5 +1,7 @@
Unreleased
+This release drops support for Python 3.6.
+
Breaking Changes
* [#8399] In an effort to update the Docker startup steps to make them as
easy as possible and compatible across as many OS's as possible, the default
diff --git a/Dockerfile b/Dockerfile
index 382763e..340b3e0 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -17,23 +17,33 @@
FROM ubuntu:18.04
-RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
- git-core \
- python3-dev \
- gcc \
- libmagic1 \
- libssl-dev \
- libldap2-dev \
- libsasl2-dev \
- libjpeg8-dev \
- zlib1g-dev \
- python3-venv \
- zip \
- subversion \
- python3-svn \
- curl \
- locales \
- sudo \
+# Ubunutu 18.04's latest python is 3.6 (and Ubuntu 20.04's is 3.8)
+# In order to get python3.7, we must add the deadsnakes apt repo, and install 3.7 specifically
+RUN apt-get update \
+ && apt-get install software-properties-common -y --no-install-recommends \
+ && add-apt-repository ppa:deadsnakes/ppa
+
+RUN apt-get update \
+ && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
+ git-core \
+ python3.7 \
+ python3.7-venv \
+ python3.7-dev \
+ gcc \
+ libmagic1 \
+ libssl-dev \
+ libldap2-dev \
+ libsasl2-dev \
+ libjpeg8-dev \
+ zlib1g-dev \
+ zip \
+ subversion \
+ curl \
+ locales \
+ g++ \
+ libsvn-dev \
+ make \
+ sudo \
&& rm -rf /var/lib/apt/lists/*
# up-to-date version of node & npm
diff --git a/scripts/init-docker-dev.sh b/scripts/init-docker-dev.sh
index 6927951..b414bc9 100755
--- a/scripts/init-docker-dev.sh
+++ b/scripts/init-docker-dev.sh
@@ -39,9 +39,10 @@ cp /allura/Allura/allura/public/nf/favicon.ico /allura-data/www-misc/favicon.ico
# share venv to allow update and sharing across containers
if [ ! -e /allura-data/virtualenv ]; then
echo -e "Creating virtualenv\n"
- python3 -m venv /allura-data/virtualenv
+ python3.7 -m venv /allura-data/virtualenv
/allura-data/virtualenv/bin/pip install -U pip
- ln -s /usr/lib/python3/dist-packages/pysvn /allura-data/virtualenv/lib/python3.*/site-packages/
+ /allura-data/virtualenv/bin/pip install -U wheel
+ curl https://raw.githubusercontent.com/reviewboard/pysvn-installer/master/install.py | /allura-data/virtualenv/bin/python
echo # just a new line
fi
source /allura-data/virtualenv/bin/activate