Bug 2148595 - Review Request: python-linetable - Parse and generate co_linetable attributes in code objects
Summary: Review Request: python-linetable - Parse and generate co_linetable attributes...
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Lubomir Rintel
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 2148949
TreeView+ depends on / blocked
 
Reported: 2022-11-26 06:52 UTC by Jan ONDREJ
Modified: 2023-11-04 07:23 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-11-04 07:23:37 UTC
Type: ---
Embargoed:
lkundrak: fedora-review+


Attachments (Terms of Use)

Description Jan ONDREJ 2022-11-26 06:52:25 UTC
Spec URL: https://www.salstar.sk/pub/fedora/SPECS/python-linetable.spec
SRPM URL: https://www.salstar.sk/pub/fedora/testing/37/SRPMS/python-linetable-0.0.2-1.fc37.src.rpm
Description: 
linetable is a library parse and generate co_linetable attributes
in Python code objects.
Fedora Account System Username: ondrejj

This package is required to build new versions of python-kajiki.

Comment 1 Miro Hrončok 2022-11-28 12:40:59 UTC
Spec sanity:

1) Please, consider using the current Python packaging guidelines. https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/
The spec looks like it has been generated by rpmdev-newspec. Upstream has a pyproject template in https://pagure.io/rpmdevtools/blob/main/f/spectemplate-pyproject.spec but it has not been released yet.



2) %{?!python3_pkgversion:%global python3_pkgversion 3}

This is not needed in Fedora at all. Do you intend to build the same spec file in SUSE? If not, please drop it.



3) %{?python_enable_dependency_generator}

This is not needed in Fedora at all. Do you intend to build the same spec file in RHEL 8 or 7? If not, please drop it.



4) rm -rf $RPM_BUILD_ROOT

This should not be needed anywhere. Please, drop it.


5) %{__python3} setup.py test

This dos nothing. It says "Ran 0 tests in 0.000s" and exits cleanly.
Please, make sure the tests are actually run. Consider using %pytest (and BR python3-pytest), that works.

Comment 2 Jan ONDREJ 2022-11-28 14:15:39 UTC
Thank you for review.

New package:
Spec URL: https://www.salstar.sk/pub/fedora/SPECS/python-linetable.spec
SRPM URL: https://www.salstar.sk/pub/fedora/testing/37/SRPMS/python-linetable-0.0.2-2.fc37.src.rpm

Spec file has been updated according to guidelines.

%pytest passes 6 tests.

Package is required for kajiki 0.9.2. EPEL8 has version 0.9.0, EPEL9 has no one yet.
I can't tell now, if I need to build this in EPEL8 and EPEL9, but currently linetable requires python3.11 which is present only in Fedora. I have to talk with upstream, how to handle future updates of kajiki, possibly they have to make linetable optional for python 3.10-.

Can you please make another review?

Comment 3 Lubomir Rintel 2022-12-07 19:30:13 UTC
* Package named properly
* Packaging the latest version
* Source matches upstream
* License tag correct
* License packaged, good for Fedora
* Filelist sane
* Provides sane
* Requires sane
* rpmlint happy
* SPEC file clean and legible
* Builds fine in mock
* Macros used consistently

The package is APPROVED

One minor nit:

0.) Please don't repeate the package name in %description:

-linetable is a library parse and generate co_linetable attributes
-in Python code objects.

Something like this (the same as upstream uses on their website) would be
more reasonable:

+Library to parse and generate co_linetable attributes in Python code
+objects.

Comment 4 Miro Hrončok 2022-12-07 20:42:03 UTC
Lubomir, thanks for finishing this review.

Comment 5 Miro Hrončok 2022-12-07 20:43:48 UTC
One more nit-pick:


BuildRequires:  python3-setuptools


This is generated by %pyproject_buildrequires and as such should not be manually repeated in the spec file.

"""Automatically determined dependencies MUST NOT be duplicated by manual dependencies.""" https://docs.fedoraproject.org/en-US/packaging-guidelines/#_package_dependencies

Comment 6 Jan ONDREJ 2022-12-08 06:57:50 UTC
Thanks for review. All comments have been applied.

Comment 7 Gwyn Ciesla 2022-12-08 14:48:55 UTC
(fedscm-admin):  The Pagure repository was created at https://src.fedoraproject.org/rpms/python-linetable


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