diff --git a/.travis.yml b/.travis.yml index 6d5d476a..fe0d472b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,9 +1,18 @@ language: python + python: - "3.4" - "3.5" + +virtualenv: + system_site_packages: true + +before_install: + - ./bootstrap-debian.sh + install: - - ./install.py --target=virtualenv + - ./install.py - ./install.py --uninstall=virtualenv + script: - - ./install.py --target=system --checks --tests + - ./install.py --checks --tests diff --git a/README.rst b/README.rst index 4a25d243..60fb12e9 100644 --- a/README.rst +++ b/README.rst @@ -4,4 +4,24 @@ Guake 3 README Setting up a developer's environment ------------------------------------ +On Ubuntu and Debian, use + + ./bootstrap-debian.sh + +Install virtualenv with: ./install.py + +Setting up to your system +------------------------- + + ./install.py --target=system + +Note: not supported yet. Installing on your system directly is a **wrong** idea. It should always be +installed in a proper virtualenv, to avoid messing with your system modules. Of course, Guake relies +on VTE and GTK modules that shall come from your system, but there is no reason to let Guake +override any python package of your system. + +When Guake is packaged in a distribution (Ubuntu, Debian, Fedora,...), in this case only it makes +sense to install it outside of a virtualenv. +However, please see: + https://hynek.me/articles/python-deployment-anti-patterns/ diff --git a/bootstrap-debian.sh b/bootstrap-debian.sh new file mode 100755 index 00000000..499cd7c7 --- /dev/null +++ b/bootstrap-debian.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +sudo apt-get install -q python-dbus python3-dbus python-gi python3-gi diff --git a/install.py b/install.py index 1e87ff4a..189796f3 100755 --- a/install.py +++ b/install.py @@ -133,6 +133,7 @@ elif options.target == "virtualenv": lib.printInfo("VIRTUAL_ENV = %s", os.environ.get("VIRTUAL_ENV")) else: lib.printInfo("Installation in: {}".format(dest_path)) + raise NotImplementedError("system deployment not supported yet") # Todo: check installed packages: python3-gi dataFolder = "data" diff --git a/install_lib.py b/install_lib.py index c9254228..3da6bab3 100644 --- a/install_lib.py +++ b/install_lib.py @@ -75,6 +75,7 @@ class AsciiColor(object): ENDC = '\033[0m' + # Do *not* use color when: # - on windows # - not in a terminal except if we are in Travis CI