From 4b6556ef6e74c96e7530ce0ef70c59bfdcf222d8 Mon Sep 17 00:00:00 2001 From: Michael Howitz Date: Wed, 8 Nov 2023 11:14:19 +0100 Subject: [PATCH] Switch to implicit (native) namespace for `sphinxcontrib`. (#2) --- 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 685bffa..cac37e5 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, version='2.0.dev0', @@ -44,5 +44,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