https://bugzilla.redhat.com/show_bug.cgi?id=1931054



--- Comment #4 from Robert-André Mauchin 🐧 <zebo...@gmail.com> ---
It seems the docs building need network access. I propose you this patch to
deal with it:

==================================================================================
diff -up pyte-0.8.0/docs/conf.py.orig pyte-0.8.0/docs/conf.py
--- pyte-0.8.0/docs/conf.py.orig        2018-04-06 22:45:37.000000000 +0200
+++ pyte-0.8.0/docs/conf.py     2021-02-21 02:27:31.771179277 +0100
@@ -27,9 +27,8 @@ sys.path.insert(0, os.path.abspath('..')
 # coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
 extensions = ['sphinx.ext.autodoc',
               'sphinx.ext.todo',
-              'sphinx.ext.intersphinx',
-              'sphinx.ext.doctest',
-              'sphinx.ext.linkcode']
+              'sphinx.ext.doctest']
+

 # Add any paths that contain templates here, relative to this directory.
 templates_path = ['_templates']
@@ -90,46 +89,6 @@ pygments_style = 'sphinx'
 # A list of ignored prefixes for module index sorting.
 #modindex_common_prefix = []

-linkcode_base_url = "https://github.com/selectel/pyte/tree/";
-
-def resolve_tag():
-    from urllib.request import urlopen
-    from urllib.error import HTTPError
-    try:
-        urlopen(linkcode_base_url + release)
-    except HTTPError:
-        return "master"
-    else:
-        return release
-
-
-tag = resolve_tag()
-
-
-# Resolve function for the linkcode extension.
-def linkcode_resolve(domain, info):
-    def find_source():
-        # try to find the file and line number, based on code from numpy:
-        # https://github.com/numpy/numpy/blob/master/doc/source/conf.py#L286
-        obj = sys.modules[info['module']]
-        for part in info['fullname'].split('.'):
-            obj = getattr(obj, part)
-
-        import inspect
-        import os
-        import pyte
-        fn = inspect.getsourcefile(obj)
-        fn = os.path.relpath(fn, os.path.dirname(pyte.__file__))
-        source, lineno = inspect.getsourcelines(obj)
-        return fn, lineno, lineno + len(source) - 1
-
-    try:
-        filename = 'pyte/%s#L%d-L%d' % find_source()
-    except Exception:
-        return None  # Failed to resolve source or line numbers.
-
-    return linkcode_base_url + "%s/%s" % (tag, filename)
-
 # -- Options for HTML output
---------------------------------------------------

 ## Read the docs style:

==================================================================================


Proposed SPEC:

==================================================================================
Name:           python-pyte
Version:        0.8.0
Release:        2%{?dist}
Summary:        In memory VT-compatible terminal emulator

License:        LGPLv3
URL:            https://github.com/selectel/pyte
Source0:        %url/archive/%{version}/%{name}-%{version}.tar.gz
# Remove network access during the docs build
Patch0:         pyte-docs.patch

BuildArch:      noarch

BuildRequires:  python3-devel
BuildRequires:  python3-pytest-runner
BuildRequires:  python3-sphinx
BuildRequires:  python3-sphinx_rtd_theme
BuildRequires:  python3-wcwidth

%description
In memory VTXXX-compatible terminal emulator.  XXX stands for a series
of video terminals, developed by DEC between 1970 and 1995.

%package     -n python3-pyte
Summary:        %{summary}

%description -n python3-pyte
In memory VTXXX-compatible terminal emulator.  XXX stands for a series
of video terminals, developed by DEC between 1970 and 1995.

%prep
%autosetup -p1 -n pyte-%{version}

%build
%py3_build

# generate html docs
sphinx-build-3 docs html
# remove the sphinx-build leftovers
rm -rf html/.{doctrees,buildinfo}

%install
%py3_install

%check
%{__python3} setup.py test

%files -n python3-pyte
%license LICENSE
%doc AUTHORS CHANGES README
%doc examples/ html/
%{python3_sitelib}/pyte/
%{python3_sitelib}/pyte-%{version}-py*.egg-info

%changelog
* Sun Feb 07 2021 Terje Rosten <terje.ros...@ntnu.no> - 0.8.0-2
- Remove Python 2 support
- Minor clean up

* Tue May 8 2018 Mateusz Mikuła <mati865 at gmail.com> - 0.8.0-1
- Initial packaging

==================================================================================


-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are always notified about changes to this product and component
_______________________________________________
package-review mailing list -- package-review@lists.fedoraproject.org
To unsubscribe send an email to package-review-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/package-review@lists.fedoraproject.org
Do not reply to spam on the list, report it: 
https://pagure.io/fedora-infrastructure

Reply via email to