Re: [Cython] patch for #655

2013-06-26 Thread Felix Salfelder
On Tue, Jun 25, 2013 at 01:06:35AM -0700, Robert Bradshaw wrote:
> One first comment, I think it's a lot to reserve three flags for this.
> Perhaps "-M [filename] would be sufficient, using the convention that
> - is stdout. If necessary, we could have a special syntax for the -D
> option.

it's a tradeoff between simplicity and force of habit. anybody using gcc
and make knows, what -M and -M[A-Z] mean. anybody who doesnt use any of
these, will never need this functionality.

but yes, of you *do* need -P and -D otherwise, we might find other
characters...

> I'm still, however, trying to figure out exactly what the usecase for
> this is.

it's about keeping track of build dependencies.

> Generally extensions are created with distutils, and
> cythonize handles the dependencies in that framework for you, so I'm
> not sure how you'd use the resulting makefiles (one per .pyx file?)
> anyways. 

cythonize doesnt know, which headers gcc will use when compiling the
cython output. now what any other compiler will do. i have no idea how
to fix that (design flaw?), and its currently easier to just use
makefiles from the beginning. with makefiles, dependencies are easy and
fast, if all involved compilers support it.

regards
felix
___
cython-devel mailing list
cython-devel@python.org
http://mail.python.org/mailman/listinfo/cython-devel


Re: [Cython] patch for #655

2013-06-26 Thread Stefan Behnel
Felix Salfelder, 25.06.2013 10:34:
> On Tue, Jun 25, 2013 at 01:06:35AM -0700, Robert Bradshaw wrote:
>> I'm still, however, trying to figure out exactly what the usecase for
>> this is.
> 
> it's about keeping track of build dependencies.
> 
>> Generally extensions are created with distutils, and
>> cythonize handles the dependencies in that framework for you, so I'm
>> not sure how you'd use the resulting makefiles (one per .pyx file?)
>> anyways.

I fail to see the use case, too. It's fairly limited in any case.


> cythonize doesnt know, which headers gcc will use when compiling the
> cython output.

Make doesn't know that either. Cython at least knows which ones are used
directly. Handling transitive dependencies would require parsing header
files. If you need to keep track of changes in transitively included header
files, why not cimport from them in the Cython source to make them an
explicit dependency?


> now what any other compiler will do.

This sentence barely passes through my English parser and then fails to
link with the rest.


> i have no idea how
> to fix that (design flaw?), and its currently easier to just use
> makefiles from the beginning. with makefiles, dependencies are easy and
> fast, if all involved compilers support it.

Maybe you should start by describing more clearly what exactly is missing
in the current setup. Building with make instead of distutils seems like a
major complication to me all by itself.

Stefan

___
cython-devel mailing list
cython-devel@python.org
http://mail.python.org/mailman/listinfo/cython-devel