8000 pip search is gone by stonebig · Pull Request #1320 · winpython/winpython · GitHub
[go: up one dir, main page]

Skip to content

pip search is gone #1320

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

Merged
merged 1 commit into from
Apr 28, 2024
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
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__ = '7.5.20240410'
__version__ = '7.6.20240427'
__license__ = __doc__
__project_url__ = 'http://winpython.github.io/'
29 changes: 1 addition & 28 deletions winpython/wppm.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,29 +49,6 @@ def normalize(name):
return re.sub(r"[-_.]+", "-", name).lower()


def get_official_description(name):
"""Extract package Summary description from pypi.org"""
from winpython import utils

this = normalize(name)
this_len = len(this)
pip_ask = ["pip", "search", this, "--retries", "0"]
if len(this) < 2: # don't ask stupid things
return ""
try:
# .run work when .popen fails when no internet
pip_res = (utils.exec_run_cmd(pip_ask) + "\n").splitlines()
pip_filter = [
l
for l in pip_res
if this + " (" == normalize(l[:this_len]) + l[this_len : this_len + 2]
]
pip_desc = (pip_filter[0][len(this) + 1 :]).split(" - ", 1)[1]
return pip_desc.replace("://", " ")
except:
return ""


def get_package_metadata(database, name, gotoWWW=False, update=False):
"""Extract infos (description, url) from the local database"""
# Note: we could use the PyPI database but this has been written on
Expand Down Expand Up @@ -104,11 +81,7 @@ def get_package_metadata(database, name, gotoWWW=False, update=False):
).splitlines()[0]
except:
pass
if my_metadata["description"] == "" and gotoWWW:
# still nothing, try look on pypi
the_official = get_official_description(name)
if the_official != "":
my_metadata["description"] = the_official

if update == True and db_desc == "" and my_metadata["description"] != "":
# we add new findings in our packgages.ini list, if it's required
try:
Expand Down
0