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

Having trouble installing or compiling FreeCAD? Get help here.
looo
Posts: 2905
Joined: Mon Nov 11, 2013 5:29 pm

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

Postby looo » Tue Mar 05, 2019 10:31 pm

Only via conda... I still don't know how to create dmg images and first I would like to port freecad to new compilers...
please help with my conda-packaging efforts: https://liberapay.com/looooo/
looo
Posts: 2905
Joined: Mon Nov 11, 2013 5:29 pm

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

Postby looo » 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
please help with my conda-packaging efforts: https://liberapay.com/looooo/
looo
Posts: 2905
Joined: Mon Nov 11, 2013 5:29 pm

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

Postby looo » Wed Mar 06, 2019 3:23 pm

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
please help with my conda-packaging efforts: https://liberapay.com/looooo/
User avatar
sgrogan
Posts: 5418
Joined: Wed Oct 22, 2014 5:02 pm

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

Postby sgrogan » Wed Mar 06, 2019 8:19 pm

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")
looo
Posts: 2905
Joined: Mon Nov 11, 2013 5:29 pm

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

Postby looo » Wed Mar 06, 2019 8:43 pm

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
please help with my conda-packaging efforts: https://liberapay.com/looooo/
User avatar
sgrogan
Posts: 5418
Joined: Wed Oct 22, 2014 5:02 pm

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

Postby sgrogan » Wed Mar 06, 2019 8:55 pm

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?
User avatar
Kunda1
Posts: 5764
Joined: Thu Jan 05, 2017 9:03 pm

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

Postby Kunda1 » Thu Mar 07, 2019 12:00 am

@sgrogan <hat tip>
issue #3707
Want to contribute back to FC? Checkout:
#lowhangingfruit | Use the Source, Luke. | How to Help FreeCAD | How to report FC bugs and features
looo
Posts: 2905
Joined: Mon Nov 11, 2013 5:29 pm

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

Postby looo » Thu Mar 07, 2019 9:54 am

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
please help with my conda-packaging efforts: https://liberapay.com/looooo/
looo
Posts: 2905
Joined: Mon Nov 11, 2013 5:29 pm

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

Postby looo » Sat Mar 09, 2019 5:57 am

there is one test failing for osx:

TestPathApp (unittest.loader._FailedTest) ... ERROR
please help with my conda-packaging efforts: https://liberapay.com/looooo/
triplus
Posts: 8728
Joined: Mon Dec 12, 2011 4:45 pm

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

Postby triplus » Sun Mar 10, 2019 10:09 pm

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.