-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Unpin wheel version, update CI check #1462
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 15 commits
6ccefc1
93ac7c0
776c4a4
0a658dc
3011de0
91ad1ec
a93d1db
94a6614
2966477
3accd8e
9796d83
8c38351
6d21d72
ae26dd6
5e8de4e
1224df2
e93953c
8efe992
73928e0
4d80e92
0bc0b0c
681775a
8bd35ed
a9a5a51
9a809eb
d56c776
087da1a
622c11b
7690447
b56a1fa
27238a6
5c26721
7862bf0
d904703
e0700d8
666bab7
a67b5e0
c6506f9
d8e672e
29eb7ad
f737485
25e160b
d9589f9
660a5e5
17b6c96
09eecf8
581cb60
54e0ed2
850f6aa
56a867c
e99c137
5b84f75
8877ae4
81d264d
3d97c71
3360eca
73dfe9e
5cfc900
85c8cbf
4c707a0
5e3d07c
69c7333
12e0bd9
246ec8e
f40506c
285a0b5
d597d8e
9528c6a
35b244f
3ede273
2fc19bd
14799ae
e6c21fd
6827793
71449ed
0f9aa58
51f8b5d
1ce82b0
13404e3
d6aad6c
78df589
2d844dd
f178285
1884169
2fb2d14
1eb927c
880774b
0b1ac90
14ec628
5926f06
5cbe47c
e489082
9d60981
fca378c
3d46998
cf586cc
b0872b7
9f022a0
df2ecf4
f928d72
bffd137
5db8ce5
01d4407
5cf8340
94df344
db1f4bd
5ed8f5d
9943139
feb1883
fb40791
8a92c0c
df6806d
87cbfa1
6bb06a7
5477901
90324a2
eb42ccb
da97509
a2bdac4
2d9abba
1fc55a7
3817b4d
eaabc53
b332df7
6340bec
88f26c6
0fa6259
83c907f
d152509
c29efb3
2e0de39
5d3ff16
fb749b5
ddefab4
35f599f
28c7c8f
bf87b15
51b9957
df1200f
cde8c82
d14c6b1
f1734ee
e456291
21252b2
32ee9fe
4f6ff13
9cedcc2
ab00f0f
ed5a218
3a804af
63f9cca
ae5e1d6
82331e8
5e26c75
c73501c
96dcf6c
cf35013
ff2b39c
201c113
6c5a05f
416e3ae
91f5e0d
6b599ff
68d9ebe
7a352fb
941ab62
17c1be2
dcdb8b8
be5a94c
dc7e9c4
78959c6
c2a49e1
3880c47
fb438f9
013f537
255d968
b6f5631
4c8c32a
6b81970
cecdccf
1a8cad4
9aaab3f
2174e1d
e186177
6a17c10
179353d
1396d6e
a1cef3c
898d740
a83176c
0d0015f
c96eec7
865ed56
07ed3d5
b34c031
3dd4b81
e5e12b1
b0412dd
7dc5bf8
6f4d06b
71b23f2
fb6e9f3
3758592
8bbb604
14b956c
894f73c
4b77531
f576e0e
c729423
92b5316
d3b3fba
860f3d3
a6e3865
11751e5
54e0ec2
8aaf507
a568934
06e33d2
be1cc53
91fbfac
32e83ad
e6df939
8f97972
d874fa0
e6387d1
b543085
33a3efa
a2baf74
28476a6
2b4580d
e5ba1ba
19afa50
483a8cf
0994adc
2e1e476
550af6b
ab131b8
3b9af5e
1282ce6
727c051
a7b8926
dc7b642
4b3eaac
a51b5b4
249216f
256d965
17a54b4
7b37cc7
9768c03
14faf67
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6,7 +6,6 @@ | |
| import os | ||
| import json | ||
| import zipfile | ||
| from wheel.install import WHEEL_INFO_RE | ||
|
|
||
| # Dependencies that will not be checked. | ||
| # This is for packages starting with 'azure-' but do not use the 'azure' namespace. | ||
|
|
@@ -43,24 +42,28 @@ def _get_azext_metadata(ext_dir): | |
| return azext_metadata | ||
|
|
||
|
|
||
| def get_ext_metadata(ext_dir, ext_file, ext_name): | ||
| # Modification of https://github.com/Azure/azure-cli/blob/dev/src/azure-cli-core/azure/cli/core/extension.py#L89 | ||
| WHL_METADATA_FILENAME = 'metadata.json' | ||
| def get_ext_metadata(ext_dir, ext_file): | ||
| from pkginfo import Wheel | ||
|
|
||
| zip_ref = zipfile.ZipFile(ext_file, 'r') | ||
| zip_ref.extractall(ext_dir) | ||
| zip_ref.close() | ||
| metadata = {} | ||
| dist_info_dirs = [f for f in os.listdir(ext_dir) if f.endswith('.dist-info')] | ||
| azext_metadata = _get_azext_metadata(ext_dir) | ||
| if azext_metadata: | ||
| metadata.update(azext_metadata) | ||
| for dist_info_dirname in dist_info_dirs: | ||
| parsed_dist_info_dir = WHEEL_INFO_RE(dist_info_dirname) | ||
| if parsed_dist_info_dir and parsed_dist_info_dir.groupdict().get('name') == ext_name.replace('-', '_'): | ||
| whl_metadata_filepath = os.path.join(ext_dir, dist_info_dirname, WHL_METADATA_FILENAME) | ||
| if os.path.isfile(whl_metadata_filepath): | ||
| with open(whl_metadata_filepath) as f: | ||
| metadata.update(json.load(f)) | ||
|
|
||
| try: | ||
| ext_wheel = Wheel(ext_file) | ||
|
|
||
| t = vars(ext_wheel) | ||
| del t['filename'] | ||
| del t['description'] # del as description is trivial | ||
|
|
||
| metadata.update(t) | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I remember there was some example metadata shown, in another PR?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The description is unnecessary and sometimes is very long, the content don't contribute to src/index.json. So I remove the property. |
||
| except ValueError: | ||
| raise '{} is not a valid wheel'.format(ext_file) | ||
|
|
||
| return metadata | ||
|
|
||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -941,7 +941,7 @@ | |
| }, | ||
| "extras": [], | ||
| "generator": "bdist_wheel (0.30.0)", | ||
| "license": "Proprietary https://aka.ms/azureml-preview-sdk-license ", | ||
| "license": "Proprietary https://aka.ms/azureml-preview-sdk-license", | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is autogenerated. So I guess this will be reverted once there's a new version of azure-cli-ml. |
||
| "metadata_version": "2.0", | ||
| "name": "azure-cli-ml", | ||
| "requires_python": ">=3.5,<4", | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not considering breaking change versions for wheel and pkginfo?
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As for wheel, I am not wrong about the breaking change unless the PEP related the Python Package. The latest and unresolved PEP about this is PEP 491, but it seems won'
t introduce any breaking change, it's an enhancement.
As for pkginfo, I am a bit concerned about it, because it's onboard on Ubuntu Launch Code with little issues and invisible about the development activity.
So, if we relax the majon version of wheel and pkginfo can't keep up with the latest PEP version, that's a risk.
But considering the PEP process, it won't be a problem for a long while.