8000 Merge pull request #1120 from stonebig/master · Sadies480/winpython@a88b516 · GitHub
[go: up one dir, main page]

Skip to content

Commit a88b516

Browse files
authored
Merge pull request winpython#1120 from stonebig/master
one re.split to split them all
2 parents 706c117 + 9ad4fae commit a88b516

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

winpython/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,6 @@
2828
OTHER DEALINGS IN THE SOFTWARE.
2929
"""
3030

31-
__version__ = '5.0.20220918'
31+
__version__ = '5.0.20221016'
3232
__license__ = __doc__
3333
__project_url__ = 'http://winpython.github.io/'

winpython/piptree.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# -*- coding: utf-8 -*-
22
import json, sys, re, platform, os
3+
import re
34
from winpython import utils
45
from collections import OrderedDict
56
from pip._vendor.packaging.markers import Marker
@@ -53,7 +54,13 @@ def __init__(self):
5354
if "requires_dist" in meta:
5455
for i in meta["requires_dist"]:
5556
det = (i + ";").split(";")
56-
req_nameextra = normalize((det[0] + " ").split(" ")[0])
57+
58+
# req_nameextra is "python-jose[cryptography]"
59+
# from fastapi "python-jose[cryptography]<4.0.0,>=3.3.0
60+
# req_nameextra is "google-cloud-storage"
61+
# from "google-cloud-storage (<2.0.0,>=1.26.0)
62+
req_nameextra = re.split(' |;|==|!|>|<', det[0]+ ";")[0]
63+
req_nameextra = normalize(req_nameextra)
5764
req_key = normalize((req_nameextra + "[").split("[")[0])
5865
req_key_extra = req_nameextra[len(req_key) + 1 :].split("]")[0]
5966
req_version = det[0][len(req_nameextra) :].translate(replacements)

0 commit comments

Comments
 (0)
0