Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
pycrypto
pycryptodome
six
future
23 changes: 18 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@

import jose

import platform

from setuptools import setup


Expand All @@ -24,11 +22,26 @@ def get_packages(package):
]


def on_google_appengine():
"""
Check if running on google appengine.
Will also return True on the GAE testbed.
"""
try:
from google import appengine
# satisfy pyflakes, but if this is falsey, that's weird...
if appengine:
return True
except ImportError:
pass
return False


def get_install_requires():
if platform.python_implementation() == 'PyPy':
crypto_lib = 'pycryptodome >=3.3.1, <3.4.0'
else:
crypto_lib = 'pycryptodome >=3.3.1, <3.4.0'
if on_google_appengine():
crypto_lib = 'pycrypto >=2.6.0, <2.7.0'

return [
crypto_lib,
'six <2.0',
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ commands =
py.test --cov-report term-missing --cov jose
deps =
future
pycrypto
pycryptodome
ecdsa
pytest
pytest-cov
Expand Down