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...)
User avatar
looo
Veteran
Posts: 3941
Joined: Mon Nov 11, 2013 5:29 pm

conda-packages for osx

Post by looo »

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

Re: conda-packages for osx

Post by Kunda1 »

Fantastic news!
@chrisb that was a very cool gesture. Much appreciation.
@looo appreciate your work on much needed OSX build
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
chrisb
Veteran
Posts: 53945
Joined: Tue Mar 17, 2015 9:14 am

Re: conda-packages for osx

Post by chrisb »

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.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
User avatar
looo
Veteran
Posts: 3941
Joined: Mon Nov 11, 2013 5:29 pm

Re: conda-packages for osx

Post by looo »

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.
chrisb
Veteran
Posts: 53945
Joined: Tue Mar 17, 2015 9:14 am

Re: conda-packages for osx

Post by chrisb »

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.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
User avatar
looo
Veteran
Posts: 3941
Joined: Mon Nov 11, 2013 5:29 pm

Re: conda-packages for osx

Post by looo »

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
User avatar
jmborer
Posts: 42
Joined: Thu Feb 28, 2019 5:39 pm
Location: Switzerland

Re: conda-packages for osx

Post by jmborer »

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
User avatar
looo
Veteran
Posts: 3941
Joined: Mon Nov 11, 2013 5:29 pm

Re: conda-packages for osx

Post by looo »

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...
vectronic
Posts: 52
Joined: Sun Feb 18, 2018 9:44 pm

Re: conda-packages for osx

Post by vectronic »

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....
User avatar
looo
Veteran
Posts: 3941
Joined: Mon Nov 11, 2013 5:29 pm

Re: conda-packages for osx

Post by looo »

Makes sense. Sry for the troubles.
Post Reply