Skip to content

Commit

Permalink
Convert all plugin rezconfig to rezconfig.py (AcademySoftwareFoundati…
Browse files Browse the repository at this point in the history
…on#1692)

Signed-off-by: brycegbrazen <bryce.gattis@brazenanimation.com>
Signed-off-by: Jean-Christophe Morin <jean_christophe_morin@hotmail.com>
Co-authored-by: Jean-Christophe Morin <jean_christophe_morin@hotmail.com>
  • Loading branch information
Pixel-Minions and JeanChristopheMorinPerso committed Sep 26, 2024
1 parent 6c5c395 commit 007d24f
Show file tree
Hide file tree
Showing 12 changed files with 117 additions and 116 deletions.
3 changes: 1 addition & 2 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -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
1 change: 0 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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':
Expand Down
1 change: 0 additions & 1 deletion src/build_utils/license/apply_copyright
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Empty file.
2 changes: 2 additions & 0 deletions src/rezplugins/build_process/rezconfig.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# SPDX-License-Identifier: Apache-2.0
# Copyright Contributors to the Rez Project
21 changes: 0 additions & 21 deletions src/rezplugins/build_system/rezconfig

This file was deleted.

Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
Expand All @@ -39,5 +43,7 @@
# released package filename, regardless of the definition filename present
# in the source.
#
package_filenames:
- 'package'
"package_filenames": [
"package"
]
}
Original file line number Diff line number Diff line change
@@ -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.
Expand All @@ -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:
Expand All @@ -82,44 +88,45 @@
# - 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
# - command: ls
# 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": {}
}
3 changes: 0 additions & 3 deletions src/rezplugins/release_vcs/rezconfig

This file was deleted.

8 changes: 8 additions & 0 deletions src/rezplugins/release_vcs/rezconfig.py
Original file line number Diff line number Diff line change
@@ -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
}
40 changes: 0 additions & 40 deletions src/rezplugins/shell/rezconfig

This file was deleted.

45 changes: 45 additions & 0 deletions src/rezplugins/shell/rezconfig.py
Original file line number Diff line number Diff line change
@@ -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
}

0 comments on commit 007d24f

Please sign in to comment.