rez-packages icon indicating copy to clipboard operation
rez-packages copied to clipboard

Change build_requires to private_build_requires when appropriate

Open BigRoy opened this issue 6 years ago • 0 comments

Issue

Currently in all the packages we've defined build_requires for the build requirements, however in most scenarios this isn't actually correct as only the building of that package X itself requires those and not necessarily any packages that depend on X requires those too for building, as such those would be private_build_requires for X.

See: https://github.com/nerdvegas/rez/wiki/Building-Packages#build-time-dependencies

As example:

  • If package X requires cmake to run the build script then any dependent package does not need cmake, e.g. package Y might just build using make or sconstruct
  • If package X requires visualstudio to build but another does not then this could be private_build_requires.
  • Only whenever the dependent packages is required to build against it, e.g. when project Y headers link to project X headers then to build project Z that links Y it requires the headers of X too.
Z <---- Y <---- X
   links   links

BigRoy avatar Nov 26 '19 20:11 BigRoy