From 2dc651c02d9a1eef1f28fd1e3491e9a795a11664 Mon Sep 17 00:00:00 2001 From: Michael Howitz Date: Wed, 8 Nov 2023 10:43:25 +0100 Subject: [PATCH] Switch to implicit (native) namespace for `sphinxcontrib`. --- CHANGES.rst | 1 + setup.py | 5 ++--- sphinxcontrib/__init__.py | 12 ------------ sphinxcontrib/{redoc.py => redoc/__init__.py} | 0 sphinxcontrib/{ => redoc}/redoc.j2 | 0 sphinxcontrib/{ => redoc}/redoc.js | 0 6 files changed, 3 insertions(+), 15 deletions(-) delete mode 100644 sphinxcontrib/__init__.py rename sphinxcontrib/{redoc.py => redoc/__init__.py} (100%) rename sphinxcontrib/{ => redoc}/redoc.j2 (100%) rename sphinxcontrib/{ => redoc}/redoc.js (100%) diff --git a/CHANGES.rst b/CHANGES.rst index 31a04e7..c5ae200 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -3,6 +3,7 @@ - Drop support for Python 2.7, 3.5, 3.6. - Add support for Python 3.9, 3.10, 3.11, 3.12. +- Switch to implicit (native) namespace for ``sphinxcontrib``. 1.6.0 (2020-04-17) diff --git a/setup.py b/setup.py index b2de312..d582892 100644 --- a/setup.py +++ b/setup.py @@ -1,7 +1,7 @@ import os from io import open -from setuptools import setup, find_packages +from setuptools import setup here = os.path.dirname(__file__) @@ -19,7 +19,7 @@ keywords='sphinx openapi swagger rest api renderer docs redoc', author='Ihor Kalnytskyi', author_email='ihor@kalnytskyi.com', - packages=find_packages(exclude=['docs', 'tests*']), + packages=['sphinxcontrib.redoc'], include_package_data=True, zip_safe=False, use_scm_version=True, @@ -47,5 +47,4 @@ 'Programming Language :: Python :: 3.11', 'Programming Language :: Python :: 3.12', ], - namespace_packages=['sphinxcontrib'], ) diff --git a/sphinxcontrib/__init__.py b/sphinxcontrib/__init__.py deleted file mode 100644 index 9dee192..0000000 --- a/sphinxcontrib/__init__.py +++ /dev/null @@ -1,12 +0,0 @@ -""" - sphinxcontrib - ~~~~~~~~~~~~~ - - This package is a namespace package that contains all extensions - distributed in the ``sphinx-contrib`` distribution. - - :copyright: (c) 2017 by Ihor Kalnytskyi. - :license: BSD, see LICENSE for details. -""" - -__import__('pkg_resources').declare_namespace(__name__) diff --git a/sphinxcontrib/redoc.py b/sphinxcontrib/redoc/__init__.py similarity index 100% rename from sphinxcontrib/redoc.py rename to sphinxcontrib/redoc/__init__.py diff --git a/sphinxcontrib/redoc.j2 b/sphinxcontrib/redoc/redoc.j2 similarity index 100% rename from sphinxcontrib/redoc.j2 rename to sphinxcontrib/redoc/redoc.j2 diff --git a/sphinxcontrib/redoc.js b/sphinxcontrib/redoc/redoc.js similarity index 100% rename from sphinxcontrib/redoc.js rename to sphinxcontrib/redoc/redoc.js