Skip to content

Commit 4b509a9

Browse files
jabjudy2k
authored andcommitted
Fix cryptography dependency (#46)
The `cryptography` package is never required directly by the `nexmo` package. Correct `install_requires` so that nexmo requires the `PyJWT[crypto]` dependency (which is how `PyJWT` spells its optional dependency on `cryptography` in its `extras_require`). Now if `PyJWT` ever changes the underlying dependency it uses to implement its optional `crypto` functionality away from `cryptography` to some other library, nexmo will pull the replacement transitive dependency rather than continuing to pull the now-wrong transitive dependency, leaving things in a broken state. `cryptography` *is* directly required by the tests, so add it to `tests_require`.
1 parent ca0e90a commit 4b509a9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

setup.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515
license='MIT',
1616
packages=['nexmo'],
1717
platforms=['any'],
18-
install_requires=['requests', 'PyJWT', 'cryptography'],
18+
install_requires=['requests', 'PyJWT[crypto]'],
19+
tests_require=['cryptography'],
1920
classifiers=[
2021
'Programming Language :: Python',
2122
'Programming Language :: Python :: 2',

0 commit comments

Comments
 (0)