move deps to extras (#661)

* move deps to extras

* this file is gone
diff --git a/MANIFEST.in b/MANIFEST.in
index 60b7c88..4ff05bf 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -1,4 +1,4 @@
-include             LICENSE MANIFEST.in *.rst tox.ini docs-requirements.txt .coveragerc
+include             LICENSE MANIFEST.in *.rst tox.ini .coveragerc
 exclude             leakcheck
 recursive-include   tests           *.py
 recursive-include   doc             *
diff --git a/docs-requirements.txt b/docs-requirements.txt
deleted file mode 100644
index 8213302..0000000
--- a/docs-requirements.txt
+++ /dev/null
@@ -1,2 +0,0 @@
-sphinx
-sphinx_rtd_theme
diff --git a/setup.py b/setup.py
index 4f30804..afd5fa0 100755
--- a/setup.py
+++ b/setup.py
@@ -99,4 +99,15 @@
             "cryptography>=1.9",
             "six>=1.5.2"
         ],
+        extras_require={
+            "test": [
+                "flaky",
+                "pretend",
+                "pytest>=3.0.1",
+            ],
+            "docs": [
+                "sphinx",
+                "sphinx_rtd_theme",
+            ]
+        },
     )
diff --git a/tox.ini b/tox.ini
index f655009..877146b 100644
--- a/tox.ini
+++ b/tox.ini
@@ -5,11 +5,10 @@
 whitelist_externals =
     openssl
 passenv = ARCHFLAGS CFLAGS LC_ALL LDFLAGS PATH LD_LIBRARY_PATH TERM
+extras =
+    test
 deps =
     coverage>=4.2
-    pytest>=3.0.1
-    pretend
-    flaky
     cryptographyMaster: git+https://github.com/pyca/cryptography.git
     cryptographyMinimum: cryptography<=1.9
 setenv =
@@ -71,7 +70,8 @@
     check-manifest
 
 [testenv:docs]
-deps = -rdocs-requirements.txt
+extras =
+    docs
 basepython = python2.7
 commands =
      sphinx-build -W -b html doc doc/_build/html