Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Add machinery to generate test-only wheels. #17434

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

Closed
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
2 changes: 0 additions & 2 deletions 2 MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
include INSTALL.rst README.rst
include pytest.ini
include MANIFEST.in
include matplotlibrc.template setup.cfg.template
include setupext.py setup.py
Expand All @@ -20,4 +19,3 @@ recursive-include tools *
recursive-include tutorials *
include versioneer.py
include lib/matplotlib/_version.py
include tests.py
4 changes: 4 additions & 0 deletions 4 doc/devel/release_guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,10 @@ day), generate the tarball ::
git checkout v2.0.0
git clean -xfd
python setup.py sdist
# Generate test-only wheels.
for dir in sub-wheels/*; do
(cd "$dir" && python setup.py bdist_wheel)
done

and copy all of the wheels into :file:`dist` directory. First, check
that the dist files are OK ::
Expand Down
7 changes: 0 additions & 7 deletions 7 setup.cfg.template
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,6 @@
#system_freetype = False
#system_qhull = False

[packages]
# There are a number of data subpackages from Matplotlib that are
# considered optional. All except 'tests' data (meaning the baseline
# image files) are installed by default, but that can be changed here.
#tests = False
#sample_data = True

[gui_support]
# Matplotlib supports multiple GUI toolkits, known as backends.
# The MacOSX backend requires the Cocoa headers included with XCode.
Expand Down
5 changes: 5 additions & 0 deletions 5 sub-wheels/matplotlib.tests/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
include sub-wheels/matplotlib.tests/README.rst
include sub-wheels/matplotlib.tests/MANIFEST.in
include matplotlibrc.template sub-wheels/matplotlib.test/setup.cfg.template
include pytest.ini
include tests.py
12 changes: 12 additions & 0 deletions 12 sub-wheels/matplotlib.tests/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
Running ``python setup.py bdist_wheel`` (*not* ``pip wheel .``) generates a
wheel for a ``matplotlib.tests`` distribution (in the distutils sense, i.e.
a PyPI package) that can be installed alongside a main, test-less Matplotlib
distribution.

Note that

- ``pip wheel`` doesn't work as that starts by copying the *current* directory
to a temporary one (for isolation purposes), before we get to ``chdir`` back
to the root directory.
- ``python setup.py sdist`` doesn't work as that would pick up the
``MANIFEST.in`` file in the root directory.
8 changes: 8 additions & 0 deletions 8 sub-wheels/matplotlib.tests/setup.cfg.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Rename this file to setup.cfg to modify Matplotlib-tests's build options.

[packages]
# There are a number of data subpackages from Matplotlib that are
# considered optional. All except 'tests' data (meaning the baseline
# image files) are installed by default, but that can be changed here.
#tests = False
#sample_data = True
27 changes: 27 additions & 0 deletions 27 sub-wheels/matplotlib.tests/setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import os
from pathlib import Path
import sys


rootdir = str(Path(__file__).resolve().parents[2])
sys.path.insert(0, rootdir)
os.chdir(rootdir)


from setuptools import setup, find_packages
import versioneer


__version__ = versioneer.get_version()


if "sdist" in sys.argv:
sys.exit("Only wheels can be generated.")
setup(
name="matplotlib.tests",
version=__version__,
package_dir={"": "lib"},
packages=find_packages("lib", include=["*.tests"]),
include_package_data=True,
install_requires=["matplotlib=={}".format(__version__)]
)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.