-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Port requirements to PEP735 #29281
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
base: main
Are you sure you want to change the base?
Port requirements to PEP735 #29281
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -50,12 +50,12 @@ jobs: | |
- name-suffix: "(Minimum Versions)" | ||
os: ubuntu-22.04 | ||
python-version: '3.11' | ||
extra-requirements: '-c requirements/testing/minver.txt' | ||
extra-requirements: 'python -m pip install --upgrade $PRE --group test-minver' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why the addition of |
||
delete-font-cache: true | ||
- os: ubuntu-22.04 | ||
python-version: '3.11' | ||
CFLAGS: "-fno-lto" # Ensure that disabling LTO works. | ||
extra-requirements: '-r requirements/testing/extra.txt' | ||
extra-requirements: 'python -m pip install --upgrade $PRE --prefer-binary --group test-extra' | ||
- os: ubuntu-22.04-arm | ||
python-version: '3.12' | ||
- os: ubuntu-22.04 | ||
|
@@ -170,15 +170,15 @@ jobs: | |
if: startsWith(runner.os, 'Linux') | ||
with: | ||
path: ~/.cache/pip | ||
key: ${{ matrix.os }}-py${{ matrix.python-version }}-pip-${{ hashFiles('requirements/*/*.txt') }} | ||
key: ${{ matrix.os }}-py${{ matrix.python-version }}-pip-${{ hashFiles('pyproject.toml') }} | ||
restore-keys: | | ||
${{ matrix.os }}-py${{ matrix.python-version }}-pip- | ||
- name: Cache pip | ||
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3 | ||
if: startsWith(runner.os, 'macOS') | ||
with: | ||
path: ~/Library/Caches/pip | ||
key: ${{ matrix.os }}-py${{ matrix.python-version }}-pip-${{ hashFiles('requirements/*/*.txt') }} | ||
key: ${{ matrix.os }}-py${{ matrix.python-version }}-pip-${{ hashFiles('pyproject.toml') }} | ||
restore-keys: | | ||
${{ matrix.os }}-py${{ matrix.python-version }}-pip- | ||
- name: Cache ccache | ||
|
@@ -215,12 +215,8 @@ jobs: | |
|
||
# Install dependencies from PyPI. | ||
# Preinstall build requirements to enable no-build-isolation builds. | ||
python -m pip install --upgrade $PRE \ | ||
'contourpy>=1.0.1' cycler fonttools kiwisolver importlib_resources \ | ||
packaging pillow 'pyparsing!=3.1.0' python-dateutil setuptools-scm \ | ||
'meson-python>=0.13.1' 'pybind11>=2.13.2' \ | ||
-r requirements/testing/all.txt \ | ||
${{ matrix.extra-requirements }} | ||
python -m pip install --upgrade $PRE --group build --group test | ||
${{ matrix.extra-requirements }} | ||
|
||
# Install optional dependencies from PyPI. | ||
# Sphinx is needed to run sphinxext tests | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -74,8 +74,9 @@ stages: | |
|
||
- bash: | | ||
python -m pip install --upgrade pip | ||
python -m pip install --upgrade -r requirements/dev/build-requirements.txt | ||
python -m pip install -r requirements/testing/all.txt -r requirements/testing/extra.txt | ||
python -m pip install --upgrade --group build | ||
python -m pip install --group test | ||
python -m pip install --prefer-binary --group test-extra | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Worth a comment explaining the reason for using |
||
displayName: 'Install dependencies with pip' | ||
|
||
- bash: | | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,10 +24,9 @@ classifiers=[ | |
|
||
# When updating the list of dependencies, add an api_changes/development | ||
# entry and also update the following places: | ||
# - the `build` and `test-minver` dependency groups below | ||
# - lib/matplotlib/__init__.py (matplotlib._check_versions()) | ||
# - requirements/testing/minver.txt | ||
# - doc/devel/dependencies.rst | ||
# - .github/workflows/tests.yml | ||
# - environment.yml | ||
dependencies = [ | ||
"contourpy >= 1.0.1", | ||
|
@@ -42,20 +41,6 @@ dependencies = [ | |
] | ||
requires-python = ">=3.11" | ||
|
||
[project.optional-dependencies] | ||
# Should be a copy of the build dependencies below. | ||
dev = [ | ||
"meson-python>=0.13.1,<0.17.0", | ||
"pybind11>=2.13.2,!=2.13.3", | ||
"setuptools_scm>=7", | ||
# Not required by us but setuptools_scm without a version, cso _if_ | ||
# installed, then setuptools_scm 8 requires at least this version. | ||
# Unfortunately, we can't do a sort of minimum-if-installed dependency, so | ||
# we need to keep this for now until setuptools_scm _fully_ drops | ||
# setuptools. | ||
"setuptools>=64", | ||
] | ||
|
||
[project.urls] | ||
"Homepage" = "https://matplotlib.org" | ||
"Download" = "https://matplotlib.org/stable/install/index.html" | ||
|
@@ -67,13 +52,137 @@ dev = [ | |
|
||
[build-system] | ||
build-backend = "mesonpy" | ||
# Also keep in sync with optional dependencies above. | ||
# Also keep in sync with dependency groups below. | ||
requires = [ | ||
"meson-python>=0.13.1,<0.17.0", | ||
"pybind11>=2.13.2,!=2.13.3", | ||
"setuptools_scm>=7", | ||
] | ||
|
||
[dependency-groups] | ||
build = [ | ||
# Should be the same as `[project] dependencies` above. | ||
"contourpy >= 1.0.1", | ||
"cycler >= 0.10", | ||
"fonttools >= 4.22.0", | ||
"kiwisolver >= 1.3.1", | ||
"numpy >= 1.25", | ||
"packaging >= 20.0", | ||
"pillow >= 9", | ||
"pyparsing >= 3", | ||
"python-dateutil >= 2.7", | ||
|
||
# Should be the same as `[build-system] requires` above. | ||
"meson-python>=0.13.1,<0.17.0", | ||
"pybind11>=2.13.2,!=2.13.3", | ||
"setuptools_scm>=7", | ||
# Not required by us but setuptools_scm without a version, so _if_ | ||
# installed, then setuptools_scm 8 requires at least this version. | ||
# Unfortunately, we can't do a sort of minimum-if-installed dependency, so | ||
# we need to keep this for now until setuptools_scm _fully_ drops | ||
# setuptools. | ||
"setuptools>=64", | ||
] | ||
dev = [ | ||
{include-group = "build"}, | ||
{include-group = "doc"}, | ||
{include-group = "test"}, | ||
{include-group = "test-extra"}, | ||
"ruff", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
] | ||
# Requirements for building docs | ||
# | ||
# You will first need a matching Matplotlib installation | ||
# e.g (from the Matplotlib root directory) | ||
# pip install --group build --no-build-isolation --editable . | ||
# | ||
# Install the documentation requirements with: | ||
# pip install --group doc | ||
# | ||
doc = [ | ||
"sphinx>=5.1.0,!=6.1.2", | ||
"colorspacious", | ||
"ipython", | ||
"ipywidgets", | ||
"ipykernel", | ||
"numpydoc>=1.0", | ||
"pydata-sphinx-theme~=0.15.0", | ||
"mpl-sphinx-theme~=3.9.0", | ||
"pyyaml", | ||
"PyStemmer", | ||
"sphinxcontrib-svg2pdfconverter>=1.1.0", | ||
"sphinxcontrib-video>=0.2.1", | ||
"sphinx-copybutton", | ||
"sphinx-design", | ||
"sphinx-gallery[parallel]>=0.12.0", | ||
"sphinx-tags>=0.4.0", | ||
] | ||
|
||
# pip requirements for all the CI builds | ||
test = [ | ||
"black<24", | ||
"certifi", | ||
"coverage!=6.3", | ||
"psutil; sys_platform != 'cygwin'", | ||
"pytest!=4.6.0,!=5.4.0,!=8.1.0", | ||
"pytest-cov", | ||
"pytest-rerunfailures", | ||
"pytest-timeout", | ||
"pytest-xdist", | ||
"pytest-xvfb", | ||
"tornado", | ||
] | ||
|
||
# Extra pip requirements | ||
test-extra = [ | ||
"ipykernel", | ||
# jupyter/nbconvert#1970 for the 7.3 series exclusions | ||
"nbconvert[execute]!=6.0.0,!=6.0.1,!=7.3.0,!=7.3.1", | ||
"nbformat!=5.0.0,!=5.0.1", | ||
"pandas!=0.25.0", | ||
"pikepdf", | ||
"pytz", | ||
"pywin32; sys_platform == 'win32'", | ||
"xarray", | ||
] | ||
|
||
# Extra pip requirements for the minimum-version CI run | ||
test-minver = [ | ||
"contourpy==1.0.1", | ||
"cycler==0.10", | ||
"fonttools==4.22.0", | ||
"importlib-resources==3.2.0", | ||
"kiwisolver==1.3.2", | ||
"meson-python==0.13.1", | ||
"meson==1.1.0", | ||
"numpy==1.25.0", | ||
"packaging==20.0", | ||
"pillow==9.0.1", | ||
"pyparsing==3.0.0", | ||
"pytest==7.0.0", | ||
"python-dateutil==2.7", | ||
# Test ipython/matplotlib-inline before backend mapping moved to mpl. | ||
# This should be tested for a reasonably long transition period, | ||
# but we will eventually remove the test when we no longer support | ||
# ipython/matplotlib-inline versions from before the transition. | ||
"ipython==7.29.0", | ||
"ipykernel==5.5.6", | ||
"matplotlib-inline<0.1.7", | ||
] | ||
|
||
# Extra pip requirements for the GitHub Actions mypy build | ||
typing = [ | ||
"mypy>=1.9", | ||
"typing-extensions>=4.6", | ||
# Extra stubs distributed separately from the main pypi package | ||
"pandas-stubs", | ||
"types-pillow", | ||
"types-python-dateutil", | ||
"types-psutil", | ||
"sphinx", | ||
{include-group = "build"}, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Given the |
||
] | ||
|
||
[tool.meson-python.args] | ||
install = ['--tags=data,python-runtime,runtime'] | ||
|
||
|
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
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.
does this also need group "test"?
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.
I'm hoping not, so we can reduce the install set.