[Numpy-discussion] Vendorize tempita

Ralf Gommers ralf.gommers at gmail.com
Fri Sep 30 23:08:01 EDT 2016


On Sat, Oct 1, 2016 at 1:42 PM, Charles R Harris <charlesr.harris at gmail.com>
wrote:

>
>
> On Fri, Sep 30, 2016 at 10:36 AM, Charles R Harris <
> charlesr.harris at gmail.com> wrote:
>
>>
>>
>> On Fri, Sep 30, 2016 at 10:10 AM, Charles R Harris <
>> charlesr.harris at gmail.com> wrote:
>>
>>>
>>>
>>> On Fri, Sep 30, 2016 at 9:48 AM, Evgeni Burovski <
>>> evgeny.burovskiy at gmail.com> wrote:
>>>
>>>> On Fri, Sep 30, 2016 at 6:29 PM, Charles R Harris
>>>> <charlesr.harris at gmail.com> wrote:
>>>> >
>>>> >
>>>> > On Fri, Sep 30, 2016 at 9:21 AM, Benjamin Root <ben.v.root at gmail.com>
>>>> wrote:
>>>> >>
>>>> >> This is the first I am hearing of tempita (looks to be a templating
>>>> >> language). How is it a dependency of numpy? Do I now need tempita in
>>>> order
>>>> >> to use numpy, or is it a build-time-only dependency?
>>>> >
>>>> >
>>>> > Build time only. The virtue of tempita is that it can be used to
>>>> generate
>>>> > cython sources. We could adapt one of our current templating scripts
>>>> to do
>>>> > that also, but that would seem to be more work. Note that tempita is
>>>> > currently included in cython, but the cython folks consider that an
>>>> > implemention detail that should not be depended upon.
>>>> >
>>>> > <snip>
>>>> >
>>>> > Chuck
>>>> >
>>>> > _______________________________________________
>>>> > NumPy-Discussion mailing list
>>>> > NumPy-Discussion at scipy.org
>>>> > https://mail.scipy.org/mailman/listinfo/numpy-discussion
>>>> >
>>>>
>>>>
>>>> Ideally, it's packaged in such a way that it's usable for scipy too --
>>>> at the moment it's used in scipy.sparse via Cython.Tempita + a
>>>> fallback to system installed tempita if Cython.Tempita is not
>>>> available (however I'm not sure that fallback is ever exercised).
>>>> Since scipy needs to support numpy down to 1.8.2, a vendorized copy
>>>> will not be usable for scipy for quite a while.
>>>>
>>>> So, it'd be great to handle it like numpydoc: to have npy_tempita as a
>>>> small self-contained package with the repo under the numpy
>>>> organization and include it via a git submodule. Chuck, do you think
>>>> tempita would need much in terms of maintenance?
>>>>
>>>> To put some money where my mouth is, I can offer to do some legwork
>>>> for packaging it up.
>>>>
>>>>
>>> It might be better to keep tempita and cythonize together so that the
>>> search path works out right. It is also possible that other scripts might
>>> be wanted as cythonize is currently restricted to cython files (*.pyx.in,
>>> *.pxi.in). There are two other templating scripts in numpy/distutils,
>>> and I think f2py has a dependency on one of those.
>>>
>>> If there is a set of tools that would be common to both scipy and numpy,
>>> having them included as a submodule would be a good idea.
>>>
>>>
>> Hmm, I suppose it just depends on where submodule is, so a npy_tempita
>> alone would work fine.  There isn't much maintenance needed if you resist
>> the urge to refactor the code. I removed a six dependency, but that is now
>> upstream as well.
>>
>
> There don't seem to be any objections, so I will put the current
> vendorization in.
>

LGTM as is. tools/ seems to be the right place, its outside the numpy
package so no one can import it as numpy.something, which is better than a
numpy.externals or numpy.vendor submodule.


> Evgeni, if you think it a good idea to make a repo for this and use
> submodules, go ahead with that. I have left out the testing infrastructure
> at https://github.com/gjhiggins/tempita which runs a sparse set of
> doctests.
>

There's a problem with that: it will then not be possible to do:
    git clone ...
    python setup.py install  # or equivalent
We shouldn't force everyone to mess with "git submodule" for this. I
suspect a submodule would also break a pip install directly from github.
There'll be very few (if any) changes from upstream Tempita, so making a
reusable npy_tempita seems premature.

Cheers,
Ralf
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20161001/ed687410/attachment.html>


More information about the NumPy-Discussion mailing list