Skip to content

Commit

Permalink
Removed py2 support
Browse files Browse the repository at this point in the history
Remove Python2 support
  • Loading branch information
kiddinn committed Jan 17, 2020
2 parents 5f9537a + c2517fd commit 39de23f
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 39 deletions.
10 changes: 0 additions & 10 deletions .travis.yml
@@ -1,15 +1,5 @@
matrix:
include:
- name: "Ubuntu Bionic (18.04) (Docker) with Python 2.7"
env: [MODE="pypi", UBUNTU_VERSION="18.04"]
os: linux
dist: xenial
sudo: required
group: edge
language: python
python: 2.7
services:
- docker
- name: "Ubuntu Bionic (18.04) (Docker) with Python 3.6"
env: [MODE="pypi", UBUNTU_VERSION="18.04"]
os: linux
Expand Down
13 changes: 3 additions & 10 deletions config/travis/install.sh
Expand Up @@ -2,9 +2,6 @@
#
# Script to set up Travis-CI test VM.

DPKG_PYTHON2_DEPENDENCIES="python-alembic python-altair python-amqp python-aniso8601 python-asn1crypto python-attr python-bcrypt python-billiard python-blinker python-bs4 python-celery python-certifi python-cffi python-chardet python-click python-configparser python-cryptography python-datasketch python-dateutil python-editor python-elasticsearch python-entrypoints python-enum34 python-flask python-flask-bcrypt python-flask-login python-flask-migrate python-flask-restful python-flask-script python-flask-sqlalchemy python-flask-wtf python-gunicorn python-idna python-ipaddress python-itsdangerous python-jinja2 python-jsonschema python-jwt python-kombu python-mako python-markupsafe python-neo4jrestclient python-numpy python-pandas python-parameterized python-pycparser python-pyrsistent python-redis python-requests python-six python-sqlalchemy python-toolz python-typing python-tz python-urllib3 python-vine python-werkzeug python-wtforms python-yaml python-oauthlib python-google-auth";
DPKG_PYTHON2_TEST_DEPENDENCIES="python-flask-testing python-funcsigs python-mock python-nose python-pip python-pbr python-setuptools";

DPKG_PYTHON3_DEPENDENCIES="python3-alembic python3-altair python3-amqp python3-aniso8601 python3-asn1crypto python3-attr python3-bcrypt python3-billiard python3-blinker python3-bs4 python3-celery python3-certifi python3-cffi python3-chardet python3-click python3-cryptography python3-datasketch python3-dateutil python3-editor python3-elasticsearch python3-entrypoints python3-flask python3-flask-bcrypt python3-flask-login python3-flask-migrate python3-flask-restful python3-flask-script python3-flask-sqlalchemy python3-flask-wtf python3-gunicorn python3-idna python3-ipaddress python3-itsdangerous python3-jinja2 python3-jsonschema python3-jwt python3-kombu python3-mako python3-markupsafe python3-neo4jrestclient python3-numpy python3-pandas python3-parameterized python3-pycparser python3-pyrsistent python3-redis python3-requests python3-six python3-sqlalchemy python3-toolz python3-tz python3-urllib3 python3-vine python3-werkzeug python3-wtforms python3-yaml python3-oauthlib python3-google-auth";
DPKG_PYTHON3_TEST_DEPENDENCIES="python3-distutils python3-flask-testing python3-mock python3-nose python3-pip python3-pbr python3-setuptools";

Expand Down Expand Up @@ -41,11 +38,7 @@ if test ${MODE} = "dpkg"; then
DPKG_PACKAGES="${DPKG_PACKAGES} python3-distutils pylint";
fi

if test ${TRAVIS_PYTHON_VERSION} = "2.7"; then
DPKG_PACKAGES="${DPKG_PACKAGES} python ${DPKG_PYTHON2_DEPENDENCIES} ${DPKG_PYTHON2_TEST_DEPENDENCIES}";
else
DPKG_PACKAGES="${DPKG_PACKAGES} python3 ${DPKG_PYTHON3_DEPENDENCIES} ${DPKG_PYTHON3_TEST_DEPENDENCIES}";
fi
DPKG_PACKAGES="${DPKG_PACKAGES} python3 ${DPKG_PYTHON3_DEPENDENCIES} ${DPKG_PYTHON3_TEST_DEPENDENCIES}";

docker exec -e "DEBIAN_FRONTEND=noninteractive" ${CONTAINER_NAME} sh -c "apt-get install -y ${DPKG_PACKAGES}";
docker cp ../timesketch ${CONTAINER_NAME}:/
Expand All @@ -55,6 +48,6 @@ elif test ${MODE} = "pypi"; then
pip install -r test_requirements.txt;

elif test ${TRAVIS_OS_NAME} = "linux"; then
pip install -r requirements.txt;
pip install -r test_requirements.txt;
pip3 install -r requirements.txt;
pip3 install -r test_requirements.txt;
fi
12 changes: 0 additions & 12 deletions config/travis/run_python2.sh

This file was deleted.

2 changes: 0 additions & 2 deletions config/travis/runtests.sh
Expand Up @@ -11,8 +11,6 @@ if test ${MODE} = "dpkg"; then

if test "${TARGET}" = "pylint"; then
TEST_COMMAND="./config/travis/run_pylint.sh";
elif test ${TRAVIS_PYTHON_VERSION} = "2.7"; then
TEST_COMMAND="./config/travis/run_python2.sh";
else
TEST_COMMAND="./config/travis/run_python3.sh";
fi
Expand Down
6 changes: 3 additions & 3 deletions docs/Installation.md
Expand Up @@ -41,7 +41,7 @@ Make sure that Elasticsearch is running:
#### Install PostgreSQL

$ sudo apt-get install postgresql
$ sudo apt-get install python-psycopg2
$ sudo apt-get install python3-psycopg2

**Configure PostgreSQL**

Expand All @@ -59,11 +59,11 @@ Then you need to restart PostgreSQL:

Now it is time to install Timesketch. First we need to install some dependencies:

$ sudo apt-get install python-pip python-dev libffi-dev
$ sudo apt-get install python3-pip python3-dev libffi3-dev

Then install Timesketch itself:

$ sudo pip install timesketch
$ sudo pip3 install timesketch

**Configure Timesketch**

Expand Down
4 changes: 2 additions & 2 deletions docs/Upgrading.md
Expand Up @@ -10,13 +10,13 @@ First you should backup your current database in case something goes wrong in th

## Upgrade timesketch

$ pip install timesketch --upgrade
$ pip3 install timesketch --upgrade

Or, if you are installing from the master branch:

$ git clone https://github.com/google/timesketch.git
$ cd timesketch
$ pip install . --upgrade
$ pip3 install . --upgrade

## Upgrade the database schema
Have you backed up your database..? good. Let's upgrade the schema:
Expand Down

0 comments on commit 39de23f

Please sign in to comment.