[DONE] conda: update to gcc7 and py3.7

Having trouble installing or compiling FreeCAD? Get help here.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
User avatar
looo
Veteran
Posts: 3941
Joined: Mon Nov 11, 2013 5:29 pm

Re: [wip] conda: update to gcc7 and py3.7

Post by looo »

Only via conda... I still don't know how to create dmg images and first I would like to port freecad to new compilers...
User avatar
looo
Veteran
Posts: 3941
Joined: Mon Nov 11, 2013 5:29 pm

Re: [wip] conda: update to gcc7 and py3.7

Post by looo »

ok, I have created a dmg with this script: https://github.com/FreeCAD/FreeCAD-AppI ... x/conda.sh
Now I have a 360.2mb FreeCAD_conda_clang4.0.1.dmg file. The only thing missing is the upload... I guess I need special Github-Rights for this task.
@sgrogan @triplus
User avatar
looo
Veteran
Posts: 3941
Joined: Mon Nov 11, 2013 5:29 pm

Re: [wip] conda: update to gcc7 and py3.7

Post by looo »

ok, I guess there is not much missing for weekly osx-builds. Maybe someone else can have a look at these points.

1. automatic naming of the dmg:
https://github.com/looooo/FreeCAD-AppIm ... nda.sh#L45

2. automatic upload to the release page.

3. integration in the travis workflow.


The conda side is also no yet ready, but this is the part is easier for me:

1. create a windows py37-testing package

2. update the conda-forge freecad-feedstock

3. fork the updated conda-forge freecad-feedstock and do some modifications to upload to freecad/label/dev
User avatar
sgrogan
Veteran
Posts: 6499
Joined: Wed Oct 22, 2014 5:02 pm

Re: [wip] conda: update to gcc7 and py3.7

Post by sgrogan »

looo wrote: Wed Mar 06, 2019 2:59 pm Now I have a 360.2mb FreeCAD_conda_clang4.0.1.dmg file. The only thing missing is the upload... I guess I need special Github-Rights for this task
You are awesome :D
I think we need yorik to give you the proper rights. In the interim if you upload to a release on your github I can copy it over.
looo wrote: Wed Mar 06, 2019 3:23 pm 1. automatic naming of the dmg:
If python is available, from the bin directory something like this should work (untested)

Code: Select all

import FreeCAD
M=FreeCAD.Version()[1]
m=FreeCAD.Version()[2]
print("FreeCAD_0." + M + "-" + m +"-OSX-x86_64-Qt5-Py3.dmg")
"fight the good fight"
User avatar
looo
Veteran
Posts: 3941
Joined: Mon Nov 11, 2013 5:29 pm

Re: [wip] conda: update to gcc7 and py3.7

Post by looo »

hmm, this is not yet working:

Code: Select all

>>> sys.path.append(os.path.join(os.environ["CONDA_PREFIX"], "lib"))
>>> import FreeCAD
Segmentation fault: 11
User avatar
sgrogan
Veteran
Posts: 6499
Joined: Wed Oct 22, 2014 5:02 pm

Re: [wip] conda: update to gcc7 and py3.7

Post by sgrogan »

looo wrote: Wed Mar 06, 2019 8:43 pm hmm, this is not yet working:
On Windows I think it woud be
not "lib" but "Library/bin"

Edit:

Code: Select all

conda activate FreeCAD-dev3
python
import os
import sys
sys.path.append(os.path.join(os.environ["CONDA_PREFIX"], "Library/bin"))
import FreeCAD
M=FreeCAD.Version()[1]
m=FreeCAD.Version()[2]
print("FreeCAD_0." + M + "-" + m +"-OSX-x86_64-Qt5-Py3.dmg")
Result: FreeCAD_0.18-16033 (Git)-OSX-x86_64-Qt5-Py3.dmg

EDIT2: For Kunda1, with deference to blacey, replace "-" with "."?

Code: Select all

conda activate FreeCAD-dev3
python
import os
import sys
sys.path.append(os.path.join(os.environ["CONDA_PREFIX"], "Library/bin"))
import FreeCAD
M=FreeCAD.Version()[1]
m=FreeCAD.Version()[2]
print("FreeCAD_0." + M + "." + m +"-OSX-x86_64-Qt5-Py3.dmg")
Result: FreeCAD_0.18.16065 (Git)-OSX-x86_64-Qt5-Py3.dmg

We should probably parse out the (Git)
If we agree I will modify my win scripts to conform. ...arch-extra packaging info?
"fight the good fight"
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: [wip] conda: update to gcc7 and py3.7

Post by Kunda1 »

@sgrogan <hat tip>
issue #3707
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
User avatar
looo
Veteran
Posts: 3941
Joined: Mon Nov 11, 2013 5:29 pm

Re: [wip] conda: update to gcc7 and py3.7

Post by looo »

sgrogan wrote: On Windows I think it woud be
not "lib" but "Library/bin"
Importing FreeCAD from python doesn't work for osx and conda-packages. I don't know the reason for the crash, but I experienced similar crashes also with netgen and we solved it by not linking to python. Somehow conda-packages should have static links to python. (This should give a better performance...) For now I will ignore this crash and use this workaround:

https://github.com/looooo/FreeCAD-AppIm ... version.py
User avatar
looo
Veteran
Posts: 3941
Joined: Mon Nov 11, 2013 5:29 pm

Re: [wip] conda: update to gcc7 and py3.7

Post by looo »

there is one test failing for osx:

TestPathApp (unittest.loader._FailedTest) ... ERROR
triplus
Veteran
Posts: 9471
Joined: Mon Dec 12, 2011 4:45 pm

Re: [wip] conda: update to gcc7 and py3.7

Post by triplus »

looo wrote: Wed Mar 06, 2019 2:59 pm ok, I have created a dmg with this script: https://github.com/FreeCAD/FreeCAD-AppI ... x/conda.sh
Now I have a 360.2mb FreeCAD_conda_clang4.0.1.dmg file. The only thing missing is the upload... I guess I need special Github-Rights for this task.
@sgrogan @triplus
If you created that file locally, sorry i can't help, @sgrogan has such access, for uploading the packages. Once we will figure out on how to create a .dmg file on Travis. Then basically the same procedure, as we use for AppImage, can be used.
Post Reply