8000 Merge pull request #1320 from stonebig/master · winpython/winpython@590977a · GitHub
[go: up one dir, main page]

Skip to content

Commit 590977a

Browse files
authored
Merge pull request #1320 from stonebig/master
pip search is gone
2 parents 2774808 + 5ad2d1f commit 590977a

File tree

2 files changed

+2
-29
lines changed

2 files changed

+2
-29
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__ = '7.5.20240410'
31+
__version__ = '7.6.20240427'
3232
__license__ = __doc__
3333
__project_url__ = 'http://winpython.github.io/'

winpython/wppm.py

Lines changed: 1 addition & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -49,29 +49,6 @@ def normalize(name):
4949
return re.sub(r"[-_.]+", "-", name).lower()
5050

5151

52-
def get_official_description(name):
53-
"""Extract package Summary description from pypi.org"""
54-
from winpython import utils
55-
56-
this = normalize(name)
57-
this_len = len(this)
58-
pip_ask = ["pip", "search", this, "--retries", "0"]
59-
if len(this) < 2: # don't ask stupid things
60-
return ""
61-
try:
62-
# .run work when .popen fails when no internet
63-
pip_res = (utils.exec_run_cmd(pip_ask) + "\n").splitlines()
64-
pip_filter = [
65-
l
66-
for l in pip_res
67-
if this + " (" == normalize(l[:this_len]) + l[this_len : this_len + 2]
68-
]
69-
pip_desc = (pip_filter[0][len(this) + 1 :]).split(" - ", 1)[1]
70-
return pip_desc.replace("://", " ")
71-
except:
72-
return ""
73-
74-
7552
def get_package_metadata(database, name, gotoWWW=False, update=False):
7653
"""Extract infos (description, url) from the local database"""
7754
# Note: we could use the PyPI database but this has been written on
@@ -104,11 +81,7 @@ def get_package_metadata(database, name, gotoWWW=False, update=False):
10481
).splitlines()[0]
10582
except:
10683
pass
107-
if my_metadata["description"] == "" and gotoWWW:
108-
# still nothing, try look on pypi
109-
the_official = get_official_description(name)
110-
if the_official != "":
111-
my_metadata["description"] = the_official
84+
11285
if update == True and db_desc == "" and my_metadata["description"] != "":
11386
# we add new findings in our packgages.ini list, if it's required
11487
try:

0 commit comments

Comments
 (0)
0