Addon manager: install dependencies (#5376)

Addon Manager: Dependency Installation

The Addon Manager can now attempt to use pip directly to install
required packages as specified in either metadata.txt or
requirements.txt files provided by AddOns. The packages are installed
into FreeCAD.getUserAppDataDir()/AdditionalPythonPackages directory.
Only simplified requirements.txt data is supported: any version
information is stripped out, and only packages are supported (that is,
no pip arguments, included files, etc.). Further, packages are checked
against a list of allowed packages prior to being suggested for
installation. Addon authors should submit a PR to the FreeCAD repo
adding their requirements to the allowed list, for packages that are not
already on the list (this is a malware-prevention mechanism).
This commit is contained in:
Chris Hennes
2022-01-21 10:19:21 -06:00
committed by GitHub
parent fb84f715fa
commit d1a94de371
10 changed files with 431 additions and 128 deletions

View File

@@ -10,7 +10,7 @@
<x>0</x>
<y>0</y>
<width>455</width>
<height>200</height>
<height>260</height>
</rect>
</property>
<property name="windowTitle">
@@ -20,7 +20,9 @@
<item>
<widget class="QLabel" name="label">
<property name="text">
<string>This Addon has the following required and optional dependencies. You must install them before this Addon can be used.</string>
<string>This Addon has the following required and optional dependencies. You must install them before this Addon can be used.
Do you want the Addon Manager to install them automatically? Choose &quot;Ignore&quot; to install the Addon without installing the dependencies.</string>
</property>
<property name="wordWrap">
<bool>true</bool>
@@ -73,7 +75,7 @@
<enum>Qt::Horizontal</enum>
</property>
<property name="standardButtons">
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ignore</set>
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ignore|QDialogButtonBox::Yes</set>
</property>
</widget>
</item>