Skip to content

Commit

Permalink
die bez die
Browse files Browse the repository at this point in the history
  • Loading branch information
ajohns committed Nov 30, 2020
1 parent 603766e commit 8c3741a
Show file tree
Hide file tree
Showing 9 changed files with 11 additions and 139 deletions.
File renamed without changes.
10 changes: 5 additions & 5 deletions example_packages/hello_world/README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
Welcome to building your first rez package!

This package gets built using 'bez', a very simple python-based build system that
comes with rez. It reads the *rezbuild.py* file, and executes the *build* function
within, passing in build info such as *source_path* and *install_path*.
This package uses a simple python-based build script, and explicitly specifies
the build command using the `build_command` attribute in package.py.

Rez has extensible support for other build systems, and comes with CMake support
included. A *CMakeLists.txt.example* file is provided; to use cmake instead,
just ensure that the cmake binary is visible; rename *CMakeLists.txt.example* to
*CMakeLists.txt*; and delete or rename *rezbuild.py*. Rez determines which build
system to use based on the build file found in the package source root.
*CMakeLists.txt*; and remove the `build_command` attribute from package.py. Rez
then determines which build system to use based on the build file found in the
package source root.

When you run *rez-build -i*, rez uses your package's definition file (package.py)
to create the correct build environment, and then runs the appropriate build
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
"""
To use this as the build script, add to package.py:

build_command = 'python {root}/build.py {install}'

"""
#!/usr/bin/env python

import os
import os.path
import shutil
import sys
import stat


Expand Down Expand Up @@ -54,7 +50,6 @@ def _install():


if __name__ == '__main__':
import os, sys
build(
source_path=os.environ['REZ_BUILD_SOURCE_PATH'],
build_path=os.environ['REZ_BUILD_PATH'],
Expand Down
2 changes: 2 additions & 0 deletions example_packages/hello_world/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@

uuid = "examples.hello_world_py"

build_command = 'python {root}/build.py {install}'

def commands():
env.PYTHONPATH.append("{root}/python")
env.PATH.append("{root}/bin")
109 changes: 0 additions & 109 deletions src/rez/cli/_bez.py

This file was deleted.

9 changes: 0 additions & 9 deletions src/rez/cli/_entry_points.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,15 +73,6 @@ def run_rezolve():
return run()


@scriptname("bez")
def run_bez():
# TODO: Deprecate. Use custom build commands instead.
# https://github.com/nerdvegas/rez/wiki/Building-Packages#custom-build-commands
check_production_install()
from rez.cli._bez import run
run()


@scriptname("_rez-complete")
def run_rez_complete():
check_production_install()
Expand Down
4 changes: 1 addition & 3 deletions src/rez/plugin_managers.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,16 +213,14 @@ class RezPluginManager(object):
rez, and the modules below that are individual custom plugins extending
that type.
For example, rez provides three plugins of type 'build_system': 'cmake',
'make' and 'bez'::
For example, rez provides plugins of type 'build_system': 'cmake' and 'make'::
rezplugins/
__init__.py
build_system/
__init__.py
cmake.py
make.py
bez.py
...
Here is an example of how to provide your own plugin. In the example,
Expand Down
3 changes: 1 addition & 2 deletions src/rezplugins/build_system/custom.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,7 @@ def build(self, context, variant, build_path, install_path, install=False,
ret = {}

if self.write_build_scripts:
# write out the script that places the user in a build env, where
# they can run bez directly themselves.
# write out the script that places the user in a build env
build_env_script = os.path.join(build_path, "build-env")
create_forwarding_script(build_env_script,
module=("build_system", "custom"),
Expand Down
4 changes: 0 additions & 4 deletions wiki/pages/Notes.md

This file was deleted.

0 comments on commit 8c3741a

Please sign in to comment.