Bug 2136235 - Review Request: mingw-python-build - MinGW Python build library
Summary: Review Request: mingw-python-build - MinGW Python build library
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Sandro
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On: 2136237
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-10-19 17:26 UTC by Sandro Mani
Modified: 2022-11-01 11:05 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-11-01 11:05:18 UTC
Type: ---
Embargoed:
gui1ty: fedora-review+


Attachments (Terms of Use)

Description Sandro Mani 2022-10-19 17:26:15 UTC
Spec URL: https://smani.fedorapeople.org/review/mingw-python-build.spec
SRPM URL: https://smani.fedorapeople.org/review/mingw-python-build-0.8.0-1.fc38.src.rpm
Description: MinGW Python build library
Fedora Account System Username: smani

Test builds: https://copr.fedorainfracloud.org/coprs/smani/mingw-python3-3.11-build/builds/

Comment 1 Maxwell G 2022-10-19 19:49:10 UTC
I would use `%py3_build` and `%py3_install` (build uses setuptools) and get rid of the bootstrap logic.

Comment 2 Sandro Mani 2022-10-19 20:34:13 UTC
Spec URL: https://smani.fedorapeople.org/review/mingw-python-build.spec
SRPM URL: https://smani.fedorapeople.org/review/mingw-python-build-0.8.0-2.fc38.src.rpm

%changelog
* Wed Oct 19 2022 Sandro Mani <manisandro> - 0.8.0-2
- Switch to setuptools based build and drop bootstrap logic

Comment 3 Sandro 2022-10-20 17:07:51 UTC
I take this one.

Comment 4 Sandro 2022-10-21 20:17:41 UTC
With the bootstrapped mingw-python-installer present in Copr, this package builds, but fails to install.

Copr build: https://copr.fedorainfracloud.org/coprs/gui1ty/reviews/build/4965807/

I also tried building de non-bootstrapped installer and pep517. They fail because nothing provides mingw{32,64}-python3-build. I want to test the non-bootstrapped version before approving those.

Comment 5 Sandro Mani 2022-10-25 16:13:26 UTC
The builds are failing due to mingw-python-wheel not yet being in the repos (I want to push the entire batch at once, once all pieces are in place). You can find the SRPM in my test repo [1].  Perhaps that repo is also already a sufficient demonstration that the pieces work together.

[1] https://copr.fedorainfracloud.org/coprs/smani/mingw-python3-3.11-build/builds/

Comment 6 Sandro 2022-10-25 21:34:16 UTC
(In reply to Sandro Mani from comment #5)
> Perhaps that repo is also already a
> sufficient demonstration that the pieces work together.

True to some extent. It would be even more helpful, had you enabled 'Run fedora-review tool for packages in this project'. ;)

How many of the packages still need to be reviewed? I understand it's not straight forward having packages depend on each other, but one has to start somewhere and build it up. Now it feels like a hit and miss. Is there a dependency tree of some kind for all the packages?

Comment 7 Sandro Mani 2022-10-25 21:42:14 UTC
> True to some extent. It would be even more helpful, had you enabled 'Run fedora-review tool for packages in this project'. ;)

I actually wasn't aware of that option, I'll keep it in mind!

> How many of the packages still need to be reviewed? I understand it's not straight forward having packages depend on each other, but one has to start somewhere and build it up. Now it feels like a hit and miss. Is there a dependency tree of some kind for all the packages?

The dependency tree resp build sequence is:

mingw-python3

mingw-python-setuptools
mingw-python-wheel

mingw-python-flit-core
mingw-python-pep517 (bootstrap)
mingw-python-pyparsing (bootstrap)
mingw-python-packaging (bootstrap)
mingw-python-installer (boostrap)
mingw-python-build

mingw-python-pep517
mingw-python-pyparsing
mingw-python-packaging
mingw-python-installer

Of these, mingw-python-flit-core, mingw-python-pep517, mingw-python-installer and mingw-python-build are pending review.

Comment 8 Sandro 2022-10-25 21:53:30 UTC
So, mingw-python-wheel has been approved. Could you push that to rawhide? Looks like it doesn't depend on any of the packages still in review.

Comment 9 Sandro Mani 2022-10-25 21:56:37 UTC
Yes I can indeed to that, proceeding.

Comment 10 Sandro Mani 2022-10-30 10:10:51 UTC
I've imported the package, but it fails to build with python3.10, not really sure why [1]. I'd prefer not spending time to debug the python3.10 build as it builds fine with python3.11 and I'm not planning to ship with python3.10 anyway.


[1] https://kojipkgs.fedoraproject.org//work/tasks/3071/93463071/build.log

Comment 11 Sandro 2022-10-30 10:21:32 UTC
I only asked for a rawhide build. Rawhide is python3.11, so why are you running up against python3.10? It's fine not releasing the package for older python versions or leaving that for later.

Comment 12 Sandro Mani 2022-10-30 10:23:00 UTC
No actually mingw-python3 on rawhide is still 3.10, the 3.11 push is pending all these reviews.

Comment 13 Sandro 2022-10-30 10:30:39 UTC
Alright. I misunderstood. So, basically everything depends on each other in a rather fragile way. I know you have a proof of concept in Copr, I'm just wondering how this is going to pan out once you start updating packages.

Let me reset my bearings and zoom out a bit...

Comment 14 Sandro Mani 2022-10-30 10:32:28 UTC
Well the typical strategy in these cases is to do all the builds in a side-tag, and then merge when the entire package set is built.

Comment 15 Sandro 2022-10-30 13:19:12 UTC
Issues:
=======
- Package contains BR: python2-devel or python3-devel
=> Not sure if there should be a BR: python3-devel since we are talking mingw here and the package builds fine without it

- Package must own all directories that it creates.
     Note: Directories without known owners: /usr/lib/rpm,
     /usr/lib/rpm/macros.d
=> Looks like a missing requires on rpm (or whatever else is able to provide the directories you are installing to)

- README.md is missing in %files
=> tarball provides README.md. Please include it as %doc

Package Review
==============

Legend:
[x] = Pass, [!] = Fail, [-] = Not applicable, [?] = Not evaluated
[ ] = Manual review needed


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

Generic:
[x]: Package successfully compiles and builds into binary rpms on at least
     one supported primary architecture.
     Note: Using prebuilt packages
[x]: Package is licensed with an open-source compatible license and meets
     other legal requirements as defined in the legal section of Packaging
     Guidelines.
[x]: License field in the package spec file matches the actual license.
[x]: License file installed when any subpackage combination is installed.
[!]: Package must own all directories that it creates.
     Note: Directories without known owners: /usr/lib/rpm,
     /usr/lib/rpm/macros.d
[x]: Package contains no bundled libraries without FPC exception.
[x]: Changelog in prescribed format.
[x]: Sources contain only permissible code or content.
[x]: Package uses nothing in %doc for runtime.
[x]: Package consistently uses macros (instead of hard-coded directory
     names).
[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.
[!]: Requires correct, justified where necessary.
[x]: Spec file is legible and written in American English.
[x]: Package is not known to require an ExcludeArch tag.
[x]: Package complies to the Packaging Guidelines
[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 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
     work.
[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
     %{name}.spec.
[x]: File names are valid UTF-8.
[x]: Large documentation must go in a -doc subpackage. Large could be size
     (~1MB) or number of files.
     Note: Documentation size is 0 bytes in 0 files.
[x]: Packages must not store files under /srv, /opt or /usr/local

Python:
[x]: Python eggs must not download any dependencies during the build
     process.
[x]: Package meets the Packaging Guidelines::Python
[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 =====

Generic:
[x]: Reviewer should test that the package builds in mock.
[x]: Final provides and requires are sane (see attachments).
[?]: Package functions as described.
[x]: Latest version is packaged.
[x]: Package does not include license text files separate from upstream.
[?]: Package should compile and build into binary rpms on all supported
     architectures.
[-]: %check is present and all tests pass.
[x]: Packages should try to preserve timestamps of original installed
     files.
[x]: Buildroot is not present
[x]: Package has no %clean section with rm -rf %{buildroot} (or
     $RPM_BUILD_ROOT)
[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 =====

Generic:
[!]: Rpmlint is run on all installed packages.
     Note: Mock build failed
     See: https://docs.fedoraproject.org/en-US/packaging-
     guidelines/#_use_rpmlint


Rpmlint
-------
Some warnings regarding duplicate files and no documentation
=> README.md not included


Source checksums
----------------
https://files.pythonhosted.org/packages/source/b/build/build-0.8.0.tar.gz :
  CHECKSUM(SHA256) this package     : 887a6d471c901b1a6e6574ebaeeebb45e5269a79d095fe9a8f88d6614ed2e5f0
  CHECKSUM(SHA256) upstream package : 887a6d471c901b1a6e6574ebaeeebb45e5269a79d095fe9a8f88d6614ed2e5f0


Requires
--------
mingw32-python3-build (rpmlib, GLIBC filtered):
    /usr/bin/python3.11
    mingw32(python(abi))
    mingw32(python3.11dist(packaging))
    mingw32(python3.11dist(pep517))
    mingw32-python3-installer
    mingw32-python3-setuptools
    mingw32-python3-wheel

mingw64-python3-build (rpmlib, GLIBC filtered):
    /usr/bin/python3.11
    mingw64(python(abi))
    mingw64(python3.11dist(packaging))
    mingw64(python3.11dist(pep517))
    mingw64-python3-installer
    mingw64-python3-setuptools
    mingw64-python3-wheel



Provides
--------
mingw32-python3-build:
    mingw32(python3.11dist(build))
    mingw32(python3dist(build))
    mingw32-python3-build
    rpm_macro(mingw32_py3_build_host_wheel)
    rpm_macro(mingw32_py3_build_wheel)
    rpm_macro(mingw32_py3_install_host_wheel)
    rpm_macro(mingw32_py3_install_wheel)

mingw64-python3-build:
    mingw64(python3.11dist(build))
    mingw64(python3dist(build))
    mingw64-python3-build
    rpm_macro(mingw64_py3_build_host_wheel)
    rpm_macro(mingw64_py3_build_wheel)
    rpm_macro(mingw64_py3_install_host_wheel)
    rpm_macro(mingw64_py3_install_wheel)



Generated by fedora-review 0.8.0 (e988316) last change: 2022-04-07
Command line :/usr/bin/fedora-review --no-colors --prebuilt --rpm-spec --name mingw-python-build --mock-config /var/lib/copr-rpmbuild/results/configs/child.cfg
Buildroot used: fedora-rawhide-x86_64
Active plugins: Shell-api, Python, Generic
Disabled plugins: SugarActivity, C/C++, Haskell, Ocaml, R, Java, Perl, fonts, PHP
Disabled flags: EPEL6, EPEL7, DISTTAG, BATCH, EXARCH

Comment 16 Sandro Mani 2022-10-30 19:28:21 UTC
Spec URL: https://smani.fedorapeople.org/review/mingw-python-build.spec
SRPM URL: https://smani.fedorapeople.org/review/mingw-python-build-0.8.0-3.fc38.src.rpm

%changelog
* Sun Oct 30 2022 Sandro Mani <manisandro> - 0.8.0-3
- Require rpm for %%{_rpmconfigdir}/macros.d/



> - Package contains BR: python2-devel or python3-devel
> => Not sure if there should be a BR: python3-devel since we are talking mingw here and the package builds fine without it

No this does not apply to mingw-python packages

> - Package must own all directories that it creates.
>      Note: Directories without known owners: /usr/lib/rpm,
>      /usr/lib/rpm/macros.d
> => Looks like a missing requires on rpm (or whatever else is able to provide the directories you are installing to)

Fixed

> - README.md is missing in %files
> => tarball provides README.md. Please include it as %doc

Docs omitted per [1].

[1] https://docs.fedoraproject.org/en-US/packaging-guidelines/MinGW/#_files_which_are_already_part_of_native_packages

Comment 17 Sandro 2022-10-30 20:14:58 UTC
I should have taken a closer look at the MinGW guidelines when taking on these reviews, instead of approaching this from the Python angle. ;)

At least I learned something should I come across MinGW again in a future review.

Package is approved.

Comment 18 Sandro Mani 2022-10-31 17:13:10 UTC
Thanks!

Comment 19 Gwyn Ciesla 2022-10-31 17:15:57 UTC
(fedscm-admin):  The Pagure repository was created at https://src.fedoraproject.org/rpms/mingw-python-build

Comment 20 Fedora Update System 2022-11-01 10:58:10 UTC
FEDORA-2022-f7a5568776 has been submitted as an update to Fedora 38. https://bodhi.fedoraproject.org/updates/FEDORA-2022-f7a5568776

Comment 21 Fedora Update System 2022-11-01 11:05:18 UTC
FEDORA-2022-f7a5568776 has been pushed to the Fedora 38 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.