New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MAINT: vendor Tempita in scipy/_build_utils
#20572
Conversation
IANAL, but I looked through the changes and IMHO none of them would hand any non-trivial chunk of code over to other authors than in the original copy of Tempita that we included and possibly me. Almost all change were trivial adaptations or removals, many of them machine generated. I hereby grant you the right to use my changes under the original code's MIT license, or the 3-clause BSD license that SciPy currently uses. |
Thanks @scoder, much appreciated! |
I knew the |
Right, I agree with your diagnosis. I can't think of an obvious refactor. It seems we would have to extract the Alternatively, maybe |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
never mind, here's the one-line (okay, two-line) fix!
This is an unmodified copy from `Cython/Tempita/` as of commit `023d4af35` in Cython's master branch (21 April 2024). Tempita hasn't been maintained independently on PyPI for 10+ years; we've used the Cython version which is semi-public (undocumented) for a while, with the note that we should vendor it if that ever fails. It now failed once (see scipy#20535), and conceptually that makes sense - this is the only place where we don't invoke the `cython` executable but actually do `import Cython`. That can fail in a distro setup where Cython is installed for a different Python interpreter than the active one. The license file was taken over from the `maintenance/1.26.x` branch in the `numpy` repo - which came from the original upstream repo for Tempita (now disappeared) as discussed in numpy#8096. See scipy#20572 for more clarification about the MIT license that this code is under.
Co-authored-by: Lucas Colley <lucas.colley8@gmail.com>
e2ef11e
to
42da1b4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Thanks for the review @lucascolley. Going to hit the green button here, so I can work on the next step. |
import Cython
but only on invoking thecython
executablecustom_target(..., command: [py3, ...])
inmeson.build
files. RunningTempita
is one of them.This is an unmodified copy from
Cython/Tempita/
as of commit023d4af35
in Cython's master branch (21 April 2024). Tempita hasn't been maintained independently on PyPI for 10+ years; we've used the Cython version which is semi-public (undocumented) for a while, with the note that we should vendor it if that ever fails. It now failed once (see #20535), and conceptually that makes sense - this is the only place where we don't invoke thecython
executable but actually doimport Cython
. That can fail in a distro setup where Cython is installed for a different Python interpreter than the active one.License
Opening as a draft PR to clarify the licensing situation of this code first:
Tempita
was MIT-licensed, see https://pypi.org/project/Tempita/ (a single declaration, no full copy of the MIT license text in the sdist)Tempita
code since 2011 it looks like, but rather commits are minor maintenance/style change (running2to3
,pyupgrade
, etc.). So I think we should be able still consider this code as MIT-licensed - but that requires confirmation from @scoder I think, as Cython lead dev and author of most of the commits that touched this code.Cython/Tempita/
code under the original MIT license, or do you now consider it mixed MIT/Apache licensed?TODO:
LICENSES_bundled.txt