From f55ac9edbfbfeb13e93cb101df8d38bd7bcce15a Mon Sep 17 00:00:00 2001
From: mathieui <mathieui@mathieui.net>
Date: Mon, 27 Oct 2014 19:16:32 +0100
Subject: Mention that setuptools is kind of mandatory

---
 doc/source/install.rst | 5 ++++-
 requirements.txt       | 1 +
 setup.py               | 6 ++++++
 3 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/doc/source/install.rst b/doc/source/install.rst
index b655894b..dbe5ddfa 100644
--- a/doc/source/install.rst
+++ b/doc/source/install.rst
@@ -80,6 +80,8 @@ Poezio depends on two libraries:
 - DNSPython_ (the python3 version, often called dnspython3)
 - SleekXMPP_
 
+Additionally, it needs *python3-setuptools* to install an executable file.
+
 If you do not want to install those libraries, you can skip directly to
 the :ref:`installation part <poezio-install-label>`
 
@@ -139,7 +141,8 @@ If you have git installed, it will download and update locally the
 libraries for you. (and if you don’t have git installed, install it)
 
 
-If you really want to install it, run as root (or sudo in ubuntu or whatever):
+If you really want to install it, first install the *python3-setuptools* package
+in your distribution, then run as root (or sudo in ubuntu or whatever):
 
 .. code-block:: bash
 
diff --git a/requirements.txt b/requirements.txt
index 462dc735..fbb5895a 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -2,6 +2,7 @@
 sleekxmpp==1.2
 dnspython3==1.11.1
 sphinx==1.2.1
+setuptools
 argparse
 pyinotify
 python-mpd2
diff --git a/setup.py b/setup.py
index 6c70c208..efd914b0 100755
--- a/setup.py
+++ b/setup.py
@@ -1,7 +1,13 @@
 #!/usr/bin/env python3
+
 try:
     from setuptools import setup, Extension
 except ImportError:
+    print('Setuptools was not found.\n'
+          'This script will use distutils instead, which will NOT'
+          ' be able to install a `poezio` executable.\nIf you are '
+          'using it to build a package or install poezio, please '
+          'install setuptools.\n\nYou will also see a few warnings.\n')
     from distutils.core import setup, Extension
 
 import os
-- 
cgit v1.2.3