Skip to content

Commit be52df5

Browse files
authored
BLD Adds runtime lincense to wheels (scikit-learn#29861)
1 parent 65ba28c commit be52df5

File tree

9 files changed

+453
-3
lines changed

9 files changed

+453
-3
lines changed

.github/workflows/wheels.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,15 +194,17 @@ jobs:
194194
# toolchain
195195
CIBW_CONFIG_SETTINGS_WINDOWS: "setup-args=--vsenv"
196196
CIBW_REPAIR_WHEEL_COMMAND_WINDOWS: bash build_tools/github/repair_windows_wheels.sh {wheel} {dest_dir}
197+
CIBW_BEFORE_BUILD: bash {project}/build_tools/wheels/cibw_before_build.sh {project}
197198
CIBW_BEFORE_TEST_WINDOWS: bash build_tools/github/build_minimal_windows_image.sh ${{ matrix.python }}
198199
CIBW_BEFORE_TEST: bash {project}/build_tools/wheels/cibw_before_test.sh
200+
CIBW_ENVIRONMENT_PASS_LINUX: RUNNER_OS
199201
CIBW_TEST_REQUIRES: pytest pandas
200202
# On Windows, we use a custom Docker image and CIBW_TEST_REQUIRES_WINDOWS
201203
# does not make sense because it would install dependencies in the host
202204
# rather than inside the Docker image
203205
CIBW_TEST_REQUIRES_WINDOWS: ""
204-
CIBW_TEST_COMMAND: bash {project}/build_tools/wheels/test_wheels.sh
205-
CIBW_TEST_COMMAND_WINDOWS: bash {project}/build_tools/github/test_windows_wheels.sh ${{ matrix.python }}
206+
CIBW_TEST_COMMAND: bash {project}/build_tools/wheels/test_wheels.sh {project}
207+
CIBW_TEST_COMMAND_WINDOWS: bash {project}/build_tools/github/test_windows_wheels.sh ${{ matrix.python }} {project}
206208
CIBW_BUILD_VERBOSITY: 1
207209

208210
run: bash build_tools/wheels/build_wheels.sh

build_tools/cirrus/arm_wheel.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,11 @@ linux_arm64_wheel_task:
88
memory: 4G
99
env:
1010
CIBW_ENVIRONMENT: SKLEARN_SKIP_NETWORK_TESTS=1
11-
CIBW_TEST_COMMAND: bash {project}/build_tools/wheels/test_wheels.sh
11+
CIBW_BEFORE_BUILD: bash {project}/build_tools/wheels/cibw_before_build.sh {project}
12+
CIBW_TEST_COMMAND: bash {project}/build_tools/wheels/test_wheels.sh {project}
1213
CIBW_TEST_REQUIRES: pytest pandas threadpoolctl pytest-xdist
1314
CIBW_BUILD_VERBOSITY: 1
15+
RUNNER_OS: Linux
1416
# Upload tokens have been encrypted via the CirrusCI interface:
1517
# https://cirrus-ci.org/guide/writing-tasks/#encrypted-variables
1618
# See `maint_tools/update_tracking_issue.py` for details on the permissions the token requires.

build_tools/github/test_windows_wheels.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ set -e
44
set -x
55

66
PYTHON_VERSION=$1
7+
PROJECT_DIR=$2
8+
9+
python $PROJECT_DIR/build_tools/wheels/check_license.py
710

811
docker container run \
912
--rm scikit-learn/minimal-windows \

build_tools/wheels/LICENSE_linux.txt

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
This binary distribution of scikit-learn also bundles the following software:
2+
3+
----
4+
5+
Name: GCC runtime library
6+
Files: scikit_learn.libs/libgomp*.so*
7+
Availability: https://gcc.gnu.org/git/?p=gcc.git;a=tree;f=libgomp
8+
9+
GCC RUNTIME LIBRARY EXCEPTION
10+
11+
Version 3.1, 31 March 2009
12+
13+
Copyright (C) 2009 Free Software Foundation, Inc. <http://fsf.org/>
14+
15+
Everyone is permitted to copy and distribute verbatim copies of this
16+
license document, but changing it is not allowed.
17+
18+
This GCC Runtime Library Exception ("Exception") is an additional
19+
permission under section 7 of the GNU General Public License, version
20+
3 ("GPLv3"). It applies to a given file (the "Runtime Library") that
21+
bears a notice placed by the copyright holder of the file stating that
22+
the file is governed by GPLv3 along with this Exception.
23+
24+
When you use GCC to compile a program, GCC may combine portions of
25+
certain GCC header files and runtime libraries with the compiled
26+
program. The purpose of this Exception is to allow compilation of
27+
non-GPL (including proprietary) programs to use, in this way, the
28+
header files and runtime libraries covered by this Exception.
29+
30+
0. Definitions.
31+
32+
A file is an "Independent Module" if it either requires the Runtime
33+
Library for execution after a Compilation Process, or makes use of an
34+
interface provided by the Runtime Library, but is not otherwise based
35+
on the Runtime Library.
36+
37+
"GCC" means a version of the GNU Compiler Collection, with or without
38+
modifications, governed by version 3 (or a specified later version) of
39+
the GNU General Public License (GPL) with the option of using any
40+
subsequent versions published by the FSF.
41+
42+
"GPL-compatible Software" is software whose conditions of propagation,
43+
modification and use would permit combination with GCC in accord with
44+
the license of GCC.
45+
46+
"Target Code" refers to output from any compiler for a real or virtual
47+
target processor architecture, in executable form or suitable for
48+
input to an assembler, loader, linker and/or execution
49+
phase. Notwithstanding that, Target Code does not include data in any
50+
format that is used as a compiler intermediate representation, or used
51+
for producing a compiler intermediate representation.
52+
53+
The "Compilation Process" transforms code entirely represented in
54+
non-intermediate languages designed for human-written code, and/or in
55+
Java Virtual Machine byte code, into Target Code. Thus, for example,
56+
use of source code generators and preprocessors need not be considered
57+
part of the Compilation Process, since the Compilation Process can be
58+
understood as starting with the output of the generators or
59+
preprocessors.
60+
61+
A Compilation Process is "Eligible" if it is done using GCC, alone or
62+
with other GPL-compatible software, or if it is done without using any
63+
work based on GCC. For example, using non-GPL-compatible Software to
64+
optimize any GCC intermediate representations would not qualify as an
65+
Eligible Compilation Process.
66+
67+
1. Grant of Additional Permission.
68+
69+
You have permission to propagate a work of Target Code formed by
70+
combining the Runtime Library with Independent Modules, even if such
71+
propagation would otherwise violate the terms of GPLv3, provided that
72+
all Target Code was generated by Eligible Compilation Processes. You
73+
may then convey such a combination under terms of your choice,
74+
consistent with the licensing of the Independent Modules.
75+
76+
2. No Weakening of GCC Copyleft.
77+
78+
The availability of this Exception does not imply any general
79+
presumption that third-party software is unaffected by the copyleft
80+
requirements of the license of GCC.

0 commit comments

Comments
 (0)