From 65153f78ae9c7248dc31de6597acf062f6c11aab Mon Sep 17 00:00:00 2001 From: "Matthias C. M. Troffaes" Date: Fri, 3 Jun 2022 15:09:08 +0100 Subject: [PATCH] Remove namespace init file. (#303) Remove old __init__.py file. --- .github/workflows/python-package.yml | 4 ++++ CHANGELOG.rst | 3 +++ setup.py | 4 ++-- src/sphinxcontrib/__init__.py | 12 ------------ 4 files changed, 9 insertions(+), 14 deletions(-) delete mode 100644 src/sphinxcontrib/__init__.py diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 0fc5cacb..c4b4a4fa 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -33,6 +33,10 @@ jobs: - python-version: '3.9' pip-sphinx: '"sphinx<4" "jinja2<3.1"' pytest-options: '-m "not (numpydoc or rinohtype)"' + # latest of sphinx 4.x series (released for Python 3.10) + - python-version: '3.10' + pip-sphinx: '"sphinx<5"' + pytest-options: '-m "not (numpydoc or rinohtype)"' # sphinx pre-release - python-version: '3.10' pip-sphinx: '--pre sphinx' diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 077ccd0c..c9d165c0 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -9,6 +9,9 @@ This is because ``importlib`` does not allow runtime modification of entry points. +* Remove sphinxcontrib namespace ``__init__.py`` file (no longer needed for + Python 3.3+ by PEP420). + 2.4.2 (10 April 2022) --------------------- diff --git a/setup.py b/setup.py index 23d11da7..d14c5f2a 100644 --- a/setup.py +++ b/setup.py @@ -1,6 +1,6 @@ import io import re -from setuptools import setup, find_packages +from setuptools import setup, find_namespace_packages from typing import Optional @@ -58,7 +58,7 @@ def plugin(plugin_name: str, mod_name: Optional[str] = None) -> str: 'Topic :: Utilities', ], platforms='any', - packages=find_packages('src'), + packages=find_namespace_packages('src'), package_dir={'': 'src'}, package_data={'sphinxcontrib.bibtex': ['py.typed']}, include_package_data=True, diff --git a/src/sphinxcontrib/__init__.py b/src/sphinxcontrib/__init__.py deleted file mode 100644 index ae0f862b..00000000 --- a/src/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: Copyright 2007-2009 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" - -__import__('pkg_resources').declare_namespace(__name__)