python-wheel-build / fromager

Build your own wheels
https://fromager.readthedocs.io/en/latest/
Apache License 2.0
7 stars 11 forks source link

Variant overrides for package source #302

Closed tiran closed 2 months ago

tiran commented 2 months ago

I'm maintaining a variant that requires several pre-built wheels. The wheels are not hosted on PyPI. I need a way to configure Fromager to pull the pre-built wheels from the costum package index and to use the custom package index for resolving versions. The options must not influence other variants in the settings file.

dhellmann commented 2 months ago

I feel like this has come up before. @shubhbapna probably has thoughts about how to implement it.

shubhbapna commented 2 months ago

hmm we have not messed around with the prebuilt variant settings before. We could change the prebuilt field but it would be backward incompatible

prebuilt:
    variant:
         package_index: url
         packages:
              - package1
              - package2
dhellmann commented 2 months ago

Is 1 index URL per variant enough? Maybe it could be if the process is to copy all of the pre-built wheels for a variant there?

shubhbapna commented 2 months ago

We could decide that based on @tiran's usecase? Or here are couple of other options:

This one tries all the package indices in order for all the listed packages

prebuilt:
    variant:
         package_index: 
               - url1
               - url2
         packages:
              - package1
              - package2

per package index url config:

prebuilt:
    variant:
              - name: package1
                package_index: url
              - name: package2:
                package_index: url
dhellmann commented 2 months ago

If we need multiples, I like the second form better. It gives the user control, at the expense of some repetition. So maybe we can have

prebuilt:
  variant:
    package_index: one_url
    packages:
        - package1
        - name: package2
          package_index: another_url
shubhbapna commented 2 months ago

blocked by #323