Uploaded image for project: 'AI Platform Core Components'
  1. AI Platform Core Components
  2. AIPCC-3343

[python-wheel-build/fromager] project_override breaks when a package is listed multiple times with different extras

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Undefined Undefined
    • None
    • None
    • Development Platform
    • None
    • False
    • Hide

      None

      Show
      None
    • False
    • AP Sprint 15, AP Sprint 16

      [3208956565] Upstream Reporter: Christian Heimes
      Upstream description:

      The `project_override` feature to patch `pyproject.toml` breaks when a requirement is listed multiple times.

        1. Example

      `opencv-python-headless 4.12.0.88` has `build-system.requires`

      ```yaml
      requires = [
      "numpy<2.0; python_version<'3.9'",
      "numpy==2.0.2; python_version>='3.9' and python_version<'3.13'",
      "numpy==2.1.3; python_version=='3.13'",
      "packaging",
      "pip",
      "scikit-build>=0.14.0",
      "setuptools==59.2.0; python_version<'3.12'",
      "setuptools<70.0.0; python_version>='3.12'",
      ]
      ```

      Fromager modifies this to:

      ```yaml
      requires = ["numpy==2.1.3; python_version == "3.13"", "packaging", "pip", "scikit-build>=0.14.0", "setuptools"]
      ```

      Note that the `numpy` pins for Python < 3.9 and for Python 3.9 to <3.13 have been removed.

              lbrabec@redhat.com Lukas Brabec
              upstream-sync Upstream Sync
              Antonio's Team
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: