Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit5f5073a

Browse files
authored
Merge pull request#835 from stonebig/master
bug fix
2 parentsf7f1eee +166de9d commit5f5073a

File tree

3 files changed

+77
-32
lines changed

3 files changed

+77
-32
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__='2.3.20200408'
31+
__version__='2.3.20200410'
3232
__license__=__doc__
3333
__project_url__='http://winpython.github.io/'

‎winpython/data/packages.ini

Lines changed: 48 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -533,7 +533,7 @@ description = Fiona reads and writes spatial data files
533533
description = the modular source code checker: pep8, pyflakes and co
534534
535535
[flask]
536-
description = Amicroframework based on Werkzeug, Jinja2 and good intentions
536+
description = Asimple framework for building complex web applications.
537537
538538
[flaskerize]
539539
description = Python CLI build/dev tool for templated code generation and project modification. Think Angular schematics for Python.
@@ -842,7 +842,7 @@ description = Differentiate, compile, and transform Numpy code.
842842
description = An autocompletion tool for Python that can be used for text editors.
843843
844844
[jinja2]
845-
description = Averyfast andexpressivetemplate engine.
845+
description = Asmall butfast andeasy to use stand-alonetemplate engine written in pure python.
846846
847847
[jmespath]
848848
description = JSON Matching Expressions
@@ -2155,7 +2155,7 @@ description = Plugin for the Spyder IDE that integrates the Python memory profil
21552155
description = A plugin to run the autopep8 python linter from within the spyder editor
21562156
21572157
[sqlalchemy]
2158-
description =SQL Toolkit and Object Relational Mapper
2158+
description =Database Abstraction Library
21592159
21602160
[sqlite-bro]
21612161
description = a graphic SQLite Client in 1 Python file
@@ -2509,3 +2509,48 @@ description = What-If Tool TensorBoard plugin.
25092509
[tbb]
25102510
description = Intel(R) Threading Building Blocks
25112511

2512+
[geemap]
2513+
description = A Python package for interactive mapping using Google Earth Engine and ipyleaflet
2514+
2515+
[earthengine-api]
2516+
description = Earth Engine Python API
2517+
2518+
[ipynb-py-convert]
2519+
description = Convert .py files runnable in VSCode/Python or Atom/Hydrogen to jupyter .ipynb notebooks and vice versa
2520+
2521+
[google-cloud-storage]
2522+
description = Google Cloud Storage API client library
2523+
2524+
[google-auth-httplib2]
2525+
description = Google Authentication Library: httplib2 transport
2526+
2527+
[httplib2shim]
2528+
description = A wrapper over urllib3 that matches httplib2's interface
2529+
2530+
[google-cloud-core]
2531+
description = Google Cloud API client core library
2532+
2533+
[google-resumable-media]
2534+
description = Utilities for Google Media Downloads and Resumable Uploads
2535+
2536+
[google-api-core]
2537+
description = Google API client core library
2538+
2539+
[googleapis-common-protos]
2540+
description = Common protobufs used in Google APIs
2541+
2542+
[pipenv]
2543+
description = Python Development Workflow for Humans.
2544+
2545+
[virtualenv-clone]
2546+
description = script to clone virtualenvs.
2547+
2548+
[virtualenv]
2549+
description = Virtual Python Environment builder
2550+
2551+
[distlib]
2552+
description = Distribution utilities
2553+
2554+
[flask-sqlalchemy]
2555+
description = Adds SQLAlchemy support to your Flask application.
2556+

‎winpython/wppm.py

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -44,25 +44,26 @@
4444

4545
# pep503 defines normalized package names: www.python.org/dev/peps/pep-0503
4646
defnormalize(name):
47+
""" return normalized (unique) name of a package"""
4748
returnre.sub(r"[-_.]+","-",name).lower()
4849

4950
defget_official_description(name):
50-
fromwinpythonimportutils
51-
dir_path=os.path.dirname(sys.executable)
52-
this=normalize(name)
53-
this_len=len(this)
54-
pip_ask= ['pip','search',this,'--retries','0']
55-
iflen(this)<2:# don't ask stupid things
56-
return''
57-
try:
58-
# .run work when .popen fails when no internet
59-
pip_res= (utils.exec_run_cmd(pip_ask)+'\n').splitlines()
60-
pip_filter= [lforlinpip_resifthis+" ("==
61-
normalize(l[:this_len])+l[this_len:this_len+2]]
62-
pip_desc= (pip_filter[0][len(this)+1:]).split(" - ",1)[1]
63-
returnpip_desc.replace("://"," ")
64-
except:
65-
return''
51+
"""Extract package Summary description frompypi.org"""
52+
fromwinpythonimportutils
53+
this=normalize(name)
54+
this_len=len(this)
55+
pip_ask= ['pip','search',this,'--retries','0']
56+
iflen(this)<2:# don't ask stupid things
57+
return''
58+
try:
59+
# .run work when .popen fails when no internet
60+
pip_res= (utils.exec_run_cmd(pip_ask)+'\n').splitlines()
61+
pip_filter= [lforlinpip_resifthis+" ("==
62+
normalize(l[:this_len])+l[this_len:this_len+2]]
63+
pip_desc= (pip_filter[0][len(this)+1:]).split(" - ",1)[1]
64+
returnpip_desc.replace("://"," ")
65+
except:
66+
return''
6667

6768
defget_package_metadata(database,name,gotoWWW=False,update=False):
6869
"""Extract infos (description, url) from the local database"""
@@ -76,34 +77,33 @@ def get_package_metadata(database, name, gotoWWW=False, update=False):
7677
url='https://pypi.org/project/'+name,
7778
)
7879
forkeyinmy_metadata:
79-
name1=name.lower()
8080
# wheel replace '-' per '_' in key
81-
forname2in (
82-
name1,
83-
name1.split('-')[0],
84-
name1.replace('-','_'),
85-
'-'.join(name1.split('_')),
86-
normalize(name),
87-
):
81+
forname2in (name,normalize(name)):
8882
try:
8983
my_metadata[key]=db.get(name2,key)
9084
break
9185
except (cp.NoSectionError,cp.NoOptionError):
9286
pass
93-
database_desc=my_metadata.get('description')
94-
ifmy_metadata.get('description')==''andmetadata:# nothing in package.ini
87+
db_desc=my_metadata.get('description')
88+
89+
ifmy_metadata.get('description')==''andmetadata:
90+
# nothing in package.ini, we look in our installed packages
9591
try:
9692
my_metadata['description']=(
9793
metadata(name)['Summary']+'\n').splitlines()[0]
9894
except:
9995
pass
96+
10097
ifmy_metadata['description']==''andgotoWWW:
98+
# still nothing, try look on pypi
10199
the_official=get_official_description(name)
102100
ifthe_official!='':
103101
my_metadata['description']=the_official
104-
ifupdate==Trueanddatabase_desc==''andmy_metadata['description']!='':
102+
103+
ifupdate==Trueanddb_desc==''andmy_metadata['description']!='':
104+
# we add new findings in our packgages.ini list, if it's required
105105
try:
106-
db[normalize(name)]={}
106+
db[normalize(name)]={}
107107
db[normalize(name)]['description']=my_metadata['description']
108108
withopen(osp.join(DATA_PATH,database),'w')asconfigfile:
109109
db.write(configfile)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp