Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pip install path remap #866

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
New pip_src_remaps config
  • Loading branch information
j0yu committed Mar 22, 2020
commit 30ccc9d2ea7217374efa74d9aab9a2672f9125f1
1 change: 1 addition & 0 deletions src/rez/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,7 @@ def _parse_env_var(self, value):
"alias_styles": OptionalStrList,
"memcached_uri": OptionalStrList,
"pip_extra_args": OptionalStrList,
"pip_src_remaps": OptionalDict,
"local_packages_path": Str,
"release_packages_path": Str,
"dot_image_format": Str,
Expand Down
20 changes: 20 additions & 0 deletions src/rez/rezconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -704,6 +704,26 @@
# https://pip.pypa.io/en/stable/reference/pip_install/#options
pip_extra_args = []

# Substitutions for rez.sub when relative/unknown paths are encountered for a
# pip package distribution manifest.
pip_src_remaps = {
# In manifest: ../../bin/*
# pip installed to: ./bin/*
# rez destination: ./bin/*
r'^{pardir}{sep}{pardir}{sep}bin{sep}(.*)': [
r'bin\1', # Copy from pip installed target...
r'bin\1', # ...to destination in rez package
],

# In manifest: ../../lib/python/*
# pip installed to: ./*
# rez destination: ./python/*
r'^{pardir}{sep}{pardir}{sep}lib{sep}python{sep}(.*)': [
r'\1', # Copy from pip installed target...
r'python{sep}\1', # ...to destination in rez package
],
}


###############################################################################
# Rez-1 Compatibility
Expand Down