Skip to content

Commit

Permalink
add pathlib to third-party
Browse files Browse the repository at this point in the history
Summary:
We need a good `glob()` function for the upcoming `files:` field. It turns out
that git's native globbing doesn't work very well; ** can't match the root
directory for example. Pathlib has an excellent glob, but it's only
standardized in 3.4. Add pathlib to third-party, for compatibility with 3.2 and
3.3. Now we can start using it instead of `os.path` throughout the codebase.

Test Plan: `scripts/validate_third_party.sh`

Reviewers: sean

Differential Revision: https://phabricator.buildinspace.com/D29
  • Loading branch information
oconnor663 committed Jul 22, 2014
1 parent 42596dd commit 3a293d5
Show file tree
Hide file tree
Showing 2 changed files with 1,288 additions and 0 deletions.
8 changes: 8 additions & 0 deletions peru.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
imports:
pyyaml: third-party
docopt: third-party
pathlib: third-party

# Use --force to have peru overwrite the checked in copy.
# See third-party/.
Expand All @@ -14,3 +15,10 @@ git module docopt:
rev: 940b1eb28175c0e4855a1e3b529cdf97309aa634 # 0.6.1
build: mkdir out && cp docopt.py out/
export: out

# Pathlib is standard in Python 3.4, but we include it here for 3.2 and 3.3.
hg module pathlib:
url: https://bitbucket.org/pitrou/pathlib
rev: 5740b7d56a3dffea6a606e098b316f959dfe774a # 1.0
build: mkdir out && cp pathlib.py out/
export: out
Loading

0 comments on commit 3a293d5

Please sign in to comment.