Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

Commit3b30f47

Browse files
authored
Merge pull request#25381 from neutrinoceros/hotfix_25244
ENH: switch mpl_toolkits to implicit namespace package (PEP 420)
2 parents72885cc +0cc5284 commit3b30f47

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
importshutil
3030
importsubprocess
3131

32-
fromsetuptoolsimportsetup,find_packages,Distribution,Extension
32+
fromsetuptoolsimportsetup,find_namespace_packages,Distribution,Extension
3333
importsetuptools.command.build_ext
3434
importsetuptools.command.build_py
3535
importsetuptools.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)

[8]ページ先頭

©2009-2025 Movatter.jp