This is an automated email from the ASF dual-hosted git repository. brondsem pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/allura.git
commit 1a1a251ab71d74518450b86ddaa3f2b903039f49 Author: Dillon Walls <[email protected]> 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 | 21 ++++++----- Allura/docs/getting_started/installation.rst | 2 +- CHANGES | 2 ++ Dockerfile | 44 ++++++++++++++--------- scripts/init-docker-dev.sh | 6 ++-- 5 files changed, 46 insertions(+), 29 deletions(-) diff --git a/Allura/docs/getting_started/install_each_step.rst b/Allura/docs/getting_started/install_each_step.rst index e1ed1e8..6f10b11 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.7-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 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -68,13 +71,13 @@ The first step to installing the Allura platform is installing a virtual environ .. code-block:: bash - ~$ sudo apt-get install python3-venv + ~$ sudo apt-get install python3.7-venv Then create a virtual environment. We'll call our Allura environment 'env-allura'. .. code-block:: bash - ~$ python3 -m venv env-allura + ~$ python3.7 -m venv env-allura This gives us a nice, clean environment into which we can install all the allura dependencies. In order to use the virtual environment, you'll need to activate it: @@ -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 2f8b6a0..5afced3 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..7066f7c 100755 --- a/scripts/init-docker-dev.sh +++ b/scripts/init-docker-dev.sh @@ -37,11 +37,13 @@ echo "# No robots.txt rules here" > /allura-data/www-misc/robots.txt cp /allura/Allura/allura/public/nf/favicon.ico /allura-data/www-misc/favicon.ico # share venv to allow update and sharing across containers +rm -rf /allura-data/virtualenv 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
