Skip to content

Commit ceb2022

Browse files
committed
get rid of pkg_resources
1 parent eaf3367 commit ceb2022

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

Funz/install.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ def setupCalculator():
172172
else:
173173
subprocess.call(["xdg-open", '"'+os.path.join(FUNZ_HOME,"calculator.xml")+'"'])
174174

175-
import tempfile, pkg_resources
175+
import tempfile#, pkg_resources
176176
def install_githubModel(model,force=False, edit_script=False):
177177
""" Install Funz model plugin from central GitHub repository.
178178
@param model model to install.
@@ -184,7 +184,7 @@ def install_githubModel(model,force=False, edit_script=False):
184184
install_githubModel('Modelica')
185185
}
186186
"""
187-
major = re.sub(".post(.*)","",pkg_resources.get_distribution("Funz").version)
187+
major = re.sub(".post(.*)","",Funz.__version__) #pkg_resources.get_distribution("Funz").version)
188188
model_zip = os.path.join(tempfile.gettempdir(),"plugin-"+model+".zip")
189189
for minor in range(11)[::-1]:
190190
print(".", end = '')
@@ -285,7 +285,7 @@ def install_fileDesign(design_zip, force=False):
285285
else:
286286
print("Installed Funz design "+design)
287287

288-
import tempfile, pkg_resources
288+
import tempfile#, pkg_resources
289289
def install_githubDesign(design,force=False):
290290
""" Install Funz design plugin from central GitHub repository.
291291
@param design design to install.
@@ -296,7 +296,8 @@ def install_githubDesign(design,force=False):
296296
install_githubDesign('GradientDescent')
297297
}
298298
"""
299-
major = re.sub(".post(.*)","",pkg_resources.get_distribution("Funz").version)
299+
major = re.sub(".post(.*)","",Funz.__version__)
300+
#pkg_resources.get_distribution("Funz").version)
300301
design_zip = os.path.join(tempfile.gettempdir(),"algorithm-"+design+".zip")
301302
for minor in range(11)[::-1]:
302303
print(".", end = '')

0 commit comments

Comments
 (0)