mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-09 07:56:22 -06:00
Rename tmp Python file to a more explicit name
This commit is contained in:
parent
d8200a3cb3
commit
0d5d0fe846
1 changed files with 4 additions and 4 deletions
|
@ -121,13 +121,13 @@ class CuraConan(ConanFile):
|
|||
self.output.info("Collecting python installs")
|
||||
python_installs = {}
|
||||
|
||||
temp_exec = "temp.py"
|
||||
collect_python_installs = "collect_python_installs.py"
|
||||
code = f"import importlib.metadata; print(';'.join([(package.metadata['Name']+','+ package.metadata['Version']) for package in importlib.metadata.distributions()]))"
|
||||
save(self, temp_exec, code)
|
||||
save(self, collect_python_installs, code)
|
||||
|
||||
buffer = StringIO()
|
||||
self.run(f"""python {temp_exec}""", env = "virtual_python_env", stdout = buffer)
|
||||
rm(self, temp_exec, ".")
|
||||
self.run(f"""python {collect_python_installs}""", env = "virtual_python_env", stdout = buffer)
|
||||
rm(self, collect_python_installs, ".")
|
||||
|
||||
packages = str(buffer.getvalue()).strip('\r\n').split(";")
|
||||
for package in packages:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue