[EPEL-devel] Re: python3.11-rpm to EPEL 9

2023-05-17 Thread Miro Hrončok

On 16. 05. 23 15:44, Maxwell G wrote:

On Tue May 16, 2023 at 11:04 +0200, Miro Hrončok wrote:

On 15. 05. 23 16:49, Maxwell G wrote:

On Mon May 15, 2023 at 12:14 +0200, Miro Hrončok wrote:

Hello,

I'm working on adding python3.11-rpm to EPEL 9 and EPEL 9 Next.

See https://src.fedoraproject.org/rpms/python3-rpm/pull-request/3 and 4.


Cool!


I decided to reuse the python3-rpm component (currently epel7 only). Let me
know if I should not.


Are we able to build for multiple Python versions out of the same
specfile?


It's possible, but it's not nice.

In principle, this works:

%build
%define py3x_build() %{global python3_pkgversion %1}%py3_build
%py3x_build 39
%py3x_build 3.11

%install
%define py3x_install() %{global python3_pkgversion %1}%py3_install
%py3x_install 39
%py3x_install 3.11

But with a project like RPM, we might need to run configure multiple times as
well and create separate working directories. Will need to check.


Yeah, that could work,
but I'd change %{global python3_pkgversion %1} to
%{define python3_pkgversion %1} in the py3x_* macro definitions so you
only change the definition of %python3_pkgversion within those macros'
scopes.


Unless there's some other way to work around this, I'd use a
python3.11-rpm or python3.11-rpm-epel component like we've been doing
for the other alt python stacks in RHEL 8.


I consider the "not nice" way easier, as it will only require to keep one
package synced with c8s rpm, and not many. Will try to hack it up and show how
it looks like.


I tend to agree. Syncing packages with RHEL and CentOS Stream is
difficult and tedious so better to limit the amount of times you have to
do it. Carl's new EPEL 10 proposal will hopefully with this.


OK, here's an EPEL 8 demo with multiple Python versions:

https://src.fedoraproject.org/rpms/python3-rpm/pull-request/5

(I am not sure if Python 3.11 is available in the EPEL 8 buildroot already, but 
if it is not, we can probably just wait a bit instead of building this in EPEL 
8 Next first.)


Unfortunately the trick with %{global python3_pkgversion %1} inside a %define 
seemed to work on Fedora 37, but RHEL 8 did not like it (especially with 
multiline macros) an I was unable to make it work. Instead, I kept %global'ing 
%python3_pkgversion back and forth.


It is not as bad as expected actually, this version of RPM still supports 
building and installing the Python bindings via distutils, so I only needed to 
run configure once.


--
Miro Hrončok
--
Phone: +420777974800
IRC: mhroncok
___
epel-devel mailing list -- epel-devel@lists.fedoraproject.org
To unsubscribe send an email to epel-devel-le...@lists.fedoraproject.org
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/epel-devel@lists.fedoraproject.org
Do not reply to spam, report it: 
https://pagure.io/fedora-infrastructure/new_issue


[EPEL-devel] Re: python3.11-rpm to EPEL 9

2023-05-16 Thread Maxwell G
On Tue May 16, 2023 at 11:04 +0200, Miro Hrončok wrote:
> On 15. 05. 23 16:49, Maxwell G wrote:
> > On Mon May 15, 2023 at 12:14 +0200, Miro Hrončok wrote:
> >> Hello,
> >>
> >> I'm working on adding python3.11-rpm to EPEL 9 and EPEL 9 Next.
> >>
> >> See https://src.fedoraproject.org/rpms/python3-rpm/pull-request/3 and 4.
> > 
> > Cool!
> > 
> >> I decided to reuse the python3-rpm component (currently epel7 only). Let me
> >> know if I should not.
> > 
> > Are we able to build for multiple Python versions out of the same
> > specfile?
>
> It's possible, but it's not nice.
>
> In principle, this works:
>
>%build
>%define py3x_build() %{global python3_pkgversion %1}%py3_build
>%py3x_build 39
>%py3x_build 3.11
>
>%install
>%define py3x_install() %{global python3_pkgversion %1}%py3_install
>%py3x_install 39
>%py3x_install 3.11
>
> But with a project like RPM, we might need to run configure multiple times as 
> well and create separate working directories. Will need to check.

Yeah, that could work,
but I'd change %{global python3_pkgversion %1} to
%{define python3_pkgversion %1} in the py3x_* macro definitions so you
only change the definition of %python3_pkgversion within those macros'
scopes.

> > Unless there's some other way to work around this, I'd use a
> > python3.11-rpm or python3.11-rpm-epel component like we've been doing
> > for the other alt python stacks in RHEL 8.
>
> I consider the "not nice" way easier, as it will only require to keep one 
> package synced with c8s rpm, and not many. Will try to hack it up and show 
> how 
> it looks like.

I tend to agree. Syncing packages with RHEL and CentOS Stream is
difficult and tedious so better to limit the amount of times you have to
do it. Carl's new EPEL 10 proposal will hopefully with this.


--
Best,


Maxwell G (@gotmax23)
Pronouns: He/They
___
epel-devel mailing list -- epel-devel@lists.fedoraproject.org
To unsubscribe send an email to epel-devel-le...@lists.fedoraproject.org
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/epel-devel@lists.fedoraproject.org
Do not reply to spam, report it: 
https://pagure.io/fedora-infrastructure/new_issue


[EPEL-devel] Re: python3.11-rpm to EPEL 9

2023-05-16 Thread Miro Hrončok

On 15. 05. 23 16:49, Maxwell G wrote:

On Mon May 15, 2023 at 12:14 +0200, Miro Hrončok wrote:

Hello,

I'm working on adding python3.11-rpm to EPEL 9 and EPEL 9 Next.

See https://src.fedoraproject.org/rpms/python3-rpm/pull-request/3 and 4.


Cool!


I decided to reuse the python3-rpm component (currently epel7 only). Let me
know if I should not.


Are we able to build for multiple Python versions out of the same
specfile?


It's possible, but it's not nice.

In principle, this works:

  %build
  %define py3x_build() %{global python3_pkgversion %1}%py3_build
  %py3x_build 39
  %py3x_build 3.11

  %install
  %define py3x_install() %{global python3_pkgversion %1}%py3_install
  %py3x_install 39
  %py3x_install 3.11

But with a project like RPM, we might need to run configure multiple times as 
well and create separate working directories. Will need to check.



That PR has:

```
+ # We'll build python3.11-rpm only for now
+ # Once a new Python version is added,
+ # the spec will need to change to support multiple Pythons anyway
+ %global python3_pkgversion 3.11
```

but I thought we got rid of the %py3_other_* stuff that allowed building
for multiple Python versions out of the same specfile.


We did.


Unless there's some other way to work around this, I'd use a
python3.11-rpm or python3.11-rpm-epel component like we've been doing
for the other alt python stacks in RHEL 8.


I consider the "not nice" way easier, as it will only require to keep one 
package synced with c8s rpm, and not many. Will try to hack it up and show how 
it looks like.



If there is a significant demand, I can try add this (and python39-rpm) to EPEL
8 as well.


As I said on IRC, I'd like that for fedrq.


Ack.

--
Miro Hrončok
--
Phone: +420777974800
IRC: mhroncok
___
epel-devel mailing list -- epel-devel@lists.fedoraproject.org
To unsubscribe send an email to epel-devel-le...@lists.fedoraproject.org
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/epel-devel@lists.fedoraproject.org
Do not reply to spam, report it: 
https://pagure.io/fedora-infrastructure/new_issue


[EPEL-devel] Re: python3.11-rpm to EPEL 9

2023-05-15 Thread Maxwell G
On Mon May 15, 2023 at 12:14 +0200, Miro Hrončok wrote:
> Hello,
>
> I'm working on adding python3.11-rpm to EPEL 9 and EPEL 9 Next.
>
> See https://src.fedoraproject.org/rpms/python3-rpm/pull-request/3 and 4.

Cool!

> I decided to reuse the python3-rpm component (currently epel7 only). Let me 
> know if I should not.

Are we able to build for multiple Python versions out of the same
specfile?

That PR has:

```
+ # We'll build python3.11-rpm only for now
+ # Once a new Python version is added,
+ # the spec will need to change to support multiple Pythons anyway
+ %global python3_pkgversion 3.11
```

but I thought we got rid of the %py3_other_* stuff that allowed building
for multiple Python versions out of the same specfile.

Unless there's some other way to work around this, I'd use a
python3.11-rpm or python3.11-rpm-epel component like we've been doing
for the other alt python stacks in RHEL 8.


> If there is a significant demand, I can try add this (and python39-rpm) to 
> EPEL 
> 8 as well.

As I said on IRC, I'd like that for fedrq.

--
Maxwell G (@gotmax23)
Pronouns: He/They
___
epel-devel mailing list -- epel-devel@lists.fedoraproject.org
To unsubscribe send an email to epel-devel-le...@lists.fedoraproject.org
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/epel-devel@lists.fedoraproject.org
Do not reply to spam, report it: 
https://pagure.io/fedora-infrastructure/new_issue


[EPEL-devel] Re: python3.11-rpm to EPEL 9

2023-05-15 Thread Troy Dawson
On Mon, May 15, 2023 at 3:15 AM Miro Hrončok  wrote:

> Hello,
>
> I'm working on adding python3.11-rpm to EPEL 9 and EPEL 9 Next.
>
> See https://src.fedoraproject.org/rpms/python3-rpm/pull-request/3 and 4.
>
> I decided to reuse the python3-rpm component (currently epel7 only). Let
> me
> know if I should not.
>
> If there is a significant demand, I can try add this (and python39-rpm) to
> EPEL
> 8 as well.
>

That sounds great.  Thank you Miro.

I don't know of any reason you shouldn't reuse the epel7 component.

Troy
___
epel-devel mailing list -- epel-devel@lists.fedoraproject.org
To unsubscribe send an email to epel-devel-le...@lists.fedoraproject.org
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/epel-devel@lists.fedoraproject.org
Do not reply to spam, report it: 
https://pagure.io/fedora-infrastructure/new_issue