Skip to content

Commit

Permalink
Set a diferent criptografy for python 3.5.
Browse files Browse the repository at this point in the history
Python 3.5 will continue exposed to Fixed CVE-2020-36242.

It is not recomented to keep on 3.5.

Fixes: candango#84
  • Loading branch information
piraz committed Feb 20, 2021
1 parent d899b29 commit 390515c
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 4 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright 2019-2020 Flavio Garcia
Copyright 2019-2021 Flavio Garcia
Copyright 2016-2017 Veeti Paananen under MIT License

Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
2 changes: 2 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@ include CHANGELOG.md
include README.md
include LICENSE
include requirements/basic.txt
include requirements/cryptography.txt
include requirements/cryptography_legacy.txt
1 change: 0 additions & 1 deletion requirements/basic.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
cartola==0.10
cryptography==3.4.4
requests==2.25.1
1 change: 1 addition & 0 deletions requirements/cryptography.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
cryptography==3.4.6
1 change: 1 addition & 0 deletions requirements/cryptography_legacy.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
cryptography==3.2.1
1 change: 1 addition & 0 deletions requirements/development.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
-r basic.txt
-r tests.txt
-r cryptography.txt
14 changes: 12 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env python
#
# Copyright 2019-2020 Flavio Garcia
# Copyright 2019-2021 Flavio Garcia
# Copyright 2016-2017 Veeti Paananen under MIT License
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand Down Expand Up @@ -48,6 +48,14 @@ def resolve_requires(requirements_file):
return [str(pr.requirement) for pr in requirements]


def use_right_cryptography(requirements):
cryptography_req = "requirements/cryptography.txt"
if sys.version_info.minor < 6:
cryptography_req = "requirements/cryptography_legacy.txt"
requirements.append(resolve_requires(cryptography_req)[0])
return requirements


setup(
name="automatoes",
version=automatoes.get_version(),
Expand All @@ -74,7 +82,9 @@ def resolve_requires(requirements_file):
"Programming Language :: Python :: 3 :: Only",
],
packages=["automatoes"],
install_requires=resolve_requires("requirements/basic.txt"),
install_requires=use_right_cryptography(
resolve_requires("requirements/basic.txt")
),
entry_points={
'console_scripts': [
"automatoes = automatoes.cli:automatoes_main",
Expand Down

0 comments on commit 390515c

Please sign in to comment.