issue with building Python 3.5 extension on OSX

0 views
Skip to first unread message

David Froger

unread,
May 20, 2016, 2:59:43 PM5/20/16
to co...@continuum.io
Hello,

On OSX, I have issue with the 3.5.1.0 package of Python when trying to build a
Python extension.

`python3.5-config --ldflags` returns:

-lpython3.5m -ldl -framework CoreFoundation -Wl,-stack_size,1000000 -framework CoreFoundation

which has two problems:

1) -L/path/to/lib is missing, so python3.5m will not be found.
2) -Wl,-stack_size,1000000 is valid when creating an executable, but not
when creating a shared library.

Here is a discussion with the developper of the Waf build system:

https://github.com/waf-project/waf/issues/1745

Indeed, this official Waf example do not work on OSX with Python 3.5 from
Conda:

https://github.com/waf-project/waf/tree/waf-1.8.20/demos/python

Thanks,
David

Phil Elson

unread,
May 27, 2016, 2:43:30 AM5/27/16
to David Froger, conda
We have just packaged python35 on conda-forge, and it seems the python we have packaged also has the same issue:

$> conda create -n cf_py -c conda-forge python=3.5
Using Anaconda Cloud api site https://api.anaconda.org
Fetching package metadata: ........
Solving package specifications: .........

Package plan for installation in environment /Users/pelson/miniconda/envs/cf_py:

The following NEW packages will be INSTALLED:

    ca-certificates: 2016.2.28-0 conda-forge

    openssl:         1.0.2h-0    conda-forge

    python:          3.5.1-0     conda-forge

    readline:        6.2-2       defaults   

    sqlite:          3.9.2-0     conda-forge

    tk:              8.5.19-0    conda-forge

    xz:              5.0.5-1     conda-forge

    zlib:            1.2.8-3     conda-forge


$> /Users/pelson/miniconda/envs/cf_py/bin/python3-config --ldflags

-lpython3.5m -ldl -framework CoreFoundation -Wl,-stack_size,1000000 -framework CoreFoundation

The build script for the conda-forge version can be found at https://github.com/conda-forge/python-feedstock/blob/master/recipe/build.sh. If you have any recommendations on improving the conda-forge python we'd love to get your feedback either in the form of an issue or, even better, as a PR, at https://github.com/conda-forge/python-feedstock.

Just to be clear: conda-forge is a community driven packaging system, so even if we solve the problem there, it isn't guaranteed that the problem will be solved on defaults (though it does make it easier to communicate a potential solution to Continuum).

Cheers,

Phil 



--
You received this message because you are subscribed to the Google Groups "conda - Public" group.
To unsubscribe from this group and stop receiving emails from it, send an email to conda+un...@continuum.io.
To post to this group, send email to co...@continuum.io.
Visit this group at https://groups.google.com/a/continuum.io/group/conda/.

David Froger

unread,
May 27, 2016, 3:31:04 AM5/27/16
to Phil Elson, conda
> The build script for the conda-forge version can be found at https://github.com
> /conda-forge/python-feedstock/blob/master/recipe/build.sh. If you have any
> recommendations on improving the conda-forge python we'd love to get your
> feedback either in the form of an issue or, even better, as a PR, at https://
> github.com/conda-forge/python-feedstock.
>
> Just to be clear: conda-forge is a community driven packaging system, so even
> if we solve the problem there, it isn't guaranteed that the problem will be
> solved on defaults (though it does make it easier to communicate a potential
> solution to Continuum).

Hi Phil,

Thanks for the reply. I didn't know about conda-forge, it is great! I hope to
submit a PR for my problem in a few days.

Cheers,
David
Reply all
Reply to author
Forward
0 new messages