Skip to content

Commit 782faa4

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

196 files changed

Lines changed: 34555 additions & 43576 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

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
Lines changed: 152 additions & 152 deletions
Original file line numberDiff line numberDiff line change
@@ -1,153 +1,153 @@
1-
[
2-
{
3-
"type": "pypi",
4-
"namespace": null,
5-
"name": "atomicwrites",
6-
"version": "1.2.1",
7-
"qualifiers": {},
8-
"subpath": null,
9-
"primary_language": "Python",
10-
"description": "===================\npython-atomicwrites\n===================\nAtomic file writes.",
11-
"release_date": null,
12-
"parties": [
13-
{
14-
"type": "person",
15-
"role": "author",
16-
"name": "Markus Unterwaditzer",
17-
"email": "markus@unterwaditzer.net",
18-
"url": null
19-
}
20-
],
21-
"keywords": [
22-
"Programming Language :: Python :: 2",
23-
"Programming Language :: Python :: 2.7",
24-
"Programming Language :: Python :: 3",
25-
"Programming Language :: Python :: 3.4",
26-
"Programming Language :: Python :: 3.5",
27-
"Programming Language :: Python :: 3.6",
28-
"Programming Language :: Python :: Implementation :: CPython"
29-
],
30-
"homepage_url": "https://github.com/untitaker/python-atomicwrites",
31-
"download_url": null,
32-
"size": null,
33-
"sha1": null,
34-
"md5": null,
35-
"sha256": null,
36-
"sha512": null,
37-
"bug_tracking_url": null,
38-
"code_view_url": null,
39-
"vcs_url": null,
40-
"copyright": null,
41-
"holder": null,
42-
"declared_license_expression": "mit",
43-
"declared_license_expression_spdx": "MIT",
44-
"license_detections": [
45-
{
46-
"license_expression": "mit",
47-
"license_expression_spdx": "MIT",
48-
"matches": [
49-
{
50-
"license_expression": "mit",
51-
"license_expression_spdx": "MIT",
52-
"from_file": null,
53-
"start_line": 1,
54-
"end_line": 1,
55-
"matcher": "1-spdx-id",
56-
"score": 100.0,
57-
"matched_length": 1,
58-
"match_coverage": 100.0,
59-
"rule_relevance": 100,
60-
"rule_identifier": "spdx-license-identifier-mit-5da48780aba670b0860c46d899ed42a0f243ff06",
61-
"rule_url": null,
62-
"matched_text": "MIT"
63-
}
64-
],
65-
"identifier": "mit-a822f434-d61f-f2b1-c792-8b8cb9e7b9bf"
66-
},
67-
{
68-
"license_expression": "mit",
69-
"license_expression_spdx": "MIT",
70-
"matches": [
71-
{
72-
"license_expression": "mit",
73-
"license_expression_spdx": "MIT",
74-
"from_file": null,
75-
"start_line": 1,
76-
"end_line": 1,
77-
"matcher": "1-hash",
78-
"score": 100.0,
79-
"matched_length": 5,
80-
"match_coverage": 100.0,
81-
"rule_relevance": 100,
82-
"rule_identifier": "pypi_mit_license.RULE",
83-
"rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/pypi_mit_license.RULE",
84-
"matched_text": "- 'License :: OSI Approved :: MIT License'"
85-
}
86-
],
87-
"identifier": "mit-24a5293c-14d7-5403-efac-1a8b7532c0e8"
88-
}
89-
],
90-
"other_license_expression": null,
91-
"other_license_expression_spdx": null,
92-
"other_license_detections": [],
93-
"extracted_license_statement": "license: MIT\nclassifiers:\n - 'License :: OSI Approved :: MIT License'\n",
94-
"notice_text": null,
95-
"source_packages": [],
96-
"file_references": [
97-
{
98-
"path": "atomicwrites/__init__.py",
99-
"size": 6428,
100-
"sha1": null,
101-
"md5": null,
102-
"sha256": "e99fd5a033165d8a870e730383a30199798cc5fd31194cec120b616d8f59c71c",
103-
"sha512": null,
104-
"extra_data": {}
105-
},
106-
{
107-
"path": "atomicwrites-1.2.1.dist-info/METADATA",
108-
"size": 5535,
109-
"sha1": null,
110-
"md5": null,
111-
"sha256": "0289c810b3daea2a81801eac17154b464b8eb7b34c5ae2c8de6706d18205a358",
112-
"sha512": null,
113-
"extra_data": {}
114-
},
115-
{
116-
"path": "atomicwrites-1.2.1.dist-info/RECORD",
117-
"size": null,
118-
"sha1": null,
119-
"md5": null,
120-
"sha256": null,
121-
"sha512": null,
122-
"extra_data": {}
123-
},
124-
{
125-
"path": "atomicwrites-1.2.1.dist-info/WHEEL",
126-
"size": 110,
127-
"sha1": null,
128-
"md5": null,
129-
"sha256": "81dbae3f206f149412434cddcb117b934cf29c35db21bbe0e59047a17ba6e6e9",
130-
"sha512": null,
131-
"extra_data": {}
132-
},
133-
{
134-
"path": "atomicwrites-1.2.1.dist-info/top_level.txt",
135-
"size": 13,
136-
"sha1": null,
137-
"md5": null,
138-
"sha256": "92ceb8cca55492b97666bacfd38e82b32b5795219ff202c6f887285e93727a87",
139-
"sha512": null,
140-
"extra_data": {}
141-
}
142-
],
143-
"is_private": false,
144-
"is_virtual": false,
145-
"extra_data": {},
146-
"dependencies": [],
147-
"repository_homepage_url": "https://pypi.org/project/atomicwrites",
148-
"repository_download_url": "https://pypi.org/packages/source/a/atomicwrites/atomicwrites-1.2.1.tar.gz",
149-
"api_data_url": "https://pypi.org/pypi/atomicwrites/1.2.1/json",
150-
"datasource_id": "pypi_wheel",
151-
"purl": "pkg:pypi/atomicwrites@1.2.1"
152-
}
1+
[
2+
{
3+
"type": "pypi",
4+
"namespace": null,
5+
"name": "atomicwrites",
6+
"version": "1.2.1",
7+
"qualifiers": {},
8+
"subpath": null,
9+
"primary_language": "Python",
10+
"description": "===================\npython-atomicwrites\n===================\nAtomic file writes.",
11+
"release_date": null,
12+
"parties": [
13+
{
14+
"type": "person",
15+
"role": "author",
16+
"name": "Markus Unterwaditzer",
17+
"email": "markus@unterwaditzer.net",
18+
"url": null
19+
}
20+
],
21+
"keywords": [
22+
"Programming Language :: Python :: 2",
23+
"Programming Language :: Python :: 2.7",
24+
"Programming Language :: Python :: 3",
25+
"Programming Language :: Python :: 3.4",
26+
"Programming Language :: Python :: 3.5",
27+
"Programming Language :: Python :: 3.6",
28+
"Programming Language :: Python :: Implementation :: CPython"
29+
],
30+
"homepage_url": "https://github.com/untitaker/python-atomicwrites",
31+
"download_url": null,
32+
"size": null,
33+
"sha1": null,
34+
"md5": null,
35+
"sha256": null,
36+
"sha512": null,
37+
"bug_tracking_url": null,
38+
"code_view_url": null,
39+
"vcs_url": null,
40+
"copyright": null,
41+
"holder": null,
42+
"declared_license_expression": "mit",
43+
"declared_license_expression_spdx": "MIT",
44+
"license_detections": [
45+
{
46+
"license_expression": "mit",
47+
"license_expression_spdx": "MIT",
48+
"matches": [
49+
{
50+
"license_expression": "mit",
51+
"license_expression_spdx": "MIT",
52+
"from_file": null,
53+
"start_line": 1,
54+
"end_line": 1,
55+
"matcher": "1-spdx-id",
56+
"score": 100.0,
57+
"matched_length": 1,
58+
"match_coverage": 100.0,
59+
"rule_relevance": 100,
60+
"rule_identifier": "spdx-license-identifier-mit-5da48780aba670b0860c46d899ed42a0f243ff06",
61+
"rule_url": null,
62+
"matched_text": "MIT"
63+
}
64+
],
65+
"identifier": "mit-a822f434-d61f-f2b1-c792-8b8cb9e7b9bf"
66+
},
67+
{
68+
"license_expression": "mit",
69+
"license_expression_spdx": "MIT",
70+
"matches": [
71+
{
72+
"license_expression": "mit",
73+
"license_expression_spdx": "MIT",
74+
"from_file": null,
75+
"start_line": 1,
76+
"end_line": 1,
77+
"matcher": "1-hash",
78+
"score": 100.0,
79+
"matched_length": 5,
80+
"match_coverage": 100.0,
81+
"rule_relevance": 100,
82+
"rule_identifier": "pypi_mit_license.RULE",
83+
"rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/pypi_mit_license.RULE",
84+
"matched_text": "- 'License :: OSI Approved :: MIT License'"
85+
}
86+
],
87+
"identifier": "mit-24a5293c-14d7-5403-efac-1a8b7532c0e8"
88+
}
89+
],
90+
"other_license_expression": null,
91+
"other_license_expression_spdx": null,
92+
"other_license_detections": [],
93+
"extracted_license_statement": "license: MIT\nclassifiers:\n - 'License :: OSI Approved :: MIT License'\n",
94+
"notice_text": null,
95+
"source_packages": [],
96+
"file_references": [
97+
{
98+
"path": "atomicwrites/__init__.py",
99+
"size": 6428,
100+
"sha1": null,
101+
"md5": null,
102+
"sha256": "e99fd5a033165d8a870e730383a30199798cc5fd31194cec120b616d8f59c71c",
103+
"sha512": null,
104+
"extra_data": {}
105+
},
106+
{
107+
"path": "atomicwrites-1.2.1.dist-info/METADATA",
108+
"size": 5535,
109+
"sha1": null,
110+
"md5": null,
111+
"sha256": "0289c810b3daea2a81801eac17154b464b8eb7b34c5ae2c8de6706d18205a358",
112+
"sha512": null,
113+
"extra_data": {}
114+
},
115+
{
116+
"path": "atomicwrites-1.2.1.dist-info/RECORD",
117+
"size": null,
118+
"sha1": null,
119+
"md5": null,
120+
"sha256": null,
121+
"sha512": null,
122+
"extra_data": {}
123+
},
124+
{
125+
"path": "atomicwrites-1.2.1.dist-info/WHEEL",
126+
"size": 110,
127+
"sha1": null,
128+
"md5": null,
129+
"sha256": "81dbae3f206f149412434cddcb117b934cf29c35db21bbe0e59047a17ba6e6e9",
130+
"sha512": null,
131+
"extra_data": {}
132+
},
133+
{
134+
"path": "atomicwrites-1.2.1.dist-info/top_level.txt",
135+
"size": 13,
136+
"sha1": null,
137+
"md5": null,
138+
"sha256": "92ceb8cca55492b97666bacfd38e82b32b5795219ff202c6f887285e93727a87",
139+
"sha512": null,
140+
"extra_data": {}
141+
}
142+
],
143+
"is_private": false,
144+
"is_virtual": false,
145+
"extra_data": {},
146+
"dependencies": [],
147+
"repository_homepage_url": "https://pypi.org/project/atomicwrites",
148+
"repository_download_url": "https://pypi.org/packages/source/a/atomicwrites/atomicwrites-1.2.1.tar.gz",
149+
"api_data_url": "https://pypi.org/pypi/atomicwrites/1.2.1/json",
150+
"datasource_id": "pypi_wheel",
151+
"purl": "pkg:pypi/atomicwrites@1.2.1"
152+
}
153153
]

0 commit comments

Comments
 (0)