Bug 2049649 - [RFE:EPEL9] branch python-poetry for EPEL9
Summary: [RFE:EPEL9] branch python-poetry for EPEL9
Keywords:
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: poetry
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Nobody
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-02-02 14:01 UTC by Steve Traylen
Modified: 2024-05-13 03:21 UTC (History)
6 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Steve Traylen 2022-02-02 14:01:49 UTC
Please could poetry be branched for EPEL9.

It is missing some dependencies:

No matching package to install: 'python3dist(httpretty)'
No matching package to install: 'python3dist(pytest-mock)'
No matching package to install: 'python3dist(virtualenv)'

Have read the comments in https://bugzilla.redhat.com/show_bug.cgi?id=1898395
but EPEL9 should be be in much better shape and this will be useful adding
new stuff now.

Comment 1 Steve Traylen 2022-02-02 15:07:51 UTC
What is good however is that you can still use the %pyproject macros
as fall back to setuptools if you delete pyproject.toml file containing poetry.

Maybe this is not needed.

Comment 2 Miro Hrončok 2022-02-02 19:34:50 UTC
I am not interested in maintaining poetry in EPEL 9, it is a responsibility for a decade where we would need to backport relevant bug fixes and cannot change the API.

However, leaving this decision up to the primary maintainer.

Comment 3 Miro Hrončok 2022-02-02 19:35:49 UTC
> No matching package to install: 'python3dist(virtualenv)'

This is unexpected. I've added virtualenv to EPEL 9 long time ago. Do you have a link to the scratch build?

Comment 4 Petr Viktorin (pviktori) 2022-02-03 08:34:45 UTC
> What is good however is that you can still use the %pyproject macros
> as fall back to setuptools if you delete pyproject.toml file containing poetry.

Whether this works depends on the particular poetry-using project, AFAIK.
It might not be reliable for the whole EPEL9 lifetime.

Comment 5 Tomáš Hrnčiar 2022-02-03 10:23:00 UTC
I am also not interested in maintaining poetry in EPEL.

Comment 6 Steve Traylen 2022-02-07 07:33:25 UTC
(In reply to Miro Hrončok from comment #3)
> > No matching package to install: 'python3dist(virtualenv)'
> 
> This is unexpected. I've added virtualenv to EPEL 9 long time ago. Do you
> have a link to the scratch build?

My mistake.

fedpkg --release epel9 mockbuild

does enable epel repos while 

mock -r centos-stream-9-x86_64 --rebuild poetry-1.1.12-2.fc36.src.rpm

does not.

rpm -q mock && rpm -V mock
mock-2.15-1.fc35.noarch

So result is:

No matching package to install: 'python3dist(httpretty)'

Comment 7 Dominik 'Rathann' Mierzejewski 2023-01-09 21:16:38 UTC
python-filecheck build-depends on poetry and doesn't have a setup.py to fall back on.

Comment 8 Miro Hrončok 2023-01-09 21:34:00 UTC
(In reply to Dominik 'Rathann' Mierzejewski from comment #7)
> python-filecheck build-depends on poetry and doesn't have a setup.py to fall
> back on.

It could probably work with poetry-core: https://github.com/mull-project/FileCheck.py/pull/191

Comment 9 Miro Hrončok 2023-01-09 21:38:10 UTC
(In reply to Miro Hrončok from comment #8)
> (In reply to Dominik 'Rathann' Mierzejewski from comment #7)
> > python-filecheck build-depends on poetry and doesn't have a setup.py to fall
> > back on.
> 
> It could probably work with poetry-core:
> https://github.com/mull-project/FileCheck.py/pull/191

Yes, it works fine witch that patch and:

-BuildRequires: python3-poetry
+BuildRequires: python3-poetry-core

Comment 10 Dominik 'Rathann' Mierzejewski 2023-02-02 10:49:49 UTC
(In reply to Miro Hrončok from comment #9)
> (In reply to Miro Hrončok from comment #8)
> > (In reply to Dominik 'Rathann' Mierzejewski from comment #7)
> > > python-filecheck build-depends on poetry and doesn't have a setup.py to fall
> > > back on.
> > 
> > It could probably work with poetry-core:
> > https://github.com/mull-project/FileCheck.py/pull/191
> 
> Yes, it works fine witch that patch and:
> 
> -BuildRequires: python3-poetry
> +BuildRequires: python3-poetry-core

Thanks, I'll try bumping to 0.0.23 and using -core.

Comment 11 Jonathan Wright 2023-02-19 16:27:28 UTC
I'm happy to maintain this in EPEL and work on the necessary deps.

I need this to get noggin packaged for EPEL9 because it will not build with poetry-core.

Comment 12 Miro Hrončok 2023-02-19 17:42:34 UTC
> I'm happy to maintain this in EPEL and work on the necessary deps.

Once the deps are ready, feel free to ask for the branch ACLs.

> I need this to get noggin packaged for EPEL9 because it will not build with poetry-core.

I am curious. Why won't it?

Comment 13 Jonathan Wright 2023-03-02 14:20:20 UTC
(In reply to Miro Hrončok from comment #12)
> > I need this to get noggin packaged for EPEL9 because it will not build with poetry-core.
> 
> I am curious. Why won't it?


Handling poetry-core>=1.0.0 from build-system.requires
Requirement satisfied: poetry-core>=1.0.0
   (installed: poetry-core 1.0.7)
Traceback (most recent call last):
  File "/usr/lib/rpm/redhat/pyproject_buildrequires.py", line 501, in main
    generate_requires(
  File "/usr/lib/rpm/redhat/pyproject_buildrequires.py", line 414, in generate_requires
    backend = get_backend(requirements)
  File "/usr/lib/rpm/redhat/pyproject_buildrequires.py", line 253, in get_backend
    backend_module = importlib.import_module(module_name)
  File "/usr/lib64/python3.9/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 972, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 984, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'poetry.masonry'

Comment 14 Jonathan Wright 2023-03-02 14:28:27 UTC
After re-reading the error and digging a bit more into poetry I worked around that, obviously.

This BZ isn't as important to me now but I'm still going to try to tackle the deps.

Comment 15 Miro Hrončok 2023-03-02 15:00:02 UTC
(In reply to Jonathan Wright from comment #14)
> After re-reading the error and digging a bit more into poetry I worked
> around that, obviously.

I suppose by changing pyproject.toml from:

[build-system]
requires = ["poetry>=1.0.0"]
build-backend = "poetry.masonry.api"

To:

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"



Could you please contribute that upstream if it indeed makes the package work?

Comment 16 Jonathan Wright 2023-03-02 18:24:21 UTC
Submitted upstream to noggin and noggin-messages.

Comment 17 Miro Hrončok 2023-03-02 18:41:20 UTC
Thank you.

Comment 18 Ulroch Molmohr 2024-05-13 03:21:39 UTC
I believe that by modifying pyproject.toml from: https://scratchgames.co

I think it might work well with poetry-core:https://github.com/mull-project/FileCheck.py/pull/191


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