py2ls 0.1.5.1__py3-none-any.whl → 0.1.5.2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -43,3 +43,4 @@ d84688b54c0040a30976b3a6540bc47adf7ce680 d84688b54c0040a30976b3a6540bc47adf7ce68
|
|
43
43
|
1c3f92adda34344bcbbbf9d409c79855ae2aaea8 1c3f92adda34344bcbbbf9d409c79855ae2aaea8 Jianfeng Liu <macjianfeng@JFLMBP.cin.medizin.uni-tuebingen.de> 1720709658 +0200 remote set-head
|
44
44
|
bf67907e337021ebff434e02b19b30a741c144af bf67907e337021ebff434e02b19b30a741c144af Jianfeng Liu <macjianfeng@jflmbp.speedport.ip> 1720948343 +0200 remote set-head
|
45
45
|
bf67907e337021ebff434e02b19b30a741c144af bf67907e337021ebff434e02b19b30a741c144af Jianfeng Liu <macjianfeng@jflmbp.speedport.ip> 1720952321 +0200 remote set-head
|
46
|
+
bf67907e337021ebff434e02b19b30a741c144af bf67907e337021ebff434e02b19b30a741c144af Jianfeng Liu <macjianfeng@jflmbp.speedport.ip> 1720954284 +0200 remote set-head
|
py2ls/ips.py
CHANGED
@@ -8,7 +8,8 @@ import matplotlib.ticker as tck
|
|
8
8
|
from mpl_toolkits.mplot3d import Axes3D
|
9
9
|
# import seaborn as sns
|
10
10
|
|
11
|
-
import sys, os,shutil,re, yaml,json
|
11
|
+
import sys, os,shutil,re, yaml,json,subprocess
|
12
|
+
import importlib.util
|
12
13
|
from cycler import cycler
|
13
14
|
import time
|
14
15
|
from dateutil import parser
|
@@ -43,6 +44,28 @@ from duckduckgo_search import DDGS
|
|
43
44
|
|
44
45
|
from py2ls import netfinder
|
45
46
|
|
47
|
+
|
48
|
+
def is_package_installed(package_name):
|
49
|
+
"""Check if a package is installed."""
|
50
|
+
package_spec = importlib.util.find_spec(package_name)
|
51
|
+
return package_spec is not None
|
52
|
+
|
53
|
+
def upgrade(module='py2ls'):
|
54
|
+
# try:
|
55
|
+
# pkg_resources.get_distribution(module)
|
56
|
+
# except pkg_resources.DistributionNotFound:
|
57
|
+
# subprocess.check_call([sys.executable, "-m", "pip", "install", module])
|
58
|
+
if not is_package_installed(module):
|
59
|
+
try:
|
60
|
+
subprocess.check_call([sys.executable, "-m", "pip", "install", module])
|
61
|
+
except subprocess.CalledProcessError as e:
|
62
|
+
print(f"An error occurred while installing {module}: {e}")
|
63
|
+
try:
|
64
|
+
subprocess.check_call([sys.executable, "-m", "pip", "install", "--upgrade", module])
|
65
|
+
except subprocess.CalledProcessError as e:
|
66
|
+
print(f"An error occurred while upgrading py2ls: {e}")
|
67
|
+
upgrade()
|
68
|
+
|
46
69
|
dir_save='/Users/macjianfeng/Dropbox/Downloads/'
|
47
70
|
|
48
71
|
|
@@ -21,7 +21,7 @@ py2ls/.git/index,sha256=ypuqDA3K3KBipX7FdqdgRQozfYsKAFZ-NV09-uWkL-E,1791
|
|
21
21
|
py2ls/.git/info/exclude,sha256=ZnH-g7egfIky7okWTR8nk7IxgFjri5jcXAbuClo7DsE,240
|
22
22
|
py2ls/.git/logs/HEAD,sha256=n-qGQXJL1v859RevL9KKxp-QckcdkwtFE_0V2hJKyeY,3071
|
23
23
|
py2ls/.git/logs/refs/heads/main,sha256=n-qGQXJL1v859RevL9KKxp-QckcdkwtFE_0V2hJKyeY,3071
|
24
|
-
py2ls/.git/logs/refs/remotes/origin/HEAD,sha256=
|
24
|
+
py2ls/.git/logs/refs/remotes/origin/HEAD,sha256=5qttLdkPI-nZlrFIreEGWE4lT39by9hCmDxB5OPJJMk,7485
|
25
25
|
py2ls/.git/logs/refs/remotes/origin/main,sha256=E4VJChrdCLBY0vhc8_zfVvT_BBBaJAnq524hLd6MiCU,2736
|
26
26
|
py2ls/.git/objects/01/d5bd8065e6860c0bd23ff9fa57161806a099e1,sha256=hEQ8nqJnGsfFsuV5wc4cZas58rehXvT0v5ANx1zmMAY,584
|
27
27
|
py2ls/.git/objects/09/08da26de58c114225ad81f484b80bf5d351b34,sha256=NOyYvrJxATpK3aDdP1_stwkqOQRDwJn7DSy6isyKImE,925
|
@@ -125,7 +125,7 @@ py2ls/data/db2ls_sql_chtsht.json,sha256=ls9d7Sm8TLeujanWHfHlWhU85Qz1KnAizO_9X3wU
|
|
125
125
|
py2ls/data/lang_code_iso639.json,sha256=qZiU7H2RLJjDMXK22C-jhwzLJCI5vKmampjB1ys4ek4,2157
|
126
126
|
py2ls/db2ls.py,sha256=MMfFX47aIPIyu7fU9aPvX9lbPRPYOpJ_VXwlnWk-8qo,13615
|
127
127
|
py2ls/freqanalysis.py,sha256=F4218VSPbgL5tnngh6xNCYuNnfR-F_QjECUUxrPYZss,32594
|
128
|
-
py2ls/ips.py,sha256=
|
128
|
+
py2ls/ips.py,sha256=hGom81LO6p0zMzgZPucMqAHOmUbXwJr_SEXgOx6HYqI,96679
|
129
129
|
py2ls/netfinder.py,sha256=ZsLWGYMeRuGvxj2nqE0Z8ANoaVl18Necfw0HQfh2q7I,45548
|
130
130
|
py2ls/setuptools-70.1.0-py3-none-any.whl,sha256=2bi3cUVal8ip86s0SOvgspteEF8SKLukECi-EWmFomc,882588
|
131
131
|
py2ls/sleep_events_detectors.py,sha256=36MCuRrpurn0Uvzpo3p3b3_JlVsRNHSWCXbJxCGM3mg,51546
|
@@ -133,6 +133,6 @@ py2ls/stats.py,sha256=Wd9yCKQ_61QD29WMEgMuEcreFxF91NmlPW65iWT2B5w,39041
|
|
133
133
|
py2ls/stdshade.py,sha256=owpf_2UPCEgq2RdFOwcOSW2RHUNUrYhawrPobYtdyqg,7301
|
134
134
|
py2ls/translator.py,sha256=6S7MmTZmjj8NljVmj0W5uEauu4ePxso3AMf2LvGVRQA,30516
|
135
135
|
py2ls/wb_detector.py,sha256=7y6TmBUj9exCZeIgBAJ_9hwuhkDh1x_-yg4dvNY1_GQ,6284
|
136
|
-
py2ls-0.1.5.
|
137
|
-
py2ls-0.1.5.
|
138
|
-
py2ls-0.1.5.
|
136
|
+
py2ls-0.1.5.2.dist-info/METADATA,sha256=8vPeN923uNg2wLYetSernMt6i7Hs2Qa5lNz-VPkdhNg,17943
|
137
|
+
py2ls-0.1.5.2.dist-info/WHEEL,sha256=FMvqSimYX_P7y0a7UY-_Mc83r5zkBZsCYPm7Lr0Bsq4,88
|
138
|
+
py2ls-0.1.5.2.dist-info/RECORD,,
|
File without changes
|