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
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__ = '2.3.20200406'
__version__ = '2.3.20200408'
__license__ = __doc__
__project_url__ = 'http://winpython.github.io/'
9 changes: 9 additions & 0 deletions winpython/data/packages.ini
Original file line number Diff line number Diff line change
Expand Up @@ -2500,3 +2500,12 @@ description = Backport of pathlib-compatible object wrapper for zip files
[z3-solver]
description = an efficient SMT solver library

[umap-learn]
description = Uniform Manifold Approximation and Projection

[tensorboard-plugin-wit]
description = What-If Tool TensorBoard plugin.

[tbb]
description = Intel(R) Threading Building Blocks

15 changes: 15 additions & 0 deletions winpython/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,21 @@ def exec_shell_cmd(args, path):
)
return decode_fs_string(process.stdout.read())

def exec_run_cmd(args, path=None):
"""run a single command (*args* is a list of arguments) in optional *path*"""
# only applicable to Python-3.5+
# python-3.7+ allows to replace "stdout and stderr ", per "capture_output=True"
if path:
process = subprocess.run(args,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
cwd=path)
else:
process = subprocess.run(args,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE)
return decode_fs_string(process.stdout)


def get_r_version(path):
"""Return version of the R installed in *path*"""
Expand Down
7 changes: 5 additions & 2 deletions winpython/wppm.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,12 @@ def get_official_description(name):
dir_path = os.path.dirname(sys.executable)
this = normalize(name)
this_len = len(this)
pip_ask = 'pip search '+ this
pip_ask = ['pip', 'search', this, '--retries', '0']
if len(this)<2: # don't ask stupid things
return ''
try:
pip_res = (utils.exec_shell_cmd(pip_ask, dir_path)+'\n').splitlines()
# .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]
Expand Down