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

[wip] Add machinery to generate test-only wheels. #11732

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
wants to merge 1 commit into from
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
4 changes: 4 additions & 0 deletions 4 doc/devel/release_guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,10 @@ Once you have collected all of the wheels, 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. You should use
``twine`` to upload all of the files to pypi ::
Expand Down
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.
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.