Skip to content

Commit

Permalink
[boilerplate] update project's boilerplate code & settings
Browse files Browse the repository at this point in the history
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
  • Loading branch information
return42 committed Mar 21, 2023
1 parent edbabfe commit 607dbf2
Show file tree
Hide file tree
Showing 10 changed files with 523 additions and 166 deletions.
7 changes: 6 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ include utils/makefile.python
include utils/makefile.sphinx
include utils/makefile.0

GIT_URL = https://github.com/return42/linuxdoc.git
GIT_URL = git@github.com:return42/linuxdoc.git
PYOBJECTS = linuxdoc
DOC = docs
#SLIDES = docs/slides
Expand Down Expand Up @@ -63,6 +63,11 @@ project: pyenvinstall $(API_DOC)
@echo ' PROJECT requirements.txt'
$(Q)- rm -f requirements.txt
$(Q)$(PY_ENV_BIN)/python -c "from linuxdoc.__pkginfo__ import *; print(requirements_txt)" > ./requirements.txt
@echo ' PROJECT requirements_dev.txt'
$(Q)- rm -f requirements_dev.txt
$(Q)$(PY_ENV_BIN)/python -c "from linuxdoc.__pkginfo__ import *; print(requirements_dev_txt)" > ./requirements_dev.txt
@echo ' PROJECT README.rst'
$(Q)- rm -f README.rst
$(Q)$(PY_ENV_BIN)/python -c "from linuxdoc.__pkginfo__ import *; print(README)" > README.rst

PHONY += $(API_DOC)
Expand Down
33 changes: 19 additions & 14 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,36 @@
LinuxDoc
========

.. sidebar:: Info

- linuxdoc v20221127
- 2022 Markus Heiser / GPLv2
- https://github.com/return42/linuxdoc

The LinuxDoc library contains Sphinx-doc extensions and command line tools to
extract documentation from C/C++ source file comments. Even if this project
started in context of the Linux-Kernel documentation, you can use these
extensions in common Sphinx-doc projects.

Documentation is available at ./docs or jump to:

- https://return42.github.io/linuxdoc
Install
=======

`Install LinuxDoc <https://return42.github.io/linuxdoc/install.html>`__ using `pip
<https://pip.pypa.io/en/stable/quickstart/>`__:

The LinuxDoc repository is hosted at:
.. code-block:: text
- https://github.com/return42/linuxdoc
pip install --user -U linuxdoc
Issue tracker:
- https://github.com/return42/linuxdoc/issues
Links
=====

For installation read file ./docs/install.rst or jump to:
- Documentation: https://return42.github.io/linuxdoc
- Releases: https://pypi.org/project/linuxdoc/
- Code: https://github.com/return42/linuxdoc
- Issue tracker: https://github.com/return42/linuxdoc/issues

- https://return42.github.io/linuxdoc/install.html

============ ===============================================
package: linuxdoc (20221127)
copyright: 2024 Markus Heiser
e-mail: markus.heiser@darmarIT.de
license: GPLv2
============ ===============================================

4 changes: 2 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from pallets_sphinx_themes import ProjectLink

sys.path.append(os.path.abspath('../utils/site-python'))
from sphinx_build_tools import load_sphinx_config
# from sphinx_build_tools import load_sphinx_config

DOC_URL = "https://return42.github.io/linuxdoc"
GIT_URL = "https://github.com/return42/linuxdoc"
Expand Down Expand Up @@ -159,4 +159,4 @@
# Since loadConfig overwrites settings from the global namespace, it has to be
# the last statement in the conf.py file
# ------------------------------------------------------------------------------
load_sphinx_config(globals())
# load_sphinx_config(globals())
134 changes: 62 additions & 72 deletions linuxdoc/__pkginfo__.py
Original file line number Diff line number Diff line change
@@ -1,38 +1,36 @@
# -*- coding: utf-8; mode: python; mode: flycheck -*-
# SPDX-License-Identifier: GPL-2.0
# pylint: disable=invalid-name,redefined-builtin
"""
python package meta informations
# pylint: disable=line-too-long, invalid-name, consider-using-f-string
"""Python package meta informations used by setup.py and other project files.
"""

from setuptools import find_packages

package = 'linuxdoc'
version = '20221127'
license = 'GPLv2'
description = (

copyright = '2024 Markus Heiser'
description = (
'Sphinx-doc extensions & tools to extract documentation'
' from C/C++ source file comments.'
)
copyright = '2021 Markus Heiser'
license = 'GPLv2'
keywords = 'sphinx extension doc source code comments kernel-doc linux'

author = 'Markus Heiser'
author_email = 'markus.heiser@darmarIT.de'
authors = [author, ]
emails = [author_email, ]

maintainer = 'Markus Heiser'
maintainer_email = 'markus.heiser@darmarIT.de'
maintainers = [maintainer, ]


url = 'https://github.com/return42/linuxdoc'
docs = 'https://return42.github.io/linuxdoc'
issues = url + '/issues'

authors = [author, ]

emails = [author_email, ]
keywords = 'sphinx extension doc source code comments kernel-doc linux'

maintainers = [maintainer, ]

project_urls = {
'Documentation' : docs,
'Code' : url,
Expand Down Expand Up @@ -91,35 +89,28 @@
install_requires = [
'fspath',
'setuptools',
'docutils',
'sphinx',
]

install_requires_txt = "\n".join(install_requires)

test_requires = [
'pylint'
]

test_requires.sort()
test_requires_txt = "\n".join(test_requires)

develop_requires = [
'twine',
# 'wheel'
'Sphinx',
'pallets-sphinx-themes',
'sphinx-autobuild',
'sphinx-issues',
'sphinx-jinja',
'sphinx-tabs',
'sphinxcontrib-programoutput',
# slide-shows with revaljs
# 'sphinxjp.themes.revealjs @ git+https://github.com/return42/sphinxjp.themes.revealjs',
# https://jedi.readthedocs.io/
# 'jedi',
# epc required by emacs: https://tkf.github.io/emacs-jedi
# 'epc @ git+https://github.com/tkf/python-epc',
'tox',
'twine',
]


develop_requires_txt = "\n".join(develop_requires)

def get_entry_points():
Expand All @@ -133,48 +124,20 @@ def get_entry_points():
]
}

# See https://pypi.python.org/pypi?%3Aaction=list_classifiers
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Intended Audience :: Other Audience",
"License :: OSI Approved :: GNU General Public License v2 (GPLv2)",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Topic :: Utilities",
"Topic :: Software Development :: Documentation",
"Topic :: Software Development :: Libraries",
"Topic :: Text Processing",
]

docstring = """\
.. sidebar:: Info
requirements_txt = """\
%(install_requires_txt)s
""" % globals()

- %(package)s v%(version)s
- %(copyright)s / %(license)s
- %(url)s
requirements_dev_txt = """\
%(test_requires_txt)s
%(develop_requires_txt)s
""" % globals()

docstring = """\
The LinuxDoc library contains Sphinx-doc extensions and command line tools to
extract documentation from C/C++ source file comments. Even if this project
started in context of the Linux-Kernel documentation, you can use these
extensions in common Sphinx-doc projects.
Documentation is available at ./docs or jump to:
- %(docs)s
The LinuxDoc repository is hosted at:
- %(url)s
Issue tracker:
- %(url)s/issues
For installation read file ./docs/install.rst or jump to:
- %(docs)s/install.html
""" % globals()

README = """\
Expand All @@ -183,22 +146,49 @@ def get_entry_points():
========
%(docstring)s
""" % globals()
requirements_txt = """# -*- coding: utf-8; mode: conf -*-
Install
=======
# requirements of package %(package)s
# --------------------------------
`Install LinuxDoc <%(docs)s/install.html>`__ using `pip
<https://pip.pypa.io/en/stable/quickstart/>`__:
%(install_requires_txt)s
.. code-block:: text
# test requires
# -------------
pip install --user -U linuxdoc
%(test_requires_txt)s
# develop
# -------
Links
=====
%(develop_requires_txt)s
- Documentation: %(docs)s
- Releases: https://pypi.org/project/linuxdoc/
- Code: %(url)s
- Issue tracker: %(url)s/issues
============ ===============================================
package: %(package)s (%(version)s)
copyright: %(copyright)s
e-mail: %(maintainer_email)s
license: %(license)s
============ ===============================================
""" % globals()



# See https://pypi.python.org/pypi?%3Aaction=list_classifiers
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Intended Audience :: Other Audience",
"License :: OSI Approved :: GNU General Public License v2 (GPLv2)",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Topic :: Utilities",
"Topic :: Software Development :: Documentation",
"Topic :: Software Development :: Libraries",
"Topic :: Text Processing",
]

24 changes: 2 additions & 22 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,25 +1,5 @@
# -*- coding: utf-8; mode: conf -*-

# requirements of package linuxdoc
# --------------------------------

fspath
setuptools
docutils
sphinx

# test requires
# -------------

pylint

# develop
# -------

twine
Sphinx
pallets-sphinx-themes
sphinx-autobuild
sphinx-issues
sphinx-jinja
sphinx-tabs
sphinxcontrib-programoutput
sphinx-tabs
10 changes: 10 additions & 0 deletions requirements_dev.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
pylint
pallets-sphinx-themes
sphinx-autobuild
sphinx-issues
sphinx-jinja
sphinx-tabs
sphinxcontrib-programoutput
tox
twine

7 changes: 4 additions & 3 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@
envlist = py27, py35, pylint

[testenv]
# passenv = HOME
usedevelop = True
deps = -r{toxinidir}/requirements.txt
commands =
pytest -v --cov=linuxdoc {toxinidir}/tests
pytest -v --cov=linuxdoc {toxinidir}/tests

[testenv:lint]
[testenv:pylint]
commands =
pylint --rcfile utils/pylintrc --disable=W0511 linuxdoc
pylint --rcfile .pylintrc --disable=W0511 linuxdoc
Loading

0 comments on commit 607dbf2

Please sign in to comment.