Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
one re.split to split them all
surviving toml
  • Loading branch information
stonebig committed Oct 16, 2022
commit 9ad4faedb051e5f80df2f847c2466b9aadd973ae
2 changes: 1 addition & 1 deletion winpython/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@
OTHER DEALINGS IN THE SOFTWARE.
"""

__version__ = '5.0.20220918'
__version__ = '5.0.20221016'
__license__ = __doc__
__project_url__ = 'http://winpython.github.io/'
9 changes: 8 additions & 1 deletion winpython/piptree.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# -*- coding: utf-8 -*-
import json, sys, re, platform, os
import re
from winpython import utils
from collections import OrderedDict
from pip._vendor.packaging.markers import Marker
Expand Down Expand Up @@ -53,7 +54,13 @@ def __init__(self):
if "requires_dist" in meta:
for i in meta["requires_dist"]:
det = (i + ";").split(";")
req_nameextra = normalize((det[0] + " ").split(" ")[0])

# req_nameextra is "python-jose[cryptography]"
# from fastapi "python-jose[cryptography]<4.0.0,>=3.3.0
# req_nameextra is "google-cloud-storage"
# from "google-cloud-storage (<2.0.0,>=1.26.0)
req_nameextra = re.split(' |;|==|!|>|<', det[0]+ ";")[0]
req_nameextra = normalize(req_nameextra)
req_key = normalize((req_nameextra + "[").split("[")[0])
req_key_extra = req_nameextra[len(req_key) + 1 :].split("]")[0]
req_version = det[0][len(req_nameextra) :].translate(replacements)
Expand Down