Re: [Cython] Fwd: Question about how best require compiler options for C sources

2016-04-12 Thread Erik Bray
On Mon, Apr 11, 2016 at 7:38 PM, Jeroen Demeyer wrote: > On 2016-04-11 15:23, Erik Bray wrote: >> >> In this case I really do want the symbol "hello" to be >> exported by the DLL, as well as be understood between translation >> units making up the same library. > > > Are you really sure that you w

Re: [Cython] Fwd: Question about how best require compiler options for C sources

2016-04-12 Thread Erik Bray
On Mon, Apr 11, 2016 at 8:36 PM, Ian Henriksen wrote: > On Mon, Apr 11, 2016 at 11:50 AM Ian Henriksen > wrote: >> >> To answer the original question about define macros, it appears that the >> canonical >> way to pass preprocessor defines through distutils is to use the >> define_macros >> keywo

Re: [Cython] Fwd: Question about how best require compiler options for C sources

2016-04-12 Thread Jeroen Demeyer
On 2016-04-12 10:16, Erik Bray wrote: That said, I think it makes more sense for cythonize() to read the distutils options from the C source instead of the Cython source, though in practice I don't know if it's a worthwhile change or not. I don't quite get what you mean. The C file is only read

Re: [Cython] Fwd: Question about how best require compiler options for C sources

2016-04-12 Thread Jeroen Demeyer
On 2016-04-12 10:08, Erik Bray wrote: OSX issues aside, I was under the impression that this is needed for cysignals in particular. No. cysignals is complicated, but it doesn't need dynamic linking to Python modules (.so files). It does need "internal" linking: it needs to link a non-Cython-g

Re: [Cython] Fwd: Question about how best require compiler options for C sources

2016-04-12 Thread Erik Bray
On Mon, Apr 11, 2016 at 7:49 PM, Ian Henriksen wrote: > That aside, I agree with Nathaniel that exporting public declarations as a > part of the > shared object interface was a design mistake. That aside, however, using an > api > declaration lets you get equivalent results without exposing anythi

[Cython] cdef public declarations

2016-04-12 Thread Jeroen Demeyer
(this thread is related to the thread "Question about how best require compiler options for C sources") I have a question for Cython users and developers: are you sure that "cdef public" actually works as documented at http://docs.cython.org/src/userguide/external_C_code.html#public-declaratio

Re: [Cython] Fwd: Question about how best require compiler options for C sources

2016-04-12 Thread Erik Bray
On Tue, Apr 12, 2016 at 10:27 AM, Jeroen Demeyer wrote: > On 2016-04-12 10:16, Erik Bray wrote: >> >> That said, I >> think it makes more sense for cythonize() to read the distutils >> options from the C source instead of the Cython source, though in >> practice I don't know if it's a worthwhile c

Re: [Cython] cdef public declarations

2016-04-12 Thread Erik Bray
On Tue, Apr 12, 2016 at 10:36 AM, Jeroen Demeyer wrote: > (this thread is related to the thread "Question about how best require > compiler options for C sources") > > I have a question for Cython users and developers: are you sure that "cdef > public" actually works as documented at > http://docs

Re: [Cython] cdef public declarations

2016-04-12 Thread Jeroen Demeyer
On 2016-04-12 10:49, Erik Bray wrote: Do you have a reference about this distinction on hand? I think these two links are useful: [1] http://docstore.mik.ua/orelly/unix3/mac/ch05_03.htm [2] http://stackoverflow.com/questions/2339679/what-are-the-differences-between-so-and-dylib-on-osx _

Re: [Cython] Fwd: Question about how best require compiler options for C sources

2016-04-12 Thread Ian Henriksen
On Tue, Apr 12, 2016 at 2:35 AM Erik Bray wrote: > On Mon, Apr 11, 2016 at 7:49 PM, Ian Henriksen > wrote: > > That aside, I agree with Nathaniel that exporting public declarations as > a > > part of the > > shared object interface was a design mistake. That aside, however, using > an > > api >

Re: [Cython] Fwd: Question about how best require compiler options for C sources

2016-04-12 Thread Ian Henriksen
On Tue, Apr 12, 2016 at 2:35 AM Erik Bray wrote: > On Mon, Apr 11, 2016 at 7:49 PM, Ian Henriksen wrote: > > With regards to the dllexporting/dllimporting of things: given that > public > > declarations > > are already designed to export things through the shared object > interface, > > we may >

Re: [Cython] Fwd: Question about how best require compiler options for C sources

2016-04-12 Thread Ian Henriksen
On Mon, Apr 11, 2016 at 12:36 PM Ian Henriksen < insertinterestingnameh...@gmail.com> wrote: > On Mon, Apr 11, 2016 at 11:50 AM Ian Henriksen < > insertinterestingnameh...@gmail.com> wrote: > >> To answer the original question about define macros, it appears that the >> canonical >> way to pass pr