Skip to content

Commit

Permalink
Merge pull request #57 from zejn/backends-setup
Browse files Browse the repository at this point in the history
Implement optional backends for python-jose as setup.py extras.
  • Loading branch information
mpdavis authored Jan 16, 2018
2 parents 9b02073 + 8931893 commit fd61439
Showing 1 changed file with 7 additions and 14 deletions.
21 changes: 7 additions & 14 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,17 +22,11 @@ def get_packages(package):
]


def get_install_requires():
if platform.python_implementation() == 'PyPy':
crypto_lib = 'pycryptodome >=3.3.1, <3.4.0'
else:
crypto_lib = 'pycrypto >=2.6.0, <2.7.0'
return [
crypto_lib,
'six <2.0',
'ecdsa <1.0',
'future <1.0',
]
extras_require = {
'cryptography': ['cryptography'],
'pycrypto': ['pycrypto >=2.6.0, <2.7.0'],
'pycryptodome': ['pycryptodome >=3.3.1, <3.4.0'],
}


setup(
Expand Down Expand Up @@ -63,5 +55,6 @@ def get_install_requires():
'Programming Language :: Python :: Implementation :: PyPy',
'Topic :: Utilities',
],
install_requires=get_install_requires()
extras_require=extras_require,
install_requires=['six <2.0', 'ecdsa <1.0', 'future <1.0']
)

0 comments on commit fd61439

Please sign in to comment.