pexpect / pexpect

A Python module for controlling interactive programs in a pseudo-terminal
http://pexpect.readthedocs.io/
Other
2.59k stars 476 forks source link

4.8.0: pexpect sphinx docum,entation is not sphinx 4.x ready #700

Open kloczek opened 3 years ago

kloczek commented 3 years ago

First of all looks like pexpect still is using distutils so I would recommend to applybelow patch:

--- a/setup.py~ 2020-01-17 17:08:15.000000000 +0000
+++ b/setup.py  2021-09-29 00:02:46.507678645 +0100
@@ -1,5 +1,5 @@
 # encoding: utf-8
-from distutils.core import setup
+from setuptools import setup
 import os
 import re
 import sys

With that patch is possible to use sphinx<>setuptools integration. However looks like socumentation is not ready for sphinx 4.x.

+ /usr/bin/python3 setup.py build_sphinx -b man --build-dir build/sphinx
running build_sphinx
Running Sphinx v4.2.0

Exception occurred:
  File "/home/tkloczko/rpmbuild/BUILD/pexpect-4.8.0/doc/sphinxext/github.py", line 149, in setup
    app.info('Initializing GitHub plugin')
AttributeError: 'Sphinx' object has no attribute 'info'
The full traceback has been saved in /tmp/sphinx-err-c48n_t_y.log, if you want to report the issue to the developers.
Please also report this if it was a user error, so that a better error message can be provided next time.
A bug report can be filed in the tracker at <https://github.com/sphinx-doc/sphinx/issues>. Thanks!
[tkloczko@barrel SOURCES]$ cat /tmp/sphinx-err-c48n_t_y.log
# Sphinx version: 4.2.0
# Python version: 3.8.12 (CPython)
# Docutils version: 0.17.1 release
# Jinja2 version: 3.0.1
# Last messages:

# Loaded extensions:
Traceback (most recent call last):
  File "/usr/lib/python3.8/site-packages/sphinx/setup_command.py", line 171, in run
    app = Sphinx(self.source_dir, self.config_dir,
  File "/usr/lib/python3.8/site-packages/sphinx/application.py", line 237, in __init__
    self.setup_extension(extension)
  File "/usr/lib/python3.8/site-packages/sphinx/application.py", line 393, in setup_extension
    self.registry.load_extension(self, extname)
  File "/usr/lib/python3.8/site-packages/sphinx/registry.py", line 442, in load_extension
    metadata = setup(app)
  File "/home/tkloczko/rpmbuild/BUILD/pexpect-4.8.0/doc/sphinxext/github.py", line 149, in setup
    app.info('Initializing GitHub plugin')
AttributeError: 'Sphinx' object has no attribute 'info'
kloczek commented 2 years ago

gentle ping 😄

Red-M commented 1 year ago

If you could provide a PR I can review it and we can see how this affects the library.