We had a issue where a bad pip package got created due to a network issue and we discovered it is down to how rez.package_maker.make_package makes a package.
|
variant_ = variant.install(path) |
for variant in src_variants:
variant_ = variant.install(path)
base = variant_.base
if make_base and base:
os.makedirs(base, exist_ok=True)
os.chdir(base)
make_base(variant_, base)
root = variant_.root
if make_root and root:
os.makedirs(root, exist_ok=True)
os.chdir(root)
make_root(variant_, root)
maker.installed_variants.append(variant_)
variant_ = variant.install(path)
Creates a package.py and the package is then available to resolves before any data has been written to the payload. It also does not create .building{version} tag in the repo to make it invisible to resolves till building is done.
I suggest changing this to be more in line with how a build process builds a package by calling repository.pre_variant_install(variant.resource) and only variant.install once the package has data in the payload
Also a build process uses repository.get_package_payload_path() to get the variant.base
Environment
- Rez version ("3.4.0")
- Rez python version ("3.11")
We had a issue where a bad pip package got created due to a network issue and we discovered it is down to how rez.package_maker.make_package makes a package.
rez/src/rez/package_maker.py
Line 225 in 9c1cdee
variant_ = variant.install(path)Creates a package.py and the package is then available to resolves before any data has been written to the payload. It also does not create
.building{version}tag in the repo to make it invisible to resolves till building is done.I suggest changing this to be more in line with how a build process builds a package by calling
repository.pre_variant_install(variant.resource)and onlyvariant.installonce the package has data in the payloadAlso a build process uses
repository.get_package_payload_path()to get thevariant.baseEnvironment