[Pyrex] Why were .pxd files invented?
Leif Strand
leif at geodynamics.org
Mon Apr 2 19:31:56 UTC 2007
I forgot to mention that e.g., "pyrex -pxd foo.pyx" would only update
the foo.pxd output file if either (a) it didn't already exit; or (b) the
newly generated .pxd output was different from the old foo.pxd file that
was already there. Obviously, the scheme I sketched below would be
pointless if Pyrex touched the timestamp on the .pxd file every time the
corresponding .pyx file changed.
--Leif
I wrote:
> Still, it seems to me that .pxd files should at least be generated, so I
> don't have to think about them. Like this:
>
> # -- Makefile snippet --
>
> Landscaping.c: Landscaping.pyx
> pyrexc $<
>
> # dependencies such as this one could be output by Pyrex itself, using
> # "pyrex -M" or "pyrex -MM" (like GCC's equivalent option), and the
> # generated dependency file included here
> Landscaping.c: Shrubbing.pxd
>
> # generate .pxd automatically from .pyx file
> Shrubbing.pxd: Shrubbing.pyx
> pyrexc -pxd $<
>
> # -- end Makefile snippet --
>
> Generating the .pxd file would also give you the opportunity to insert
> the version timestamp.
>
> --Leif
>
>
More information about the Pyrex
mailing list