Skip to content

Commit 3de1348

Browse files
committed
Fix python_version operators in PyPI dependency marker parsing
Signed-off-by: Pradeepbeleri <pradpie@gmail.com>
1 parent 384b62a commit 3de1348

3 files changed

Lines changed: 3 additions & 1 deletion

File tree

AUTHORS.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,3 +108,4 @@ The following organizations or individuals have contributed to ScanCode:
108108
- Yash Sharma @yasharmaster
109109
- Yunus Rahbar @yns88
110110
- Stefano Zacchiroli @zacchiro
111+
-Pradeep Beleri @Pradeepbeleri

CHANGELOG.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ Changelog
33

44
Next release
55
--------------
6+
- Fix python_version operator list in PyPI dependency marker parsing to include ``>``, ``!=``, and ``~=``.
67

78
- Fix the optional ``licenses`` extra dependency typo to install
89
``licensedcode-data``.

src/packagedcode/pypi.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2278,7 +2278,7 @@ def get_python_version_os(marker):
22782278
requirement Marker or None.
22792279
"""
22802280
platform_data = {}
2281-
python_version_operators = ['<', '>=', '==', '<=', '<']
2281+
python_version_operators = ['<', '>', '>=', '==', '<=', '!=', '~=']
22822282

22832283
if not marker or not isinstance(marker, markers.Marker):
22842284
return platform_data

0 commit comments

Comments
 (0)