Commit Graph

11 Commits

Author SHA1 Message Date
wmayer
d91de9ceb2 Core: Qt6 migration, use PySide 2022-11-06 14:09:18 +01:00
Adrian Insaurralde Avalos
28ba51f23f [python init] Prepend install prefix if libdir is not absolute
For python init script so it can work by default
2022-07-25 03:49:24 +02:00
wmayer
5917601666 Ext:[skip ci] drop prefix argument from Python code to make sure the absolute path to dist-packages is used.
This allows to set CMAKE_INSTALL_PREFIX to something else than /usr and freecad as Python package is still installed into the correct directory.

For more details see: https://forum.freecadweb.org/viewtopic.php?f=4&t=67750
2022-04-04 18:46:25 +02:00
wmayer
1a62c2024d lgtm: removes unused imports in Python scripts 2022-03-20 23:00:55 +01:00
wmayer
806f004f12 Gui: implement a workaround for MSYS2 to access QUiLoader via its Python interface 2021-09-23 09:46:20 +02:00
lorenz
e415b22a97 cmake: update command to find python-site-packages
https://stackoverflow.com/a/40006251
2021-03-25 17:40:01 +01:00
looooo
60303f3153 freecad-python-interface: use absolute-path to install-bin-dir for windows 2020-09-04 10:04:20 +02:00
looooo
9b0f2505f6 win: fix path to freecad library 2020-05-25 13:33:58 +02:00
looooo
3cf4aeb310 python: add option INSTALL_TO_SITEPACKAGES
If INSTALL_TO_SITEPACKAGES is enabled, the freecad-namespace package (freecad/__init__.py) is installed in the python-sitepackage-dir. Further, the library install path (CMAKE_INSTALL_LIBDIR)
is used to find the FreeCAD shared library. If, for some reason, one wants to import another installed FreeCAD version it's possible to set the environment variable "PATH_TO_FREECAD_LIBDIR" to
point to the wanted FreeCAD-library (FreeCAD.so / FreeCAD.dll)
2020-01-07 07:28:25 -03:00
looooo
0ff658b3ce new-style-modules: fix wrong statement in comment 2017-09-20 23:25:26 +02:00
looooo
c7a4541722 new-style-modules: adding the possebility to import from "freecad"
(this mostly aims at new modules and extension modules which want to use pip)
- any module having problems with nameclashes can use this syntax (from freecad import module)
- current imports still work (backward cobatibility)
- python extension moduels can be installed (pip) to python std path (eg.: site-packages)

- adding app, gui to the new freecad package:
```
from freecad import app
from freecad import gui
```

- syntax for importing c++ extension will not change
```
import FreeCAD as App
import FreeCADGui as Gui
```
2017-09-20 23:25:12 +02:00