AcademySoftwareFoundation / rez

An integrated package configuration, build and deployment system for software
https://rez.readthedocs.io
Apache License 2.0
942 stars 335 forks source link

I can't get the Platform As Variant to work #1693

Closed efleurant closed 6 months ago

efleurant commented 6 months ago

Like the title says, I can't get the Platform As Variant to work. The information below should be enough to understand the issue, but please ask for more info if needed. Thanks in advance.

Environment

To Reproduce

  1. Create a package with the following variant specs:
    variants = [
    ["platform-linux", "arch-x86_64", "os-rocky-9.1"],
    ]
  2. rez env <PLATFORM_VARIANT_PACKAGE_NAME>

Expected behavior Should solve the environment taking the platform variant(s) into consideration.

Actual behavior The rez environment doesn't solve and throws the following error:

requested packages:
my_variant_test_package               
~platform==linux  (implicit)
~arch==x86_64     (implicit)
~os==rocky-9.1    (implicit)

The context failed to resolve:
The following package conflicts occurred: (os-rocky-9.1 <--!--> ~os==rocky-9.1)

extra info: My directory containing the variant alongside my package.py is named rocky-9.1

efleurant commented 6 months ago

I realized after the fact that my environment was throwing an error because we didn't have a rocky-9.1 os variant in our release package path... took me sometime to figure it out, as the process for generating such packages is only outlined in the Getting Started section of the documentation; I think there should be a reminder under the platform as a variant section.

I basically fixed my issue by running rez-bind -i . os in a tmp dir and then deployed the newly generated rocky-9.1 directory to our release package path.

Closing