Commit Graph

29 Commits

Author SHA1 Message Date
Adrian Insaurralde
b0724a34d9 cmake: remove distutils usage for python < 3.10 2025-03-22 11:08:36 -05:00
Joao Matos
aace8f7bee CMake: Modernize build files using outdated Python variables. 2025-02-16 10:21:26 -06:00
Chris Hennes
07b2c87f0a Ext: Correct user preference specified in comment 2025-01-29 05:15:31 -06:00
wmayer
eac63c5c4d Mesh: Workaround to load 3mf files not supported by zipios library 2024-11-28 17:07:34 +01:00
wmayer
84a307788c Core: Fix macro recording when using module_io 2024-10-02 21:13:19 -06:00
Benjamin Nauck
5af4615337 Fixes name 'PyExc_FC_AbortIOException' is not defined 2024-09-30 17:46:08 +02:00
supermixed
bbb6eeb1ed Core: Import STEP: Cancel button does not cancel (#16499)
* Fix importing .step file when user cancelled import settings dialog
* Refactor object loading python code, fix not using settings when STEP options dialog not shown
* Use custom exception type for user cancelling import instead of `RuntimeError`
* Pull python code out to external file
2024-09-20 08:25:23 -05:00
wmayer
0825b4dda0 Port python modules documentation to Py 3.11
Fixes #14148: Automatic python modules documentation index page broken
2024-05-24 20:34:12 +02:00
wmayer
170f117ae2 Gui: refactor PythonOnlineHelp 2024-05-24 20:34:12 +02:00
wmayer
4b583018a0 Ext: copy Python modules to Ext to be consistent with INSTALL target 2024-04-02 17:44:28 +02:00
looooo
a7e8141cba set INSTALL_TO_SITEPACKAGES to ON by default
and add some modules to the freecad-namespace (freecad.part, freecad.partdesign, freecad.sketcher)
2024-01-08 14:40:32 -03:00
Pesc0
eeb5a34d54 create utils file with get_python_exe 2023-11-17 02:00:12 +01:00
DeflateAwning
1e3179e9bc Find and replace http://freecad.org to https://freecad.org
Find and replace:
http:\/\/(.{0,10})freecad
https://$1freecad
Done in all remaining files (after doing it in SVGs in the last commit)
2023-10-29 22:39:22 -06:00
Adrian Insaurralde Avalos
738938d9ed Migrate away from deprecated distutils python package where possible 2023-10-23 10:51:50 -05:00
luzpaz
38a01939e0 Migrate domain name from freecadweb to freecad (#9352)
* Migrate domain name from freecadweb to freecad
* Migrate src/Mod/Material files
* Migrate Stylesheet related files
* Migrate *.svg files
* Migrate miscellaneous files
* Migrate some build files
* Migrate recently added TD AR_IRAM template files

Closes #6415
2023-04-24 15:19:20 -05:00
wmayer
cd02704ff1 Gui: fix some lint warnings 2023-03-24 21:19:27 +01:00
wmayer
9a77379b37 Gui: move built-in Python code of DlgProjectUtility to script file 2023-03-24 19:50:49 +01:00
luzpaz
79e150a81b Fix trailing whitespace, typos, headers
Fix trailing whitespace, typos, and header uniformity.
2023-01-23 00:34:37 +01:00
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