Skip to content

Commit

Permalink
Merge pull request #97 from davidlatwe/bleeding-no-norm-path
Browse files Browse the repository at this point in the history
Return original paths after normpath filtering
  • Loading branch information
davidlatwe committed Nov 6, 2020
2 parents cb1c71c + 1d26e92 commit 08f96e5
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 9 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
# Change Log


## 2.40.5 (2020-11-06)

**Notes**

This update enables using non-filesystem based package repository. ([\#97](https://github.com/mottosso/bleeding-rez/pull/97) )


## 2.40.4 (2020-02-13)

**Notes**
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ sending a pull request. Please follow these guidelines:
4. Follow the [Google Python Style Guide](https://google.github.io/styleguide/pyguide.html)
for docstrings
5. Use *spaces*, not *tabs*;
6. Update the [bleeding-rez version](https://github.com/mottosso/bleeding-rez/blob/master/src/bleeding-rez/utils/_version.py) appropriately, and follow [semantic versioning](https://semver.org/);
6. Update the [bleeding-rez version](https://github.com/mottosso/bleeding-rez/blob/master/src/rez/utils/_version.py) appropriately, and follow [semantic versioning](https://semver.org/);
7. Update [the changelog](https://github.com/mottosso/bleeding-rez/blob/master/CHANGELOG.md); see the section below for more details
8. Use [this format](https://help.github.com/articles/closing-issues-using-keywords/) to mention the issue(s) your PR closes
9. Add relevant tests to demonstrate that your changes work
Expand Down
17 changes: 10 additions & 7 deletions src/rez/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -560,13 +560,16 @@ def normalise_path(path):
path = os.path.normpath(path)
return path

packages_path = normalise_path(self.local_packages_path)
paths = list(map(normalise_path, self.packages_path))

if packages_path in paths:
paths.remove(packages_path)

return paths
packages_path = self.packages_path[:]
# normalise path before filtering
normalised_local = normalise_path(self.local_packages_path)
normalised_paths = list(map(normalise_path, self.packages_path))
if normalised_local in normalised_paths:
# remove it from non-normalised by index
index = normalised_paths.index(normalised_local)
packages_path.remove(packages_path[index])
# so the repository that is not filesystem based won't get normpath
return packages_path

def get_completions(self, prefix):
def _get_plugin_completions(prefix_):
Expand Down
2 changes: 1 addition & 1 deletion src/rez/utils/_version.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@


# Update this value to version up Rez. Do not place anything else in this file.
_rez_version = "2.40.4"
_rez_version = "2.40.5"


# Copyright 2013-2016 Allan Johns.
Expand Down

0 comments on commit 08f96e5

Please sign in to comment.