diff --git a/.flake8 b/.flake8 new file mode 100644 index 0000000..5af0a95 --- /dev/null +++ b/.flake8 @@ -0,0 +1,4 @@ +[flake8] +max-line-length = 95 +ignore = E116,E241,E251 +exclude = .git,.tox,.venv diff --git a/MANIFEST.in b/MANIFEST.in deleted file mode 100644 index 7dd154a..0000000 --- a/MANIFEST.in +++ /dev/null @@ -1,9 +0,0 @@ -include README.rst -include LICENSE -include CHANGES - -include tox.ini - -recursive-include sphinxcontrib/applehelp/templates * -recursive-include sphinxcontrib/applehelp/locales * -recursive-include tests * diff --git a/babel.cfg b/babel.cfg new file mode 100644 index 0000000..b2b6544 --- /dev/null +++ b/babel.cfg @@ -0,0 +1,8 @@ +[extract_messages] +output_file = sphinxcontrib/applehelp/locales/sphinxcontrib.applehelp.pot +keywords = _ __ + +[compile_catalog] +domain = sphinxcontrib.applehelp +directory = sphinxcontrib/applehelp/locales/ +use_fuzzy = true diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..0d8d992 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,66 @@ +[build-system] +requires = ["flit_core>=3.7"] +build-backend = "flit_core.buildapi" + +# project metadata +[project] +name = "sphinxcontrib.applehelp" +description = "sphinxcontrib-applehelp is a Sphinx extension which outputs Apple help books" +readme = "README.rst" +urls.Changelog = "https://www.sphinx-doc.org/en/master/changes.html" +urls.Code = "https://github.com/sphinx-doc/sphinxcontrib-applehelp" +urls.Download = "https://pypi.org/project/sphinxcontrib-applehelp/" +urls.Homepage = "https://www.sphinx-doc.org/" +urls."Issue tracker" = "https://github.com/sphinx-doc/sphinx/issues" +license.text = "BSD-2-Clause" +requires-python = ">=3.8" + +# Classifiers list: https://pypi.org/classifiers/ +classifiers = [ + "Development Status :: 5 - Production/Stable", + "Environment :: Console", + "Environment :: Web Environment", + "Intended Audience :: Developers", + "Intended Audience :: Education", + "License :: OSI Approved :: BSD License", + "Operating System :: OS Independent", + "Programming Language :: Python", + "Programming Language :: Python :: 3", + "Framework :: Sphinx", + "Framework :: Sphinx :: Extension", + "Topic :: Documentation", + "Topic :: Documentation :: Sphinx", + "Topic :: Text Processing", + "Topic :: Utilities", +] +dependencies = [] +dynamic = ["version"] + +[project.optional-dependencies] +test = [ + "pytest", +] +lint = [ + "flake8", + "mypy", + "docutils-stubs", +] + +[[project.authors]] +name = "Georg Brandl" +email = "georg@python.org" + +[tool.flit.sdist] +include = [ + "LICENSE", + "CHANGES", + # Tests + "tests/", + "tox.ini", +] +exclude = [ + "doc/_build", +] + +[tool.mypy] +ignore_missing_imports = true diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index 287557d..0000000 --- a/setup.cfg +++ /dev/null @@ -1,29 +0,0 @@ -[egg_info] -tag_build = .dev -tag_date = true - -[aliases] -release = egg_info -Db '' - -[extract_messages] -output_file = sphinxcontrib/applehelp/locales/sphinxcontrib.applehelp.pot -keywords = _ __ - -[compile_catalog] -domain = sphinxcontrib.applehelp -directory = sphinxcontrib/applehelp/locales/ -use_fuzzy = true - -[bdist_wheel] -universal = 1 - -[metadata] -license_file = LICENSE - -[flake8] -max-line-length = 95 -ignore = E116,E241,E251 -exclude = .git,.tox,.venv - -[mypy] -ignore_missing_imports = True diff --git a/setup.py b/setup.py deleted file mode 100644 index b0e6d6e..0000000 --- a/setup.py +++ /dev/null @@ -1,67 +0,0 @@ -# -*- coding: utf-8 -*- -import os -from setuptools import setup, find_packages - -long_desc = ''' -sphinxcontrib-applehelp is a sphinx extension which outputs Apple help books -''' - -extras_require = { - 'test': [ - 'pytest', - ], - 'lint': [ - 'flake8', - 'mypy', - 'docutils-stubs', - ] -} - - -def get_version(): - """Get version number of the package from version.py without importing core module.""" - package_dir = os.path.abspath(os.path.dirname(__file__)) - version_file = os.path.join(package_dir, 'sphinxcontrib/applehelp/version.py') - - namespace = {} - with open(version_file, 'rt') as f: - exec(f.read(), namespace) - - return namespace['__version__'] - - -setup( - name='sphinxcontrib-applehelp', - version=get_version(), - url='http://sphinx-doc.org/', - download_url='https://pypi.org/project/sphinxcontrib-applehelp/', - license='BSD', - author='Georg Brandl', - author_email='georg@python.org', - description=long_desc.strip().replace('\n', ' '), - long_description=long_desc, - zip_safe=False, - classifiers=[ - 'Development Status :: 5 - Production/Stable', - 'Environment :: Console', - 'Environment :: Web Environment', - 'Intended Audience :: Developers', - 'Intended Audience :: Education', - 'License :: OSI Approved :: BSD License', - 'Operating System :: OS Independent', - 'Programming Language :: Python', - 'Programming Language :: Python :: 3', - 'Framework :: Sphinx', - 'Framework :: Sphinx :: Extension', - 'Topic :: Documentation', - 'Topic :: Documentation :: Sphinx', - 'Topic :: Text Processing', - 'Topic :: Utilities', - ], - platforms='any', - python_requires=">=3.7", - packages=find_packages(exclude=['tests']), - include_package_data=True, - extras_require=extras_require, - namespace_packages=['sphinxcontrib'], -) diff --git a/sphinxcontrib/__init__.py b/sphinxcontrib/__init__.py deleted file mode 100644 index c10210a..0000000 --- a/sphinxcontrib/__init__.py +++ /dev/null @@ -1,15 +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 - - -pkg_resources.declare_namespace(__name__) diff --git a/sphinxcontrib/applehelp/__init__.py b/sphinxcontrib/applehelp/__init__.py index 83a053b..aa44174 100644 --- a/sphinxcontrib/applehelp/__init__.py +++ b/sphinxcontrib/applehelp/__init__.py @@ -26,13 +26,14 @@ from sphinx.util.matching import Matcher from sphinx.util.osutil import ensuredir, make_filename -from sphinxcontrib.applehelp.version import __version__ - if sphinx.version_info[:2] >= (6, 1): from sphinx.util.display import SkipProgressMessage, progress_message else: from sphinx.util import SkipProgressMessage, progress_message +__version__ = '1.0.3' +__version_info__ = (1, 0, 3) + package_dir = path.abspath(path.dirname(__file__)) template_dir = path.join(package_dir, 'templates') diff --git a/sphinxcontrib/applehelp/version.py b/sphinxcontrib/applehelp/version.py deleted file mode 100644 index 8bbf29f..0000000 --- a/sphinxcontrib/applehelp/version.py +++ /dev/null @@ -1,10 +0,0 @@ -""" - sphinxcontrib.applehelp.version - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - - :copyright: Copyright 2007-2019 by the Sphinx team, see README. - :license: BSD, see LICENSE for details. -""" - -__version__ = '1.0.3' -__version_info__ = tuple(map(int, __version__.split('.')))