aboutsummaryrefslogtreecommitdiffstats
path: root/setup.py
diff options
context:
space:
mode:
authorAlex Gaynor <alex.gaynor@gmail.com>2017-10-28 11:28:53 -0400
committerPaul Kehrer <paul.l.kehrer@gmail.com>2017-10-28 10:28:53 -0500
commit4941fc5c01cf1222ce04d1389e5821fea40a8c76 (patch)
tree3a79d1844a659a636a529c5d1cc0e2e9977ecb18 /setup.py
parentd3b9af67aeaee5039f2acc5ffdd35a508bcf94cf (diff)
downloadcryptography-4941fc5c01cf1222ce04d1389e5821fea40a8c76.tar.gz
cryptography-4941fc5c01cf1222ce04d1389e5821fea40a8c76.tar.bz2
cryptography-4941fc5c01cf1222ce04d1389e5821fea40a8c76.zip
clearly error out on older setuptools (#4000)
* clearly error out on older setuptools * use the right thing
Diffstat (limited to 'setup.py')
-rw-r--r--setup.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/setup.py b/setup.py
index 598643b6..2f32c766 100644
--- a/setup.py
+++ b/setup.py
@@ -14,11 +14,21 @@ from distutils.command.build import build
import pkg_resources
+import setuptools
from setuptools import find_packages, setup
from setuptools.command.install import install
from setuptools.command.test import test
+if (
+ pkg_resources.parse_version(setuptools.__version__) <
+ pkg_resources.parse_version("18.5")
+):
+ raise RuntimeError(
+ "cryptography requires setuptools 18.5 or newer, please upgrade to a "
+ "newer version of setuptools"
+ )
+
base_dir = os.path.dirname(__file__)
src_dir = os.path.join(base_dir, "src")