Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 0 additions & 36 deletions LICENSES_bundled.txt

This file was deleted.

9 changes: 3 additions & 6 deletions meson.build
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
project(
'NumPy',
'c', 'cpp', 'cython',
version: run_command(
# This should become `numpy/_version.py` in NumPy 2.0
['numpy/_build_utils/gitversion.py'],
check: true).stdout().strip(),
license: 'BSD-3',
meson_version: '>=1.5.2', # version in vendored-meson is 1.5.2
version: run_command(['numpy/_build_utils/gitversion.py'], check: true).stdout().strip(),
license: 'BSD-3-Clause AND 0BSD AND MIT AND Zlib AND CC0-1.0',
meson_version: '>=1.8.3', # version in vendored-meson
default_options: [
'buildtype=debugoptimized',
'b_ndebug=if-release',
Expand Down
27 changes: 27 additions & 0 deletions numpy/_core/src/multiarray/dragon4_LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
Copyright (c) 2014 Ryan Juckett

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to
deal in the Software without restriction, including without limitation the
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
sell copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
IN THE SOFTWARE.

dragon4.c|h h contains a modified version of Ryan Juckett's Dragon4
implementation, obtained from https://www.ryanjuckett.com,
which has been ported from C++ to C and which has
modifications specific to printing floats in numpy.

Ryan Juckett's original code was under the Zlib license; he gave numpy
permission to include it under the MIT license instead.
52 changes: 47 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
[build-system]
build-backend = "mesonpy"
requires = [
"meson-python>=0.15.0",
"meson-python>=0.18.0",
"Cython>=3.0.6", # keep in sync with version check in meson.build
]

[project]
name = "numpy"
version = "2.4.0.dev0"
# TODO: add `license-files` once PEP 639 is accepted (see meson-python#88)
license = {file = "LICENSE.txt"}

description = "Fundamental package for array computing in Python"
authors = [{name = "Travis E. Oliphant et al."}]
maintainers = [
Expand All @@ -22,7 +19,6 @@ classifiers = [
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Science/Research',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Programming Language :: C',
'Programming Language :: Python',
'Programming Language :: Python :: 3',
Expand All @@ -40,6 +36,52 @@ classifiers = [
'Operating System :: Unix',
'Operating System :: MacOS',
]
# License info:
# - The main NumPy project license is BSD-3-Clause.
# - The SPDX license expression below reflects installed numpy packages when
# built from source (e.g., with `python -m build --wheel`), with no vendoring.
# - That SPDX expression is therefore incomplete for:
# (a) sdists - see the comment below `license-files` for other licenses
# included in the sdist
# (b) wheels on PyPI - most wheels include vendored libraries with additional licenses:
# - libopenblas : BSD-3-Clause AND BSD-3-Clause-Attribution (all except arm64 macOS>=14)
# - libgfortran : GPL-3.0-with-GCC-exception (all except arm64 macOS>=14)
# - libquadmath : LGPL-2.1-or-later (all except arm64 macOS>=14 and Windows)
# The licenses for these vendored components are dynamically included
# in the build process for PyPI wheels.
license = 'BSD-3-Clause AND 0BSD AND MIT AND Zlib AND CC0-1.0'
license-files = [
'LICENSE.txt', # BSD-3-Clause
'numpy/_core/include/numpy/libdivide/LICENSE.txt', # Zlib
'numpy/_core/src/common/pythoncapi-compat/COPYING', # 0BSD
'numpy/_core/src/highway/LICENSE-BSD3', # BSD-3-Clause
'numpy/_core/src/multiarray/dragon4_LICENSE.txt', # MIT
'numpy/_core/src/npysort/x86-simd-sort/LICENSE.md', # BSD-3-Clause
'numpy/_core/src/umath/svml/LICENSE', # BSD-3-Clause
'numpy/fft/pocketfft/LICENSE.md', # BSD-3-Clause
'numpy/ma/LICENSE', # BSD-3-Clause
'numpy/linalg/lapack_lite/LICENSE.txt', # BSD-3-Clause
'numpy/random/LICENSE.md', # BSD-3-Clause
'numpy/random/src/distributions/LICENSE.md', # BSD-3-Clause AND MIT
'numpy/random/src/mt19937/LICENSE.md', # BSD-3-Clause AND MIT
'numpy/random/src/pcg64/LICENSE.md', # MIT
'numpy/random/src/philox/LICENSE.md', # BSD-3-Clause
'numpy/random/src/sfc64/LICENSE.md', # MIT
'numpy/random/src/splitmix64/LICENSE.md', # CC0-1.0
]
# The license files below apply only to files in the repo and sdist, not to
# installed `numpy` packages or wheels (build/doc tools don't affect the
# license of the installed package). We have to make a choice whether to add
# those to the SPDX expression above since PEP 639 is unclear on the
# differences; we choose to make the SPDX expression reflect *a wheel built
# from the sources*.
# '.spin/LICENSE', # BSD-3-Clause
# 'doc/source/_static/scipy-mathjax/LICENSE', # Apache-2.0
# 'numpy/_build_utils/tempita/LICENSE.txt', # BSD-3-Clause
# 'vendored-meson/meson/COPYING', # Apache-2.0
# Note that the commented out license files are still included in the sdist,
# just not in Core Metadata and in the .dist-info directory.


[project.scripts]
f2py = 'numpy.f2py.f2py2e:main'
Expand Down
2 changes: 1 addition & 1 deletion tools/wheels/check_license.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def main():
distinfo_path = next(iter(sitepkgs.glob("numpy-*.dist-info")))

# Check license text
license_txt = distinfo_path / "LICENSE.txt"
license_txt = distinfo_path / "licenses" / "LICENSE.txt"
with open(license_txt, encoding="utf-8") as f:
text = f.read()

Expand Down
1 change: 0 additions & 1 deletion tools/wheels/cibw_before_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ rm -rf build
echo "" >> $PROJECT_DIR/LICENSE.txt
echo "----" >> $PROJECT_DIR/LICENSE.txt
echo "" >> $PROJECT_DIR/LICENSE.txt
cat $PROJECT_DIR/LICENSES_bundled.txt >> $PROJECT_DIR/LICENSE.txt
if [[ $RUNNER_OS == "Linux" ]] ; then
cat $PROJECT_DIR/tools/wheels/LICENSE_linux.txt >> $PROJECT_DIR/LICENSE.txt
elif [[ $RUNNER_OS == "macOS" ]]; then
Expand Down
Loading