Skip to content

Commit 231a093

Browse files
committed
BLD: Implement PEP639 licensing
1 parent 8dc2d1a commit 231a093

File tree

7 files changed

+12
-23
lines changed

7 files changed

+12
-23
lines changed

.github/workflows/cibuildwheel.yml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -51,14 +51,6 @@ jobs:
5151
with:
5252
python-version: '3.11'
5353

54-
# Something changed somewhere that prevents the downloaded-at-build-time
55-
# licenses from being included in built wheels, so pre-download them so
56-
# that they exist before the build and are included.
57-
- name: Pre-download bundled licenses
58-
run: >
59-
curl -Lo LICENSE/LICENSE_QHULL
60-
https://github.com/qhull/qhull/raw/2020.2/COPYING.txt
61-
6254
- name: Install dependencies
6355
run: python -m pip install build twine
6456

.github/workflows/tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ jobs:
231231
python -m pip install --upgrade $PRE \
232232
'contourpy>=1.0.1' cycler fonttools kiwisolver importlib_resources \
233233
packaging pillow 'pyparsing!=3.1.0' python-dateutil setuptools-scm \
234-
'meson-python>=0.13.1' 'pybind11>=2.13.2' \
234+
'meson-python>=0.18.0' 'pybind11>=2.13.2' \
235235
-r requirements/testing/all.txt \
236236
${{ matrix.extra-requirements }}
237237

ci/check_wheel_licenses.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
with zipfile.ZipFile(wheel) as f:
2626
wheel_license_file_names = {Path(path).name
2727
for path in sorted(f.namelist())
28-
if '.dist-info/LICENSE' in path}
28+
if '.dist-info/licenses/LICENSE' in path}
2929
if not (len(wheel_license_file_names) and
3030
wheel_license_file_names.issuperset(license_file_names)):
3131
sys.exit(f'LICENSE file(s) missing:\n'

meson.build

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ project(
77
'-m', 'setuptools_scm', check: true).stdout().strip(),
88
# qt_editor backend is MIT
99
# ResizeObserver at end of lib/matplotlib/backends/web_backend/js/mpl.js is CC0
10-
# Carlogo, STIX and Computer Modern is OFL
10+
# Carlogo, STIX, Computer Modern and Last Resort are OFL
1111
# DejaVu is Bitstream Vera and Public Domain
12-
license: 'PSF-2.0 AND MIT AND CC0-1.0 AND OFL-1.1 AND Bitstream-Vera AND Public-Domain',
12+
license: 'PSF-2.0 AND MIT AND CC0-1.0 AND OFL-1.1 AND Bitstream-Vera AND LicenseRef-Public-Domain',
1313
license_files: [
1414
'LICENSE/LICENSE',
1515
'LICENSE/LICENSE_AMSFONTS',
@@ -18,6 +18,7 @@ project(
1818
'LICENSE/LICENSE_COLORBREWER',
1919
'LICENSE/LICENSE_COURIERTEN',
2020
'LICENSE/LICENSE_JSXTOOLS_RESIZE_OBSERVER',
21+
'LICENSE/LICENSE_LAST_RESORT_FONT',
2122
'LICENSE/LICENSE_QT4_EDITOR',
2223
'LICENSE/LICENSE_SOLARIZED',
2324
'LICENSE/LICENSE_STIX',

pyproject.toml

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,12 @@ authors = [
66
]
77
description = "Python plotting package"
88
readme = "README.md"
9-
license = { file = "LICENSE/LICENSE" }
10-
dynamic = ["version"]
9+
dynamic = ["version", "license", "license-files"]
1110
classifiers=[
1211
"Development Status :: 5 - Production/Stable",
1312
"Framework :: Matplotlib",
1413
"Intended Audience :: Science/Research",
1514
"Intended Audience :: Education",
16-
"License :: OSI Approved :: Python Software Foundation License",
1715
"Programming Language :: Python",
1816
"Programming Language :: Python :: 3",
1917
"Programming Language :: Python :: 3.11",
@@ -46,10 +44,10 @@ requires-python = ">=3.11"
4644
[project.optional-dependencies]
4745
# Should be a copy of the build dependencies below.
4846
dev = [
49-
"meson-python>=0.13.1,!=0.17.*",
47+
"meson-python>=0.18.0",
5048
"pybind11>=2.13.2,!=2.13.3",
5149
"setuptools_scm>=7",
52-
# Not required by us but setuptools_scm without a version, cso _if_
50+
# Not required by us but setuptools_scm without a version, so _if_
5351
# installed, then setuptools_scm 8 requires at least this version.
5452
# Unfortunately, we can't do a sort of minimum-if-installed dependency, so
5553
# we need to keep this for now until setuptools_scm _fully_ drops
@@ -70,9 +68,7 @@ dev = [
7068
build-backend = "mesonpy"
7169
# Also keep in sync with optional dependencies above.
7270
requires = [
73-
# meson-python 0.17.x breaks symlinks in sdists. You can remove this pin if
74-
# you really need it and aren't using an sdist.
75-
"meson-python>=0.13.1,!=0.17.*",
71+
"meson-python>=0.18.0",
7672
"pybind11>=2.13.2,!=2.13.3",
7773
"setuptools_scm>=7",
7874
]
@@ -92,7 +88,7 @@ manylinux-x86_64-image = "manylinux2014"
9288

9389
before-build = "rm -rf {package}/build"
9490
test-command = [
95-
# "python {package}/ci/check_wheel_licenses.py {wheel}",
91+
"python {package}/ci/check_wheel_licenses.py {wheel}",
9692
"python {package}/ci/check_version_number.py",
9793
]
9894
test-environment = "PIP_PREFER_BINARY=true"
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
pybind11>=2.13.2,!=2.13.3
2-
meson-python
2+
meson-python>0.18.0
33
setuptools-scm

requirements/testing/minver.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ cycler==0.10
55
fonttools==4.22.0
66
importlib-resources==3.2.0
77
kiwisolver==1.3.2
8-
meson-python==0.13.1
8+
meson-python==0.18.0
99
meson==1.1.0
1010
numpy==1.25.0
1111
packaging==20.0

0 commit comments

Comments
 (0)