-
Notifications
You must be signed in to change notification settings - Fork 0
/
notes.txt
64 lines (51 loc) · 2.07 KB
/
notes.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
Notes on FreeCAD version sources
--------------------------------
PPA
https://www.freecadweb.org/wiki/Install_on_Unix#Stable_PPA_with_console
https://launchpad.net/~freecad-maintainers/+archive/ubuntu/freecad-stable
https://launchpad.net/~freecad-maintainers/+archive/ubuntu/freecad-daily
AppImages
https://github.com/FreeCAD/FreeCAD/releases/tag/0.18.1
https://github.com/FreeCAD/FreeCAD/releases
Notes on Sphinx
---------------
The main way to run sphinx is with make in the project directory (EgFreeCAD):
make doctest
make html
or
make BUILDDIR=build_freecad/Python2 FREECAD="freecad" html
make BUILDDIR=build_freecad-daily/Python2 FREECAD="freecad-daily" html
File source/conf.py has all Sphinx settings. It was autogenerated then modified.
Output testing options include
.. testoutput::
:hide:
:options: -ELLIPSIS, +NORMALIZE_WHITESPACE
:options: +SKIP
<BLANKLINE>
The error message
"During initialization the error No module named freecad occurred"
means /usr/lib/freecad/lib needs to be added to the PYTHONPATH
This can be done in the shell before python is started, or in .bashrc, or
in Makefile, or in source/conf.py (typically around line 18) with
sys.path.insert(0,'/usr/lib/freecad/lib')
sometime TRY TO FIX THIS:
The error message (in yellow and red)
"No modules found in /usr/lib/freecad-python2/Mod
During initialization the error No module named freecad occurred"
does not seem to prevent make doctest or html.
It also occurs in an interactive python session on a first 'import FreeCAD'
but then the import seems to modify PYTHONPATH
and the error does not happen on a second call to import FreeCAD .
>python
import sys, os
#os.environ['PYTHONPATH']
#sys.path
#sys.path.insert(0,os.environ['PYTHONPATH'])
sys.path.insert(0,'/usr/lib/freecad/lib')
import FreeCAD
After module is imported sometimes it's element __file__ says where it came from.
To find what is needed in python and sphinx, start freecad and load modules, eg
import Draft
Draft.__file__
Then in rst file, or conf.py
sys.path.insert(0,'/usr/share/freecad/Mod/Draft/')