diff options
author | Alex Gaynor <alex.gaynor@gmail.com> | 2016-02-13 22:24:15 -0500 |
---|---|---|
committer | Alex Gaynor <alex.gaynor@gmail.com> | 2016-02-13 22:24:15 -0500 |
commit | a78988561896173ee62ae983acbcbaad760c6d6f (patch) | |
tree | c915f4571e3a7b3cb34f2c816e0ee60a335f57d3 | |
parent | 37c26f8779f17d9c078ec23e64931c30edd23926 (diff) | |
parent | 9a5236cec465c5a563a9f235b12e600286c61ea7 (diff) | |
download | py-bcrypt-git-a78988561896173ee62ae983acbcbaad760c6d6f.tar.gz |
Merge pull request #59 from reaperhulk/fix-49-docs
raise a decent error if pypy <2.6 + update README
-rw-r--r-- | README.rst | 2 | ||||
-rw-r--r-- | setup.py | 9 |
2 files changed, 10 insertions, 1 deletions
@@ -105,7 +105,7 @@ Compatibility ------------- This library should be compatible with py-bcrypt and it will run on Python -2.6+, 3.3+, and PyPy. +2.6+, 3.3+, and PyPy 2.6+. Security -------- @@ -1,4 +1,5 @@ #!/usr/bin/env python +import platform import sys from distutils.command.build import build @@ -22,6 +23,14 @@ with open("src/bcrypt/__about__.py") as fp: exec(fp.read(), __about__) +if platform.python_implementation() == "PyPy": + if sys.pypy_version_info < (2, 6): + raise RuntimeError( + "bcrypt is not compatible with PyPy < 2.6. Please upgrade PyPy to " + "use this library." + ) + + class PyTest(test): def finalize_options(self): test.finalize_options(self) |