Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 3b30f47

Browse files
authored
Merge pull request #25381 from neutrinoceros/hotfix_25244
ENH: switch mpl_toolkits to implicit namespace package (PEP 420)
2 parents 72885cc + 0cc5284 commit 3b30f47

File tree

3 files changed

+11
-7
lines changed

3 files changed

+11
-7
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
``matplotlib.mpl_toolkits`` is now an implicit namespace package
2+
----------------------------------------------------------------
3+
4+
Following the deprecation of ``pkg_resources.declare_namespace`` in ``setuptools`` 67.3.0,
5+
``matplotlib.mpl_toolkits`` is now implemented as an implicit namespace, following
6+
`PEP 420 <https://peps.python.org/pep-0420/>`_.

lib/mpl_toolkits/__init__.py

Lines changed: 0 additions & 4 deletions
This file was deleted.

setup.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
import shutil
3030
import subprocess
3131

32-
from setuptools import setup, find_packages, Distribution, Extension
32+
from setuptools import setup, find_namespace_packages, Distribution, Extension
3333
import setuptools.command.build_ext
3434
import setuptools.command.build_py
3535
import setuptools.command.sdist
@@ -301,8 +301,10 @@ def make_release_tree(self, base_dir, files):
301301
],
302302

303303
package_dir={"": "lib"},
304-
packages=find_packages("lib"),
305-
namespace_packages=["mpl_toolkits"],
304+
packages=find_namespace_packages(
305+
where="lib",
306+
exclude=["*baseline_images*", "*tinypages*", "*mpl-data*", "*web_backend*"],
307+
),
306308
py_modules=["pylab"],
307309
# Dummy extension to trigger build_ext, which will swap it out with
308310
# real extensions that can depend on numpy for the build.

0 commit comments

Comments
 (0)