Bug 2159976 - Review Request: python-scikit-build - Improved build system generator for Python C/C++/Fortran/Cython extensions
Summary: Review Request: python-scikit-build - Improved build system generator for Pyt...
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Miro Hrončok
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2023-01-11 09:37 UTC by Tomáš Hrnčiar
Modified: 2023-02-10 12:10 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2023-02-10 12:10:09 UTC
Type: ---
mhroncok: fedora-review+

Attachments (Terms of Use)
The .spec file difference from Copr build 5216165 to 5216994 (1.65 KB, patch)
2023-01-11 14:01 UTC, Jakub Kadlčík
no flags Details | Diff

Comment 2 Miro Hrončok 2023-01-11 10:34:58 UTC
From https://download.copr.fedorainfracloud.org/results/@fedora-review/fedora-review-2159976-python-scikit-build/fedora-rawhide-x86_64/05216165-python-scikit-build/fedora-review/review.txt

> python3-scikit-build.x86_64: E: no-binary

This indicates this should be a noarch package.
The need for `%global debug_package %{nil}` indicates the same.

> python-scikit-build.spec:1: W: macro-in-comment %files

That is in the comment about debug_package and will go away.

> python-scikit-build.src: E: description-line-too-long cross compilation, and locating dependencies and determining their build requirements.
> python3-scikit-build.x86_64: E: description-line-too-long cross compilation, and locating dependencies and determining their build requirements.

Please, wrap the lines.


Spec comments:

> BuildRequires:  gcc-c++
> BuildRequires:  gcc-gfortran

I suggest also adding gcc. It is transitively pulled but used directly.
I also suggest separating the tests deps visually from the build deps e.g.:

  BuildRequires:  python3-devel

  # For tests:
  BuildRequires:  cmake
  BuildRequires:  gcc
  BuildRequires:  gcc-c++
  BuildRequires:  gcc-gfortran
  BuildRequires:  git-core
  BuildRequires:  ninja-build

> Requires:       cmake

Is ninja also required on runtime or not?

> Patch:          0001-Remove-test-deps-missing-in-Fedora.patch

Consider not numbering the patch file, please. When/if more patches are added and some are removed, it gets messy. We got rid of the PatchX: numbering recently, let's not dig ourselves back with patch filenames?

> %pytest -k "not pep518 and not \
>             test_hello_sdist and not \
>             test_hello_sdist_with_base and not \
>             test_sdist_with_symlinks and not \
>             test_manifest_in_sdist" -m "not deprecated"

Consider putting -m "not deprecated" on a separate line after backslash, IMHO it improves readability.

Comment 3 Miro Hrončok 2023-01-11 12:43:41 UTC
Looking at the patch.

Could you please also remove pytest-cov, coverage, codecov, flake8?

Comment 4 Cristian Le 2023-01-11 13:08:02 UTC
Shouldn't this include a [`%py_provides` macro](https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_provides_and_requirements), or is it included automatically?

Comment 5 Tomáš Hrnčiar 2023-01-11 13:54:10 UTC
I've addressed all remarks, here is the updated spec file and src rpm.

Spec URL: https://download.copr.fedorainfracloud.org/results/thrnciar/python-scikit-build/fedora-rawhide-x86_64/05216837-python-scikit-build/python-scikit-build.spec
SRPM URL: https://download.copr.fedorainfracloud.org/results/thrnciar/python-scikit-build/fedora-rawhide-x86_64/05216837-python-scikit-build/python-scikit-build-0.16.4-1.fc38.src.rpm
Description: Improved build system generator for Python C/C++/Fortran/Cython extensions

Fedora Account System Username: thrnciar(In reply to redhat from comment #4)
> Shouldn't this include a [`%py_provides`
> macro](https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/
> #_provides_and_requirements), or is it included automatically?

I think this should be included automatically.
Current provides are:


Comment 6 Jakub Kadlčík 2023-01-11 14:01:01 UTC
Created attachment 1937363 [details]
The .spec file difference from Copr build 5216165 to 5216994

Comment 8 Miro Hrončok 2023-01-11 14:03:17 UTC
> %pyproject_buildrequires requirements-dev.txt

Would this be more "standard"?

  %pyproject_buildrequires -x test

? See https://github.com/scikit-build/scikit-build/blob/0.16.4/setup.py#L58

The spec file seems reasonable.


See https://download.copr.fedorainfracloud.org/results/thrnciar/python-scikit-build/fedora-rawhide-x86_64/05216837-python-scikit-build/fedora-review/licensecheck.txt and see the content of LICENSE.

I worry the License tag might need to be updated a bit but I don't have the time right now to tell exactly how.

Comment 9 Miro Hrončok 2023-01-11 14:07:31 UTC
At least the following 2 files are packaged and should affect the license.


I also wonder if this isn't some kind of bundling.

Comment 10 Cristian Le 2023-01-11 14:13:07 UTC
Would it make sense to move these files to system cmake? The system would call system cmake by default, and it would be helpful for debugging non python build executions alongside it.

Comment 11 Tomáš Hrnčiar 2023-02-09 09:23:37 UTC
Spec URL: https://download.copr.fedorainfracloud.org/results/thrnciar/python-scikit-build/fedora-rawhide-x86_64/05506310-python-scikit-build/python-scikit-build.spec
SRPM URL: https://download.copr.fedorainfracloud.org/results/thrnciar/python-scikit-build/fedora-rawhide-x86_64/05506310-python-scikit-build/python-scikit-build-0.16.6-1.fc38.src.rpm
Description: Improved build system generator for Python C/C++/Fortran/Cython extensions

Bundled files are marked with virtual provides, the license field contains all licenses and the spec file uses the latest upstream version.

Comment 13 Miro Hrončok 2023-02-09 11:41:05 UTC
> All bundled file listed are licensed by Apache-2.0.

Suggestion: All bundled(cmake()) files are Apache-2.0 licensed.


Spec is sane, will take https://download.copr.fedorainfracloud.org/results/thrnciar/python-scikit-build/fedora-rawhide-x86_64/05506723-python-scikit-build/fedora-review/ and submit a review based on that and my manual checks.

Comment 14 Miro Hrončok 2023-02-09 11:43:47 UTC
> License:        MIT and BSD-2-Clause-Views and Apache-2.0

SPDX conjunction operator is apper-case AND:  https://docs.fedoraproject.org/en-US/legal/license-field/#_conjunctive_and_licensing

Comment 16 Miro Hrončok 2023-02-10 11:21:01 UTC
tl;dr The two comments above are my only concenrns.

Package Review

[x] = Pass, [!] = Fail, [-] = Not applicable, [?] = Not evaluated

===== MUST items =====

[x]: Package successfully compiles and builds into binary rpms on at least
     one supported primary architecture.
[x]: Package is licensed with an open-source compatible license and meets
     other legal requirements as defined in the legal section of Packaging
[x]: License field in the package spec file matches the actual license.
     Note: Checking patched sources after %prep for licenses. Licenses
     found: "Unknown or generated", "MIT License BSD 2-Clause with views
     sentence", "*No copyright* MIT License", "Apache License 2.0". 227
     files have unknown license.
[x]: If the package is under multiple licenses, the licensing breakdown
     must be documented in the spec.
[-]: Package contains no bundled libraries without FPC exception.
[x]: Changelog in prescribed format.
[x]: Sources contain only permissible code or content.
[-]: Package contains desktop file if it is a GUI application.
[-]: Development files must be in a -devel package
[x]: Package uses nothing in %doc for runtime.
[x]: Package consistently uses macros (instead of hard-coded directory
[x]: Package is named according to the Package Naming Guidelines.
[x]: Package does not generate any conflict.
[x]: Package obeys FHS, except libexecdir and /usr/target.
[-]: If the package is a rename of another package, proper Obsoletes and
     Provides are present.
[x]: Requires correct, justified where necessary.
[x]: Spec file is legible and written in American English.
[-]: Package contains systemd file(s) if in need.
[x]: Package is not known to require an ExcludeArch tag.
[-]: Large documentation must go in a -doc subpackage. Large could be size
     (~1MB) or number of files.
     Note: Documentation size is 10240 bytes in 1 files.
[x]: Package complies to the Packaging Guidelines
[x]: Package installs properly.
[x]: Rpmlint is run on all rpms the build produces.
     Note: There are rpmlint messages (see attachment).
[x]: If (and only if) the source package includes the text of the
     license(s) in its own file, then that file, containing the text of the
     license(s) for the package is included in %license.
[x]: Package requires other packages for directories it uses.
[x]: Package must own all directories that it creates.
[x]: Package does not own files or directories owned by other packages.
[x]: Package uses either %{buildroot} or $RPM_BUILD_ROOT
[x]: Package does not run rm -rf %{buildroot} (or $RPM_BUILD_ROOT) at the
     beginning of %install.
[x]: Macros in Summary, %description expandable at SRPM build time.
[x]: Dist tag is present.
[x]: Package does not contain duplicates in %files.
[x]: Permissions on files are set properly.
[x]: Package must not depend on deprecated() packages.
[x]: Package use %makeinstall only when make install DESTDIR=... doesn't
[x]: Package is named using only allowed ASCII characters.
[x]: Package does not use a name that already exists.
[x]: Package is not relocatable.
[x]: Sources used to build the package match the upstream source, as
     provided in the spec URL.
[x]: Spec file name must match the spec package %{name}, in the format
[x]: File names are valid UTF-8.
[x]: Packages must not store files under /srv, /opt or /usr/local

[x]: Python eggs must not download any dependencies during the build
[x]: A package which is used by another package via an egg interface should
     provide egg info.
[x]: Package meets the Packaging Guidelines::Python
[x]: Package contains BR: python2-devel or python3-devel
[x]: Packages MUST NOT have dependencies (either build-time or runtime) on
     packages named with the unversioned python- prefix unless no properly
     versioned package exists. Dependencies on Python packages instead MUST
     use names beginning with python2- or python3- as appropriate.
[x]: Python packages must not contain %{pythonX_site(lib|arch)}/* in %files
[x]: Binary eggs must be removed in %prep

===== SHOULD items =====

[x]: Reviewer should test that the package builds in mock.
[-]: If the source package does not include license text(s) as a separate
     file from upstream, the packager SHOULD query upstream to include it.
[x]: Final provides and requires are sane (see attachments).
[x]: Package functions as described.
[x]: Latest version is packaged.
[x]: Package does not include license text files separate from upstream.
[-]: Sources are verified with gpgverify first in %prep if upstream
     publishes signatures.
     Note: gpgverify is not used.
[?]: Package should compile and build into binary rpms on all supported
[x]: %check is present and all tests pass.
[?]: Packages should try to preserve timestamps of original installed
[x]: Buildroot is not present
[x]: Package has no %clean section with rm -rf %{buildroot} (or
[x]: No file requires outside of /etc, /bin, /sbin, /usr/bin, /usr/sbin.
[x]: Packager, Vendor, PreReq, Copyright tags should not be in spec file
[x]: Sources can be downloaded from URI in Source: tag
[x]: SourceX is a working URL.
[x]: Spec use %global instead of %define unless justified.

===== EXTRA items =====

[x]: Rpmlint is run on all installed packages.
     Note: No rpmlint messages.

Checking: python3-scikit-build-0.16.6-1.fc38.noarch.rpm
============================ rpmlint session starts ============================
rpmlint: 2.4.0
rpmlintrc: [PosixPath('/tmp/tmp9i9vcr_1')]
checks: 31, packages: 2

python-scikit-build.spec:44: W: unversioned-explicit-provides bundled(cmake(FindCython))
python-scikit-build.spec:45: W: unversioned-explicit-provides bundled(cmake(FindPythonExtensions))
python-scikit-build.spec:46: W: unversioned-explicit-provides bundled(cmake(UseCython))
python-scikit-build.spec:47: W: unversioned-explicit-provides bundled(cmake(UseF2PY))
python-scikit-build.spec:48: W: unversioned-explicit-provides bundled(cmake(UsePythonExtensions))
 2 packages and 0 specfiles checked; 0 errors, 5 warnings, 0 badness; has taken 0.2 s 

Good, version is unknown.

Rpmlint (installed packages)
============================ rpmlint session starts ============================
rpmlint: 2.4.0
checks: 31, packages: 1

 1 packages and 0 specfiles checked; 0 errors, 0 warnings, 0 badness; has taken 0.1 s 


Source checksums
https://files.pythonhosted.org/packages/source/s/scikit-build/scikit-build-0.16.6.tar.gz :
  CHECKSUM(SHA256) this package     : 9047817b0dd2522cc8b7122b398e8a41c18bf4cbd23de1644919bdf34941a8c6
  CHECKSUM(SHA256) upstream package : 9047817b0dd2522cc8b7122b398e8a41c18bf4cbd23de1644919bdf34941a8c6


    python3dist(build) >= 0.7
    python3dist(cython) >= 0.25.1
    python3dist(pip) >= 19
    python3dist(pytest) >= 6
    python3dist(pytest-mock) >= 1.10.4
    python3dist(pytest-virtualenv) >= 1.2.5
    python3dist(setuptools) >= 42
    python3dist(wheel) >= 0.32

python3-scikit-build (rpmlib, GLIBC filtered):
    python(abi) = 3.11
    python3.11dist(setuptools) >= 42
    python3.11dist(wheel) >= 0.32

    python-scikit-build = 0.16.6-1.fc38
    python3-scikit-build = 0.16.6-1.fc38
    python3.11-scikit-build = 0.16.6-1.fc38
    python3.11dist(scikit-build) = 0.16.6
    python3dist(scikit-build) = 0.16.6

Comment 17 Miro Hrončok 2023-02-10 11:22:57 UTC
I got a race condition during my comment, decided to post it anyway.

# This project is mainly MIT but LICENSE also mentions some code
# that is BSD-2-Clause-Views licensed.
# All bundled(cmake()) files listed are Apache-2.0 licensed.
License:        MIT AND BSD-2-Clause-Views AND Apache-2.0


Comment 18 Fedora Admin user for bugzilla script actions 2023-02-10 11:55:26 UTC
The Pagure repository was created at https://src.fedoraproject.org/rpms/python-scikit-build

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