FreeCAD / FreeCAD-addons

A convenient gathering of useful and well-developed FreeCAD plugins made by the community.
771 stars 253 forks source link

[Bug]Remove automatic py-slsv install for Assembly3 workbench #243

Closed CBtiger closed 2 years ago

CBtiger commented 2 years ago

Describe the bug AddOn Manager does install the python solverspace binding for the ASM 3 workbench into the subfolder "AdditionalPythonPackages". The problem with that is that different Python versions are installed in the same place causing conflicts when different FreeCAD versions are used (e.g. different AppImages). Since the Asm3 does install its required py-slvs but it own when its not found this AddOnManager feature is not required any more and should be removed.

Here the relevant section from a Realthunder answer from one of the references .. the new AddonManager installs the dependency in .local/share/FreeCAD/AdditionalPythonPackages which may cause problem if you are alternating AppImages that pack different version of Python, because py_slvs is a native package. Please go in this directory and manually remove all py_slvs directories. Then start FreeCAD, and if you've already have asm3 installed, switch to the workbench and it will prompt to install py_slvs. Try and see if this can get it installed. If you haven't installed asm3 (or removed it previously), when prompt to install dependency, choose Ignore and try.

References: https://github.com/realthunder/FreeCAD_assembly3/issues/1282 https://github.com/FreeCAD/FreeCAD-Bundle/issues/139

To Reproduce Steps to reproduce the behavior:

  1. Remove all oy AdditionalPythonPackages
  2. uninstall Asm3 workbench
  3. install it again. AddOn Manager will ask to install py-slvs
  4. It creates the files in AdditionalPythonPackages

Expected behavior A clear and concise description of what you expected to happen.

  1. Remove all oy AdditionalPythonPackages
  2. uninstall Asm3 workbench
  3. install it again. No AddOnManager intervention
  4. Select Assembly3 WB
  5. a popup will ask to install py-slvs
  6. the report view will show a successful install. Its in a different folder than the AddonManager install

Note

  1. A "failed" window may popup. This is a Asm3 bug and can be ignored if the Report view shows a successful install

Screenshots n/a

Desktop (please complete the following information):

Additional context n/a

chennes commented 2 years ago

This isn't really an Addon Manager bug -- @realthunder should remove "py-slvs" as a dependency if he wants to handle installing it himself. In the meantime, when the Addon Manager asks you if you want to install the dependency, click "Ignore" instead of "Install".

realthunder commented 2 years ago

So just to be clear, @chennes , is it true that the package.xml dependency is meant only for non-native Python package?

chennes commented 2 years ago

Right now it is meant just to tell the Addon Manager to install the package if it can't find it on the system already.

realthunder commented 2 years ago

But if the package is binary, it is only compatible with the Python version it is compiled with. And since the AddonManager installs the package in a version-less directory, it may cause problem when running FreeCAD compiled with different Python version.

chennes commented 2 years ago

I see your point, I wasn't thinking about binary packages (or really, multiple simultaneous Python versions)-- I'll change the Addon Manager to version that directory.