Bug 1931054 - Review Request: python-pyte - In memory VT-compatible terminal emulator
Summary: Review Request: python-pyte - In memory VT-compatible terminal emulator
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Robert-André Mauchin 🐧
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 1576056 (view as bug list)
Depends On:
Blocks: 1576812 1920084
TreeView+ depends on / blocked
 
Reported: 2021-02-20 10:42 UTC by Terje Røsten
Modified: 2021-03-23 01:32 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-03-19 20:14:55 UTC
Type: ---
Embargoed:
zebob.m: fedora-review+


Attachments (Terms of Use)

Description Terje Røsten 2021-02-20 10:42:06 UTC
spec: https://terjeros.fedorapeople.org/python-pyte/python-pyte.spec
srpm: https://terjeros.fedorapeople.org/python-pyte/python-
pyte-0.8.0-2.fc33.src.rpm
user: terjeros
koji: https://koji.fedoraproject.org/koji/taskinfo?taskID=61532613
lint: 2 packages and 0 specfiles checked; 0 errors, 0 warnings
desc:
In memory VTXXX-compatible terminal emulator.  XXX stands for a series
of video terminals, developed by DEC between 1970 and 1995.

Comment 1 Terje Røsten 2021-02-20 10:42:33 UTC
*** Bug 1576056 has been marked as a duplicate of this bug. ***

Comment 2 Robert-André Mauchin 🐧 2021-02-21 01:03:01 UTC
 - Requires should be autodetected:

Requires:       python3-wcwidth

 - Please fix the URL to point to a valid homepage:

URL:            https://pypi.python.org/pypi/

 - Please use a more specific name for your archive:

Source0:        https://github.com/selectel/pyte/archive/%{version}/%{name}-{version}.tar.gz

 - Use Sphinx to build the docs in docs/

 - Consider adding examples/ to %doc

 - You should add AUTHORS and CHANGES to %doc

 - Python provides is not needed past F33 anymore:

%{?python_provide:%python_provide python3-pyte}

For previous version you should use the %py_provides macro instead:

%py_provides python3-pyte

Seee https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_the_py_provides_macro

Comment 3 Robert-André Mauchin 🐧 2021-02-21 01:09:10 UTC
 - I meant
 
Source0:        https://github.com/selectel/pyte/archive/%{version}/%{name}-%{version}.tar.gz

Comment 4 Robert-André Mauchin 🐧 2021-02-21 01:33:37 UTC
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.rosten> - 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

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

Comment 5 Terje Røsten 2021-02-21 08:06:46 UTC
Thanks for quick review!

Changes done:

 - Fix source and url
 - Drop explicit requires, autodetected these days
 - Add AUTHORS and CHANGES to doc
 - Use py_provides macro for Fedora 32, automatically elsewhere
 - Add patch from Robert-Andre Mauchi to avoid network access during buil
 - Build and ship API docs in docs subpackage, include examples too

spec: https://terjeros.fedorapeople.org/python-pyte/python-pyte.spec
srpm: https://terjeros.fedorapeople.org/python-pyte/python-pyte-0.8.0-3.fc31.src.rpm
koji: https://koji.fedoraproject.org/koji/taskinfo?taskID=62416484

Comment 6 Robert-André Mauchin 🐧 2021-03-05 06:36:28 UTC
Package approved.

Please fix the typos in the changelog.

Comment 7 Terje Røsten 2021-03-08 17:41:30 UTC
Thanks!


SCM request sent:

 https://pagure.io/releng/fedora-scm-requests/issue/32642

Could you please consider to have a look at
 
https://bugzilla.redhat.com/show_bug.cgi?id=1925940

too? I think it should be fairly simple.

Comment 8 Tomas Hrcka 2021-03-10 22:26:16 UTC
(fedscm-admin):  The Pagure repository was created at https://src.fedoraproject.org/rpms/python-pyte

Comment 9 Fedora Update System 2021-03-14 09:51:31 UTC
FEDORA-2021-8daed5aa8d has been submitted as an update to Fedora 34. https://bodhi.fedoraproject.org/updates/FEDORA-2021-8daed5aa8d

Comment 10 Fedora Update System 2021-03-14 09:51:31 UTC
FEDORA-2021-b1cb08fefa has been submitted as an update to Fedora 32. https://bodhi.fedoraproject.org/updates/FEDORA-2021-b1cb08fefa

Comment 11 Fedora Update System 2021-03-14 19:15:59 UTC
FEDORA-2021-8daed5aa8d has been pushed to the Fedora 34 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf install --enablerepo=updates-testing --advisory=FEDORA-2021-8daed5aa8d \*`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-8daed5aa8d

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 12 Fedora Update System 2021-03-15 01:33:01 UTC
FEDORA-2021-b1cb08fefa has been pushed to the Fedora 32 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf install --enablerepo=updates-testing --advisory=FEDORA-2021-b1cb08fefa \*`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-b1cb08fefa

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 13 Fedora Update System 2021-03-15 01:41:47 UTC
FEDORA-2021-0a59210dfe has been pushed to the Fedora 33 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf install --enablerepo=updates-testing --advisory=FEDORA-2021-0a59210dfe \*`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-0a59210dfe

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 14 Fedora Update System 2021-03-19 20:14:55 UTC
FEDORA-2021-8daed5aa8d has been pushed to the Fedora 34 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 15 Fedora Update System 2021-03-23 01:11:13 UTC
FEDORA-2021-b1cb08fefa has been pushed to the Fedora 32 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 16 Fedora Update System 2021-03-23 01:32:36 UTC
FEDORA-2021-0a59210dfe has been pushed to the Fedora 33 stable repository.
If problem still persists, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.