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
23 changes: 19 additions & 4 deletions winpython/data/packages.ini
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,9 @@ description=tools for machine learning and data mining in Astronomy
[astropy]
description=Community-developed python astronomy tools

[astunparse]
description=An AST unparser for Python

[async_generator]
description=Async generators and context managers for Python 3.5+

Expand Down Expand Up @@ -488,15 +491,18 @@ description=Removes commented-out code.
[falcon]
description=An unladen web framework for building APIs and app backends.

[fastcache]
description=C implementation of Python 3 functools.lru_cache
[fast-histogram]
description=Fast 1D and 2D histogram functions in Python

[fastai]
description=fastai makes deep learning with PyTorch faster, more accurate, and easier

[fastapi]
description=FastAPI framework, high performance, easy to learn, fast to code, ready for production

[fastcache]
description=C implementation of Python 3 functools.lru_cache

[fasteners]
description=A python package that provides useful locks.

Expand All @@ -509,8 +515,8 @@ description=A nested progress with plotting options for fastai
[fastrlock]
description=A fast RLock implementation for CPython

[fast-histogram]
description=Fast 1D and 2D histogram functions in Python
[fastscript]
description=A fast way to turn your python function into a script

[fbprophet]
description=Automatic Forecasting Procedure
Expand Down Expand Up @@ -1139,6 +1145,9 @@ description=Converting Jupyter Notebooks
[nbconvert_reportlab]
description=Convert notebooks to PDF using Reportlab

[nbdev]
description=Writing a library entirely in notebooks

[nbdime]
description=Tools for diffing and merging of Jupyter notebooks

Expand All @@ -1160,6 +1169,9 @@ description=Dynamic types for data description and in-memory computations
[netcdftime]
description=Time-handling functionality from netcdf4-python

[nest_asyncio]
description=Patch asyncio to allow nested event loops

[netcdf4]
description=Provides an object-oriented python interface to the netCDF version 4 library

Expand Down Expand Up @@ -2213,6 +2225,9 @@ description=TensorFlow is an open source machine learning framework for everyone
[tensorflow_estimator]
description=TensorFlow Estimator.

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

[tensorflow-probability]
description=Probabilistic modeling and statistical inference in TensorFlow

Expand Down
26 changes: 21 additions & 5 deletions winpython/wppm.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,17 @@
from argparse import ArgumentParser
from winpython import py3compat


# import information reader
# importlib_metadata before Python 3.8
try:
from importlib import metadata as metadata # Python-3.8
metadata = metadata.metadata
except:
try:
from importlib_metadata import metadata # <Python-3.8
except:
metadata = None # nothing available

# Workaround for installing PyVISA on Windows from source:
os.environ['HOME'] = os.environ['USERPROFILE']

Expand All @@ -43,11 +53,11 @@ def get_package_metadata(database, name):
# machine which is not connected to the internet
db = cp.ConfigParser()
db.readfp(open(osp.join(DATA_PATH, database)))
metadata = dict(
my_metadata = dict(
description='',
url='https://pypi.org/project/' + name,
)
for key in metadata:
for key in my_metadata:
name1 = name.lower()
# wheel replace '-' per '_' in key
for name2 in (
Expand All @@ -58,11 +68,17 @@ def get_package_metadata(database, name):
normalize(name),
):
try:
metadata[key] = db.get(name2, key)
my_metadata[key] = db.get(name2, key)
break
except (cp.NoSectionError, cp.NoOptionError):
pass
return metadata
if my_metadata.get('description') == '' and metadata: # nothing in package.ini
try:
my_metadata['description']=(
metadata(name)['Summary']+'\n').splitlines()[0]
except:
pass
return my_metadata


class BasePackage(object):
Expand Down