-
Notifications
You must be signed in to change notification settings - Fork 7
Add Sphinx 4.0 compatibility, drop EOLed Pythons #17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 15 commits
69cdfaf
ed4e178
7f5ad44
bcd3931
544b388
4413ab9
3213650
4e04ccc
ca824fd
1765c02
6b58256
f4a0b20
54e9b80
6f0f5b7
40eef0d
1663057
0ad316e
8590958
ae7ce32
b02bd50
9915e71
23a32ab
d9177c4
8e0176c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
name: Build and test | ||
|
||
on: | ||
# Build on pushes to master | ||
push: | ||
branches: | ||
- master | ||
# Temporarily add for CI on stevepiercy's fork | ||
- sphinx-40-compat | ||
tags: | ||
# Build pull requests | ||
pull_request: | ||
|
||
jobs: | ||
test: | ||
strategy: | ||
matrix: | ||
py: | ||
- "3.6" | ||
- "3.7" | ||
- "3.8" | ||
- "3.9" | ||
- "pypy3" | ||
os: | ||
- "ubuntu-latest" | ||
- "windows-latest" | ||
- "macos-latest" | ||
architecture: | ||
- x64 | ||
- x86 | ||
|
||
exclude: | ||
# Linux and macOS don't have x86 python | ||
- os: "ubuntu-latest" | ||
architecture: x86 | ||
- os: "macos-latest" | ||
architecture: x86 | ||
# PyPy3 on Windows doesn't seem to work | ||
- os: "windows-latest" | ||
py: "pypy3" | ||
|
||
name: "Python: ${{ matrix.py }}-${{ matrix.architecture }} on ${{ matrix.os }}" | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Setup Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.py }} | ||
architecture: ${{ matrix.architecture }} | ||
- run: pip install tox | ||
- name: Running tox | ||
run: tox -e py -- ${{ matrix.pytest-args }} | ||
# This block is temporarily commented out to speed up testing and until I add | ||
# a lint tox env. | ||
# lint: | ||
# runs-on: ubuntu-latest | ||
# name: Lint the package | ||
# steps: | ||
# - uses: actions/checkout@v2 | ||
# - name: Setup python | ||
# uses: actions/setup-python@v2 | ||
# with: | ||
# python-version: 3.9 | ||
# architecture: x64 | ||
# - run: pip install tox | ||
# - run: tox -e lint |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -105,3 +105,4 @@ Contributors | |
|
||
- Tres Seaver, 2011/03/22 | ||
- Jason Madden, 2013/01/10 | ||
- Steve Piercy, 2021/05/11 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
graft repoze | ||
|
||
include README.rst | ||
include CHANGES.rst | ||
include CONTRIBUTORS.txt LICENSE.txt COPYRIGHT.txt | ||
|
||
include tox.ini .travis.yml | ||
include TODO.txt | ||
graft .github | ||
|
||
global-exclude __pycache__ *.py[cod] | ||
global-exclude .DS_Store |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,64 +1,68 @@ | ||
repoze.sphinx.autointerface README | ||
================================== | ||
|
||
.. image:: https://travis-ci.org/repoze/repoze.sphinx.autointerface.png?branch=master | ||
:target: https://travis-ci.org/repoze/repoze.sphinx.autointerface | ||
.. image:: https://github.com/repoze/repoze.sphinx.autointerface/actions/workflows/ci-tests.yml/badge.svg | ||
:target: https://github.com/repoze/repoze.sphinx.autointerface/actions/workflows/ci-tests.yml | ||
|
||
.. image:: https://img.shields.io/pypi/v/repoze.sphinx.autointerface.svg | ||
:target: https://pypi.python.org/pypi/repoze.sphinx.autointerface | ||
:target: https://pypi.python.org/pypi/repoze.sphinx.autointerface | ||
|
||
.. image:: https://img.shields.io/pypi/pyversions/repoze.sphinx.autointerface.svg | ||
:target: https://pypi.python.org/pypi/repoze.sphinx.autointerface | ||
:target: https://pypi.python.org/pypi/repoze.sphinx.autointerface | ||
|
||
|
||
Overview | ||
-------- | ||
|
||
Thie package defines an extension for the | ||
`Sphinx <http://sphinx.pocool.org>`_ documentation system. The extension | ||
allows generation of API documentation by introspection of | ||
`zope.interface <http://pypi.python.org/pypi/zope.interface>`_ instances in | ||
`Sphinx <https://www.sphinx-doc.org/en/master/>`_ documentation system. | ||
The extension allows generation of API documentation by introspection of | ||
`zope.interface <https://pypi.org/project/zope.interface/>`_ instances in | ||
code. | ||
|
||
|
||
Installation | ||
------------ | ||
|
||
Install via `easy_install | ||
<http://peak.telecommunity.com/DevCenter/EasyInstall>`_:: | ||
Install via ``pip``: | ||
|
||
$ bin/easy_install repoze.sphinx.autointerface | ||
.. code-block:: bash | ||
|
||
or any other means which gets the package on your ``PYTHONPATH``. | ||
pip install repoze.sphinx.autointerface | ||
|
||
|
||
Registering the Extension | ||
------------------------- | ||
|
||
Add ``repoze.sphinx.autointerface`` to the ``extensions`` list in the | ||
``conf.py`` of the Sphinx documentation for your product. E.g.:: | ||
``conf.py`` of the Sphinx documentation for your product. | ||
|
||
.. code-block:: python | ||
|
||
extensions = ['sphinx.ext.autodoc', | ||
'sphinx.ext.doctest', | ||
'repoze.sphinx.autointerface', | ||
] | ||
extensions = [ | ||
"sphinx.ext.autodoc", | ||
"sphinx.ext.doctest", | ||
"repoze.sphinx.autointerface", | ||
] | ||
|
||
|
||
Using the Extension | ||
------------------- | ||
|
||
At appropriate points in your document, call out the interface | ||
autodocs via:: | ||
At appropriate points in your document, call out the autodoc interface. | ||
|
||
.. code-block:: rst | ||
|
||
.. autointerface:: yourpackage.interfaces.IFoo | ||
.. autointerface:: yourpackage.interfaces.IFoo | ||
|
||
Output from the directive includes | ||
|
||
- the fully-qualified interface name | ||
- any base interfaces | ||
- the doctstring from the interface, rendered as reSTX. | ||
- the members of the interface (methods and attributes). | ||
- the docstring from the interface, rendered as reStructuredText | ||
- the members of the interface (methods and attributes) | ||
|
||
* For each attribute, the output includes the attribute name | ||
and its description. | ||
* For each method, the output includes the method name, its signature, | ||
and its docstring (also rendered as reSTX). | ||
and its docstring (also rendered as reStructuredText). |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,56 +12,60 @@ | |
# | ||
############################################################################## | ||
|
||
import os | ||
|
||
from setuptools import setup, find_packages | ||
|
||
here = os.path.abspath(os.path.dirname(__file__)) | ||
|
||
with open(os.path.join(here, 'README.rst')) as f: | ||
README = f.read() | ||
def readfile(name): | ||
with open(name) as f: | ||
return f.read() | ||
|
||
|
||
with open(os.path.join(here, 'CHANGES.rst')) as f: | ||
CHANGES = f.read() | ||
README = readfile("README.rst") | ||
CHANGES = readfile("CHANGES.rst") | ||
|
||
tests_require = [ | ||
'zope.testrunner', | ||
"zope.testrunner", | ||
] | ||
|
||
setup(name='repoze.sphinx.autointerface', | ||
version='0.8.1.dev0', | ||
description='Sphinx extension: auto-generates API docs ' | ||
'from Zope interfaces', | ||
long_description=README + '\n\n' + CHANGES, | ||
classifiers=[ | ||
setup( | ||
name="repoze.sphinx.autointerface", | ||
version="0.8.1.dev0", | ||
description="Sphinx extension: auto-generates API docs " "from Zope interfaces", | ||
long_description=README + "\n\n" + CHANGES, | ||
long_description_content_type='text/x-rst', | ||
classifiers=[ | ||
"Development Status :: 5 - Production/Stable", | ||
"Intended Audience :: Developers", | ||
"Programming Language :: Python :: 2", | ||
"Programming Language :: Python :: 2.7", | ||
"Programming Language :: Python :: 3", | ||
"Programming Language :: Python :: 3.3", | ||
"Programming Language :: Python :: 3.4", | ||
"Programming Language :: Python :: 3.5", | ||
"Programming Language :: Python :: 3.6", | ||
"Programming Language :: Python :: 3.7", | ||
"Programming Language :: Python :: 3.8", | ||
"Programming Language :: Python :: 3.9", | ||
"Programming Language :: Python :: Implementation :: CPython", | ||
"Programming Language :: Python :: Implementation :: PyPy", | ||
], | ||
keywords='web wsgi zope', | ||
author="Agendaless Consulting", | ||
author_email="[email protected]", | ||
url="http://www.repoze.org", | ||
license="BSD-derived (http://www.repoze.org/LICENSE.txt)", | ||
packages=find_packages(), | ||
include_package_data=True, | ||
namespace_packages=['repoze', 'repoze.sphinx'], | ||
zip_safe=False, | ||
tests_require = tests_require, | ||
install_requires=[ | ||
'zope.interface', | ||
'Sphinx>=1.0', | ||
'setuptools', | ||
], | ||
extras_require = { | ||
'test': tests_require, | ||
}, | ||
#test_suite="repoze.", | ||
) | ||
], | ||
keywords="web wsgi zope Sphinx", | ||
author="Agendaless Consulting", | ||
author_email="[email protected]", | ||
url="https://github.com/repoze/repoze.sphinx.autointerface/", | ||
project_urls={ | ||
"Documentation": "https://github.com/repoze/repoze.sphinx.autointerface/", | ||
"Changelog": "https://github.com/repoze/repoze.sphinx.autointerface/blob/master/CHANGES.rst", | ||
"Issue Tracker": "https://github.com/repoze/repoze.sphinx.autointerface/issues", | ||
}, | ||
license="BSD-derived (Repoze)", | ||
packages=find_packages(), | ||
include_package_data=True, | ||
namespace_packages=["repoze", "repoze.sphinx"], | ||
zip_safe=False, | ||
python_requires=">=3.6", | ||
tests_require=tests_require, | ||
install_requires=[ | ||
"zope.interface", | ||
"Sphinx>=1.0", | ||
"setuptools", | ||
], | ||
extras_require={ | ||
"test": tests_require, | ||
}, | ||
) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,37 @@ | ||
[tox] | ||
envlist = | ||
py27,py33,py34,,py35,pypy | ||
py36,py37,py38,py39,pypy3 | ||
|
||
[testenv] | ||
commands = | ||
zope-testrunner --test-path={toxinidir} | ||
deps = | ||
zope.testrunner | ||
|
||
;[testenv:format] | ||
;skip_install = true | ||
;commands = | ||
; flake8 repoze tests setup.py | ||
; isort --check-only --df repoze tests setup.py | ||
; black --check --diff repoze tests setup.py | ||
;deps = | ||
; flake8 | ||
; black | ||
; isort | ||
|
||
[testenv:build] | ||
skip_install = true | ||
commands = | ||
# clean up build/ and dist/ folders | ||
python -c 'import shutil; shutil.rmtree("dist", ignore_errors=True)' | ||
python setup.py clean --all | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No longer call setup.py directly, use the new This also does away with he sdist call/pip wheel call. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks, @bertjwregeer! Updated in 1663057. Please let me know. |
||
# build sdist | ||
python setup.py sdist --dist-dir {toxinidir}/dist | ||
# check long_description via CHANGES and README | ||
twine check dist/* | ||
check-manifest | ||
# build wheel from sdist | ||
pip wheel -v --no-deps --no-index --no-build-isolation --wheel-dir {toxinidir}/dist --find-links {toxinidir}/dist repoze.sphinx.autointerface | ||
deps = | ||
check-manifest | ||
twine |
Uh oh!
There was an error while loading. Please reload this page.