Re: Apprise RPM Packaging Assistance Request for %pyproject_* Migration

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Chris-san

I managed to build the RPM for Apprise 1.9.4 on Fedora Rawhide with
only minor adjustments to the spec file.

- I used %pyproject_* macros.
- I skipped most of the tests in %check using the -k option for pytest
(since many test dependencies are unavailable or fail in the mock/koji
environment).
- No major changes were needed for handling .mo files—just relied on
%pyproject_install and %pyproject_save_files apprise.
- README.md was installed as a doc file for compliance.

Here is my working spec file for reference:
https://github.com/redadmin-k/python-apprise-spec/blob/main/python-apprise.spec

Best regards,
Akiyoshi Kurita

2025年8月17日(日) 4:43 Chris <lead2gold@xxxxxxxxx>:
>
> Thanks for looking into this Akiyoshi,
>
> The spec file is here: https://github.com/caronc/apprise/blob/master/packaging/redhat/python-apprise.spec
> The error from Koji (rawhide) build.log (https://kojipkgs.fedoraproject.org//work/tasks/3794/135693794/build.log) is
>
> RPM build errors:
>     File not found: /builddir/build/BUILD/python-apprise-1.9.4-build/BUILDROOT/usr/lib/python3.14/site-packages/apprise/i18n/en/LC_MESSAGES/apprise.mo
>
> However the file is present and the same RPM builds without a problem with RHEL9, and Fedora 42.  It almost feels like I need another `%if` check in the spec file for some new way things are handled for Fedora 43? Perhaps one now where I need to manually place the .mo in place for F43+ ?
>
> ```
> # The following further validates the presence of the apprise.mo file (and is not missing in other successful RPM builds)
>
> wget https://github.com/caronc/apprise/releases/download/v1.9.4/apprise-1.9.4.tar.gz
>
> tar tfz apprise-1.9.4.tar.gz | egrep apprise.mo
>
> apprise-1.9.4/apprise/i18n/en/LC_MESSAGES/apprise.mo
> ```
>
> You identified that you made the rpm build with minor changes and I could ask for details... I would certainly kindly ask that you share what you changed (please). My brain is mush at this point and I simply can't spot the error that was apparent to you. I feel that I've captured all of the required libraries already and addressed your suggestions in your last email in the spec file as it is now (unchanged); also even with the rawhide, all unit tests successfully pass (per your comment on missing BuildRequires dependencies).
>
> I would also add that this koji build i'm sharing is a week or so old (when it failed).  I tried building just now (to have a fresh reference for my issue) with the same failure that can be seen here (now on F44):
> https://koji.fedoraproject.org/koji/taskinfo?taskID=136153467
>
> Finally, thanks again for such a fast reply.
>
>
> On Sat, Aug 16, 2025 at 2:10 PM Akihito Kurita <akito5623@xxxxxxxxx> wrote:
>>
>> Hi Chris-san
>>
>> I just tried building apprise-1.9.4 on Fedora Rawhide and EL10 with
>> mock, and the RPM build succeeded after a few adjustments.
>>
>> Key points:
>> - Make sure all build/test dependencies are listed in BuildRequires
>> (including pytest plugins and YAML, etc).
>> - Double-check %files so it only includes files that actually exist
>> (e.g., README.rst, docs).
>> - If tests fail due to missing dependencies, you can temporarily skip them with:
>>   %global _pytest_addopts --deselect tests/
>>   in the spec file.
>>
>> With these changes, the RPMs built cleanly. Let me know if you want
>> more details.
>>
>> Best regards,
>> Akiyoshi Kurita
>>
>>
>> 2025年8月17日(日) 1:52 Chris <lead2gold@xxxxxxxxx>:
>> >
>> > Hi all,
>> >
>> > I'm having a weird error bundling my Python project (worked fine before).  I did a massive refactoring of it to try to drop reference of setup.py and migrate to pyproject.toml and I feel it was a pretty good success. I wanted to modernize the platform and her to the %pyproject_* structure now but I'm unable to rebuild my rpms:
>> > ```
>> > # The following works perfect:
>> > git clone git@xxxxxxxxxx:caronc/apprise.git
>> > cd apprise
>> > docker compose run --rm rpmbuild.el9 bash build-rpm.sh
>> > docker compose run --rm rpmbuild.f42 bash build-rpm.sh
>> >
>> > # Observe RPMs that are built fine:
>> > find dist -type f
>> >
>> > # dist/apprise-1.9.4.tar.gz
>> > # dist/rpm/python-apprise-1.9.4-1.fc42.src.rpm
>> > # dist/rpm/python-apprise-1.9.4-1.el9.src.rpm
>> > # dist/rpm/noarch/apprise-1.9.4-1.fc42.noarch.rpm
>> > # dist/rpm/noarch/python3-apprise-1.9.4-1.el9.noarch.rpm
>> > # dist/rpm/noarch/apprise-1.9.4-1.el9.noarch.rpm
>> > # dist/rpm/noarch/python3-apprise-1.9.4-1.fc42.noarch.rpm
>> > ```
>> >
>> > # HOWEVER with koji rawhide... not so much (and purpose of this email)
>> > See: https://koji.fedoraproject.org/koji/taskinfo?taskID=135693691
>> >
>> > Any advice would be most appreciated; Once this works, I can gracefully close https://bugzilla.redhat.com/show_bug.cgi?id=2377453.
>> >
>> > Even a manual process works great (should there be concern about what is in my scripts)
>> > ```
>> > docker-compose run --rm rpmbuild.f42 bash
>> > APPRISE_DIR=$(pwd)
>> > DIST_DIR=$APPRISE_DIR/dist
>> > spectool -g $APPRISE_DIR/packaging/redhat/python-apprise.spec
>> > mv apprise-1.9.4.tar.gz dist/
>> > rpmbuild --define "_topdir $APPRISE_DIR" \
>> >          --define "_sourcedir $APPRISE_DIR/SOURCES" \
>> >          --define "_specdir $APPRISE_DIR/packaging/redhat" \
>> >          --define "_srcrpmdir $APPRISE_DIR/SRPMS" \
>> >          --define "_rpmdir $DIST_DIR" \
>> >          -ba "$APPRISE_DIR/packaging/redhat/python-apprise.spec"
>> > ```
>> > Quick link to my repository if that helps too: https://github.com/caronc/apprise
>> >
>> > I have a hunch it will just turn out to be something obvious that my brain spent to much time overlooking. Turning to you all for help 🙏
>> >
>> > Thank you in advance!
>> >
>> > Chris
>> > --
>> > _______________________________________________
>> > devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx
>> > To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx
>> > 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/devel@xxxxxxxxxxxxxxxxxxxxxxx
>> > Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue
>> --
>> _______________________________________________
>> devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx
>> To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx
>> 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/devel@xxxxxxxxxxxxxxxxxxxxxxx
>> Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue
>
> --
> _______________________________________________
> devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx
> To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx
> 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/devel@xxxxxxxxxxxxxxxxxxxxxxx
> Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue
-- 
_______________________________________________
devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx
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/devel@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Users]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]

  Powered by Linux