conda-packages for osx

This subforum is specifically to discuss packaging issues on different platforms (windows, mac, linux), and using different packaging systems (conda, etc...)
looo
Posts: 2948
Joined: Mon Nov 11, 2013 5:29 pm

conda-packages for osx

Postby looo » Sun Mar 03, 2019 3:00 pm

As we already had a conda-topic for windows and one for linux, I guess it's time to also create one for mac.

I am now a proud mac user (thanks to chris_b who send me a mac mini) and I am pretty happy with the experience so far. Some tests with FreeCAD showed that the 3d-view is a bit slower than on linux and windows (I also did some tests on a very recent mac (mac-book and a big imac) with similar results). But it works and it's definetly worth to push for updated libraries also for the mac.

So my first step on the mac was the setup of conda to build conda-packages locally. Actually it was pretty easy to get this done. But I didn't realy understand these instructions at first [1]. Thats why I added a section to the FreeCAD_Conda repository for this setup. In case anyone is intersted, please follow these instructions [2] and report back if it worked for you.

With this setup + a miniconda installation (+installing conda-build) it should be possible to create local conda-packages for osx.

[1] https://www.anaconda.com/utilizing-the- ... ibution-5/
[2] https://github.com/FreeCAD/FreeCAD_Cond ... ild.md#osx
please help with my conda-packaging efforts: https://liberapay.com/looooo/
User avatar
Kunda1
Posts: 5912
Joined: Thu Jan 05, 2017 9:03 pm

Re: conda-packages for osx

Postby Kunda1 » Sun Mar 03, 2019 4:50 pm

Fantastic news!
@chrisb that was a very cool gesture. Much appreciation.
@looo appreciate your work on much needed OSX build
Want to contribute back to FC? Checkout:
#lowhangingfruit | Use the Source, Luke. | How to Help FreeCAD | How to report FC bugs and features
chrisb
Posts: 19484
Joined: Tue Mar 17, 2015 9:14 am

Re: conda-packages for osx

Postby chrisb » Sun Mar 03, 2019 5:17 pm

Good to see that the Mac is useful. Is it possible that you provide a TimeMachine image with the development environment installed? Then I can install that on the other MacMinis for further usage.

If you don't have access to several GB of webspace you could send me a memory stick.
looo
Posts: 2948
Joined: Mon Nov 11, 2013 5:29 pm

Re: conda-packages for osx

Postby looo » Mon Mar 04, 2019 8:44 am

chrisb wrote:
Sun Mar 03, 2019 5:17 pm
Good to see that the Mac is useful. Is it possible that you provide a TimeMachine image with the development environment installed? Then I can install that on the other MacMinis for further usage.

If you don't have access to several GB of webspace you could send me a memory stick.
hmm, I can also provide a script to do this.
please help with my conda-packaging efforts: https://liberapay.com/looooo/
chrisb
Posts: 19484
Joined: Tue Mar 17, 2015 9:14 am

Re: conda-packages for osx

Postby chrisb » Mon Mar 04, 2019 9:35 am

looo wrote:
Mon Mar 04, 2019 8:44 am
chrisb wrote:
Sun Mar 03, 2019 5:17 pm
Good to see that the Mac is useful. Is it possible that you provide a TimeMachine image with the development environment installed? Then I can install that on the other MacMinis for further usage.

If you don't have access to several GB of webspace you could send me a memory stick.
hmm, I can also provide a script to do this.
That would be even better, because it would not be dedicated to these MacMinis.
looo
Posts: 2948
Joined: Mon Nov 11, 2013 5:29 pm

Re: conda-packages for osx

Postby looo » Mon Mar 04, 2019 2:25 pm

Code: Select all

#1 install miniconda
curl -L -O https://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh
bash  Miniconda3-latest-MacOSX-x86_64.sh -b
rm Miniconda3-latest-MacOSX-x86_64.sh

#2 get MacOSX10.9.sdk
curl -L -O https://github.com/phracker/MacOSX-SDKs/releases/download/10.13/MacOSX10.9.sdk.tar.xz
tar -xvf MacOSX10.9.sdk.tar.xz -c /opt/
echo "CONDA_BUILD_SYSROOT:" > ~/conda_build_config.yaml
echo "   - /opt/MacOSX10.9.sdk  # [osx]" >> ~/conda_build_config.yaml
rm MacOSX10.9.sdk.tar.xz

#circle ci has the sdk in another place. This will result in some linking errors. Workaround by creating a symlink:
mkdir -p /Applications/Xcode-9.0.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/
ln -s /opt/MacOSX10.9.sdk /Applications/Xcode-9.0.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/

#3 update conda and install necessary tools
source ~/miniconda3/bin/activate root
conda-config --add channels conda-forge
conda update --all -y
conda install conda-build conda-forge-pinning conda-smithy anaconda-client -y
please help with my conda-packaging efforts: https://liberapay.com/looooo/
User avatar
jmborer
Posts: 42
Joined: Thu Feb 28, 2019 5:39 pm
Location: Switzerland

Re: conda-packages for osx

Postby jmborer » Thu Mar 07, 2019 8:41 pm

May I ask why 10.9 is still used where 10.13 is available or did I miss something?

https://github.com/phracker/MacOSX-SDKs ... sdk.tar.xz
https://github.com/phracker/MacOSX-SDKs ... sdk.tar.xz
looo
Posts: 2948
Joined: Mon Nov 11, 2013 5:29 pm

Re: conda-packages for osx

Postby looo » Thu Mar 07, 2019 9:48 pm

I guess for backward compatibility. Maybe it's also possible to use a newer sdk. But we already seen difficulties creating packages on different ci's which used divverent versions of the sdk...
please help with my conda-packaging efforts: https://liberapay.com/looooo/
vectronic
Posts: 23
Joined: Sun Feb 18, 2018 9:44 pm

Re: conda-packages for osx

Postby vectronic » Fri May 03, 2019 11:45 pm

After much hair-pulling, I realise there is correction to be made on this page:

https://github.com/FreeCAD/FreeCAD_Cond ... ild.md#osx

add a file in the user-home-directory named conda-build-config.yaml containing these lines

should say:

add a file in the user-home-directory named conda_build_config.yaml containing these lines

i.e. the name of the config file needs to be with underscores, not hyphens....
looo
Posts: 2948
Joined: Mon Nov 11, 2013 5:29 pm

Re: conda-packages for osx

Postby looo » Sat May 04, 2019 6:33 am

Makes sense. Sry for the troubles.
please help with my conda-packaging efforts: https://liberapay.com/looooo/