diff --git a/MANIFEST.in b/MANIFEST.in index c646b6968..26b821f83 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,8 +1,7 @@ include src/rez/data/* -include src/rez/rezconfig include src/rez/completion/* include src/rez/vendor/distlib/*.exe include src/rezgui/rezguiconfig include src/rezgui/icons/* recursive-include src/rez README* -recursive-include src/rezplugins *.cmake Doxyfile rezconfig +recursive-include src/rezplugins *.cmake Doxyfile diff --git a/setup.py b/setup.py index 34b9b396d..ad11b1edb 100644 --- a/setup.py +++ b/setup.py @@ -76,7 +76,6 @@ def find_files(pattern, path=None, root="rez"): find_files('*', 'data') + find_files('*.exe', 'vendor/distlib'), 'rezplugins': - find_files('rezconfig', root='rezplugins') + find_files('*.cmake', 'build_system', root='rezplugins') + find_files('*', 'build_system/template_files', root='rezplugins'), 'rezgui': diff --git a/src/build_utils/license/apply_copyright b/src/build_utils/license/apply_copyright index 880cfa583..daa048eb9 100755 --- a/src/build_utils/license/apply_copyright +++ b/src/build_utils/license/apply_copyright @@ -7,7 +7,6 @@ fi # remove copyright find ./src/rez/data -name '*.py' > .lic.tmp -find ./src/rez/backport -name '*.py' >> .lic.tmp cat .lic.tmp | xargs -i ./src/build_utils/license/change_copyright -so {} # add copyright diff --git a/src/rezplugins/build_process/rezconfig b/src/rezplugins/build_process/rezconfig deleted file mode 100644 index e69de29bb..000000000 diff --git a/src/rezplugins/build_process/rezconfig.py b/src/rezplugins/build_process/rezconfig.py new file mode 100644 index 000000000..ac31011e1 --- /dev/null +++ b/src/rezplugins/build_process/rezconfig.py @@ -0,0 +1,2 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright Contributors to the Rez Project diff --git a/src/rezplugins/build_system/rezconfig b/src/rezplugins/build_system/rezconfig deleted file mode 100644 index 18ddea371..000000000 --- a/src/rezplugins/build_system/rezconfig +++ /dev/null @@ -1,21 +0,0 @@ -# TODO remove this file in PR for https://github.com/AcademySoftwareFoundation/rez/issues/525, -# it is unused - -cmake: - # The name of the CMake build system to use, valid options are - # eclipse, make, xcode and codeblocks. - build_system: make - - # The name of the CMake build target to use, valid options are Debug, - # Release and RelWithDebInfo. - build_target: Release - - # A list of default arguments to be passed to the cmake binary. - cmake_args: - - '-DCMAKE_SKIP_RPATH=1' - - # Optionally specify an explicit cmake executable to use for building. - cmake_binary: - - # If True, install pyc files when the 'rez_install_python' macro is used. - install_pyc: true diff --git a/src/rezplugins/package_repository/rezconfig b/src/rezplugins/package_repository/rezconfig.py similarity index 87% rename from src/rezplugins/package_repository/rezconfig rename to src/rezplugins/package_repository/rezconfig.py index 811b8215d..85eba726c 100644 --- a/src/rezplugins/package_repository/rezconfig +++ b/src/rezplugins/package_repository/rezconfig.py @@ -1,15 +1,19 @@ -filesystem: +# SPDX-License-Identifier: Apache-2.0 +# Copyright Contributors to the Rez Project + + +filesystem = { # The mechanism used to create the lockfile. If set to 'default', this will # use hardlinks if the 'os.link' method is present, otherwise mkdir is used. # It can also be explicitly set to use only 'hardlink', or only 'mkdir'. # Valid options are 'default', 'mkdir', or 'hardlink' - file_lock_type: default + "file_lock_type": "default", # The timeout to use when creating file locks. This is done when a variant is # installed into an existing package, to prevent multiple file writes at # once (which could result in a variant install getting lost). The timeout # value is in seconds. A value of zero indicates no timeout. - file_lock_timeout: 10 + "file_lock_timeout": 10, # The relative directory, under the repository location, where file locks # are created. You might need to use this option when file permissions are @@ -21,13 +25,13 @@ # # Note: The directory can have any name, but we suggest '.lock' as the # standard convention. - file_lock_dir: + "file_lock_dir": None, # If True, verify that a potential package directory contains a package.py / # package.yaml file before treating it as a package. There *shouldn't* be # non-packages in these directories, and the solver is faster if this value # is False, because a lot of file stats are avoided. - check_package_definition_files: false + "check_package_definition_files": False, # A list of filenames that are expected to contain Rez definitions. # The list will be checked in top to bottom order, and the first filename @@ -39,5 +43,7 @@ # released package filename, regardless of the definition filename present # in the source. # - package_filenames: - - 'package' + "package_filenames": [ + "package" + ] +} diff --git a/src/rezplugins/release_hook/rezconfig b/src/rezplugins/release_hook/rezconfig.py similarity index 69% rename from src/rezplugins/release_hook/rezconfig rename to src/rezplugins/release_hook/rezconfig.py index 1dd9ce24d..acec27c73 100644 --- a/src/rezplugins/release_hook/rezconfig +++ b/src/rezplugins/release_hook/rezconfig.py @@ -1,18 +1,25 @@ -emailer: +# SPDX-License-Identifier: Apache-2.0 +# Copyright Contributors to the Rez Project + + +emailer = { # SMTP host. - smtp_host: '' + "smtp_host": '', # SMTP port. - smtp_port: 25 + "smtp_port": 25, # The address that post-release emails appear to come from. - sender: '{system.user}@rez-release.com' + "sender": '{system.user}@rez-release.com', # List of recipients of post-release emails; OR, path to recipients config # file (see emailer-recipients-example.yaml). If this is a string that # contains '@' and doesn't refer to a filepath, then it's treated as an # email address. - recipients: [] + "recipients": [], + + # Subject format - supports the same object formatting available in 'body' + "subject": '[rez] [release] {system.user} released {package.qualified_name}', # Message format. Available objects for formatting are: # - package: The package that is being released. @@ -25,43 +32,42 @@ # - variants: Namespace for info about the variants that were released: # - count: The number of variants that were released; # - paths: Newline-separated paths to the root of each variant. - body: | - Package '{package.qualified_name}' was released by {system.user}@{system.fqdn}. - - USER: {system.user} - PACKAGE: {package.qualified_name} - RELEASED TO: {release.path} - PREVIOUS VERSION: {release.previous_version} - REZ VERSION: {system.rez_version} + "body": """ +Package '{package.qualified_name}' was released by {system.user}@{system.fqdn}. - {variants.count} VARIANTS: - {variants.paths} +USER: {system.user} +PACKAGE: {package.qualified_name} +RELEASED TO: {release.path} +PREVIOUS VERSION: {release.previous_version} +REZ VERSION: {system.rez_version} - MESSAGE: - {release.message} +{variants.count} VARIANTS: +{variants.paths} - CHANGELOG: - {release.changelog} +MESSAGE: +{release.message} - # Subject format - supports the same object formatting available in 'body' - subject: '[rez] [release] {system.user} released {package.qualified_name}' +CHANGELOG: +{release.changelog} +""".strip() +} -command: +command = { # If true, print the commands that are being run - print_commands: true + "print_commands": True, # If true, print output of commands. - print_output: true + "print_output": True, # If true, print failed commands to stderr - print_error: true + "print_error": True, # If true, cancel the package release if a pre-* command fails. - cancel_on_error: true + "cancel_on_error": True, # If true, skip all commands after a failed command. This does not cancel # the package release. - stop_on_error: true + "stop_on_error": True, # List of commands to execute prior to build, in given order. # Each item is a dict containing: @@ -82,8 +88,7 @@ # - release: Namespace for info about the current release, contains: # - path: Installation path of release. # - # Also, any environment variables references in command arguments are - # expanded also. + # Any environment variables references in command arguments are expanded. # # Example: # pre_build_commands @@ -91,35 +96,37 @@ # args: '-a -l' # user: root # - pre_build_commands: [] + "pre_build_commands": [], # Same expected values as pre_build_commands - pre_release_commands: [] + "pre_release_commands": [], # Same expected values as pre_build_commands - post_release_commands: [] + "post_release_commands": [] +} -amqp: +amqp = { # host server, or '{host}:{port}' - host: '' + "host": '', # userid - userid: '' + "userid": '', # password - password: '' + "password": '', # connection timeout - connect_timeout: 10 + "connect_timeout": 10, # exchange name - exchange_name: '' + "exchange_name": '', # exchange routing key - exchange_routing_key: 'REZ.PACKAGE.RELEASED' + "exchange_routing_key": 'REZ.PACKAGE.RELEASED', # message delivery mode - message_delivery_mode: 1 + "message_delivery_mode": 1, # extra message attributes to be published - message_attributes: {} + "message_attributes": {} +} diff --git a/src/rezplugins/release_vcs/rezconfig b/src/rezplugins/release_vcs/rezconfig deleted file mode 100644 index a0a963d90..000000000 --- a/src/rezplugins/release_vcs/rezconfig +++ /dev/null @@ -1,3 +0,0 @@ -git: - # If false, cancel a package release if there is no upstream branch. - allow_no_upstream: false diff --git a/src/rezplugins/release_vcs/rezconfig.py b/src/rezplugins/release_vcs/rezconfig.py new file mode 100644 index 000000000..411fe38a8 --- /dev/null +++ b/src/rezplugins/release_vcs/rezconfig.py @@ -0,0 +1,8 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright Contributors to the Rez Project + + +git = { + # If false, cancel a package release if there is no upstream branch. + "allow_no_upstream": False +} diff --git a/src/rezplugins/shell/rezconfig b/src/rezplugins/shell/rezconfig deleted file mode 100644 index 392a8b655..000000000 --- a/src/rezplugins/shell/rezconfig +++ /dev/null @@ -1,40 +0,0 @@ -sh: - prompt: '>' - executable_fullpath: null - -bash: - prompt: '>' - executable_fullpath: null - -csh: - prompt: '>' - executable_fullpath: null - -tcsh: - prompt: '>' - executable_fullpath: null - -zsh: - prompt: '%' - executable_fullpath: null - -cmd: - prompt: '$G' - additional_pathext: ['.PY'] - executable_fullpath: null - -powershell: - prompt: '> $ ' - additional_pathext: ['.PY'] - executable_fullpath: null - execution_policy: null - -pwsh: - prompt: '> $ ' - additional_pathext: ['.PY'] - executable_fullpath: null - execution_policy: null - -gitbash: - prompt: '>' - executable_fullpath: null diff --git a/src/rezplugins/shell/rezconfig.py b/src/rezplugins/shell/rezconfig.py new file mode 100644 index 000000000..549cc6605 --- /dev/null +++ b/src/rezplugins/shell/rezconfig.py @@ -0,0 +1,45 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright Contributors to the Rez Project + + +sh = { + "prompt": '>', + "executable_fullpath": None +} +bash = { + "prompt": '>', + "executable_fullpath": None +} +csh = { + "prompt": '>', + "executable_fullpath": None +} +tcsh = { + "prompt": '>', + "executable_fullpath": None +} +zsh = { + "prompt": '%', + "executable_fullpath": None +} +cmd = { + "prompt": '$G', + "additional_pathext": [".PY"], + "executable_fullpath": None +} +powershell = { + "prompt": '> $ ', + "additional_pathext": [".PY"], + "executable_fullpath": None, + "execution_policy": None +} +pwsh = { + "prompt": '> $ ', + "additional_pathext": [".PY"], + "executable_fullpath": None, + "execution_policy": None +} +gitbash = { + "prompt": '>', + "executable_fullpath": None +}