Skip to content

Commit 26240cb

Browse files
authored
Merge pull request #97 from AzureAD/allow-portalocker-2
Allow portalocker 2 on Python 3.5+
2 parents 79ba947 + 3c99901 commit 26240cb

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

setup.py

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,17 @@
2222
package_data={'': ['LICENSE']},
2323
install_requires=[
2424
'msal>=0.4.1,<2.0.0',
25-
"portalocker~=1.6;platform_system=='Windows'",
26-
"portalocker~=1.0;platform_system!='Windows'",
25+
26+
# In order to implement these requirements:
27+
# Lowerbound = (1.6 if playform_system == 'Windows' else 1.0)
28+
# Upperbound < (3 if python_version >= '3.5' else 2)
29+
# The following 4 lines use the `and` syntax defined here:
30+
# https://www.python.org/dev/peps/pep-0508/#grammar
31+
"portalocker<3,>=1.0;python_version>='3.5' and platform_system!='Windows'",
32+
"portalocker<2,>=1.0;python_version=='2.7' and platform_system!='Windows'",
33+
"portalocker<3,>=1.6;python_version>='3.5' and platform_system=='Windows'",
34+
"portalocker<2,>=1.6;python_version=='2.7' and platform_system=='Windows'",
35+
2736
"pathlib2;python_version<'3.0'",
2837
## We choose to NOT define a hard dependency on this.
2938
# "pygobject>=3,<4;platform_system=='Linux'",

0 commit comments

Comments
 (0)