Skip to content

Commit

Permalink
Merge pull request #784 from googlefonts/path-transform
Browse files Browse the repository at this point in the history
Do not tranform axisreg and lang paths which reside in site-packages dir
  • Loading branch information
m4rc1e authored Nov 3, 2023
2 parents c5b9423 + 8086742 commit 1fa448b
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions Lib/gftools/push/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,8 @@ def repo_path_to_google_path(fp: Path):

def google_path_to_repo_path(fp: Path) -> Path:
"""lang/languages/.*.textproto --> lang/Lib/gflanguages/data/languages/.*.textproto"""
if "fonts" not in fp.parts:
return fp
if "lang" in fp.parts:
if "lang" in fp.parts and "site-packages" not in fp.parts:
return Path("lang/Lib/gflanguages/data/") / fp.relative_to("lang")
elif "axisregistry" in fp.parts:
elif "axisregistry" in fp.parts and "site-packages" not in fp.parts:
return fp.parent / "Lib" / "axisregistry" / "data" / fp.name
return fp

0 comments on commit 1fa448b

Please sign in to comment.