Commit Graph

32 Commits

Author SHA1 Message Date
Chris Hennes
f366b0e2a7 Utils: Don't save location of Python executable 2025-12-01 17:03:46 +00:00
PhoneDroid
4e9fe02b9a [ Ext ]: Update SPDX License Identifiers 2025-11-05 12:37:18 -06:00
Michael Marais
cbe93b3b56 Merge pull request #23915 from Mikestriken/project_utility_fix
Fixed createDocument() utility importing phantom '\.' files with 0 bytes
2025-09-30 11:04:08 -05:00
Adrian Insaurralde
9f9610076e cmake: remove distutils usage for python < 3.10 2025-03-22 11:08:36 -05:00
Joao Matos
27ebc68a11 CMake: Modernize build files using outdated Python variables. 2025-02-16 10:21:26 -06:00
Chris Hennes
21b29a1a7e Ext: Correct user preference specified in comment 2025-01-29 05:15:31 -06:00
wmayer
8f18cfaf3a Mesh: Workaround to load 3mf files not supported by zipios library 2024-11-28 17:07:34 +01:00
wmayer
08ff1e5eeb Core: Fix macro recording when using module_io 2024-10-02 21:13:19 -06:00
Benjamin Nauck
fe9ec915f4 Fixes name 'PyExc_FC_AbortIOException' is not defined 2024-09-30 17:46:08 +02:00
supermixed
f763425b4f 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
9b0026bbe1 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
b0acb563ea Gui: refactor PythonOnlineHelp 2024-05-24 20:34:12 +02:00
wmayer
68417edbce Ext: copy Python modules to Ext to be consistent with INSTALL target 2024-04-02 17:44:28 +02:00
looooo
8e2ab9f768 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
0e6ec6e3ac create utils file with get_python_exe 2023-11-17 02:00:12 +01:00
DeflateAwning
8de6db3e97 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
7754c44b55 Migrate away from deprecated distutils python package where possible 2023-10-23 10:51:50 -05:00
luzpaz
129d5882a7 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
f30a6c634a Gui: fix some lint warnings 2023-03-24 21:19:27 +01:00
wmayer
2082329223 Gui: move built-in Python code of DlgProjectUtility to script file 2023-03-24 19:50:49 +01:00
luzpaz
729685316e Fix trailing whitespace, typos, headers
Fix trailing whitespace, typos, and header uniformity.
2023-01-23 00:34:37 +01:00
wmayer
d6a7b282d5 Core: Qt6 migration, use PySide 2022-11-06 14:09:18 +01:00
Adrian Insaurralde Avalos
43ae3c0b16 [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
15c069a7b7 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
cf7fd5d2ac lgtm: removes unused imports in Python scripts 2022-03-20 23:00:55 +01:00
wmayer
0d2451a20a Gui: implement a workaround for MSYS2 to access QUiLoader via its Python interface 2021-09-23 09:46:20 +02:00
lorenz
e8a3990878 cmake: update command to find python-site-packages
https://stackoverflow.com/a/40006251
2021-03-25 17:40:01 +01:00
looooo
1590c209e3 freecad-python-interface: use absolute-path to install-bin-dir for windows 2020-09-04 10:04:20 +02:00
looooo
85bfe116e1 win: fix path to freecad library 2020-05-25 13:33:58 +02:00
looooo
b630772afc 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
677a149614 new-style-modules: fix wrong statement in comment 2017-09-20 23:25:26 +02:00
looooo
2ff47374f2 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