pytransitions / transitions

A lightweight, object-oriented finite state machine implementation in Python with many extensions
MIT License
5.49k stars 525 forks source link

[RFE] Package python3-transitions into RPM #565

Closed grafuls closed 1 year ago

grafuls commented 2 years ago

Is your feature request related to a problem? Please describe. This is an RFE for providing python3-transitions packaged into an RPM format. This would make the library easier to consume on production EL systems where using pip or non-system packages is generally frowned upon.

Describe the solution you'd like You can automate it fairly easy using Github actions and the Fedora COPR service. We are doing this in another project here https://github.com/redhat-performance/badfish/commit/0060ab18217aad1c207bfacb58ac59d12355e226

aleneum commented 2 years ago

Hello @grafuls,

I will have a look. I wonder which COPR_API_TOKEN I should add as a github action secret. My personal token? Or can I create a project-specific API token?

aleneum commented 2 years ago

The workflow seems to work for now. Is there something else I have to do before the RPM becomes usable? Should I set more/other chroot environments?

grafuls commented 2 years ago

The workflow seems to work for now. Is there something else I have to do before the RPM becomes usable?

That's great @aleneum ! The GH action should do all the heavy lifting so the package should be available after the first build.

Should I set more/other chroot environments?

You can select other chroot environments if you want to distribute it to other systems. With badfish we are only making builds for what we tested and can support: centos-stream-8-x86_64 epel-8-x86_64 fedora-34-x86_64 fedora-35-x86_64

grafuls commented 2 years ago

I will have a look. I wonder which COPR_API_TOKEN I should add as a github action secret. My personal token? Or can I create a project-specific API token?

I believe you can only generate it at an account level. You can do that here: https://copr.fedorainfracloud.org/api/ Then you copy the contents of the whole output which is supposed to go to ~/.config/copr into an action secret named COPR_API_TOKEN on the GH repo.

grafuls commented 2 years ago

Can confirm the RPM build that is already on copr works on my Fedora 35 workstation. :tada:

aleneum commented 1 year ago

Hi @grafuls,

unfortunately building RPM does not work anymore (see the log):

+ umask 022
+ cd /builddir/build/BUILD
+ cd /builddir/build/BUILD
+ rm -rf python3-transitions-0.9.0
+ /usr/bin/gzip -dc /builddir/build/SOURCES/python3-transitions-0.9.0.tar.gz
+ /usr/bin/tar -xof -
/usr/bin/tar: This does not look like a tar archive
/usr/bin/tar: Exiting with failure status due to previous errors
error: Bad exit status from /var/tmp/rpm-tmp.wHPgtI (%prep)

Do you have an idea what COPR might have changed in the last 6 month? Do I have to adjust the build scripts (see this commit)? Unfortunately, I cannot debug this without committing to dev-rpm which is rather cumbersome.

aleneum commented 1 year ago

I guess I found a way to publish a working package based on the PyPI release. Since I am not an active Fedora user and not all too familiar with packaging RPMs I won't guarantee that this approach will last forever. Packaging has been transferred to transitions-distribution. I'll do releases manually when a new PyPI release hits the index.