Skip to content

Commit

Permalink
Rename the dependency parser script back to a regular .py suffix. (pa…
Browse files Browse the repository at this point in the history
…ntsbuild#17955)

We changed it as part of the attempts to deal with resource loading
challenges under pyoxidizer. But now that we're not pursuing that
path we can restore it.
  • Loading branch information
benjyw authored Jan 9, 2023
1 parent a597280 commit 7d9b162
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 11 deletions.
6 changes: 1 addition & 5 deletions src/python/pants/backend/python/dependency_inference/BUILD
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
# Copyright 2020 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).

python_sources(
dependencies=[
"./scripts:dependency_parser",
],
)
python_sources()

python_tests(
name="tests",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ class ParserScript:

@rule
async def parser_script() -> ParserScript:
script = read_resource(__name__, "scripts/dependency_parser_py")
script = read_resource(__name__, "scripts/dependency_parser.py")
assert script is not None
return ParserScript(
await Get(Digest, CreateDigest([FileContent("__parse_python_dependencies.py", script)]))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,11 @@

resource(
name="dependency_parser",
source="dependency_parser_py",
source="dependency_parser.py",
)

# Also expose scripts as python sources so they get formatted/linted/checked.
# Also expose script as a python source so it gets formatted/linted/checked.
python_source(
name="dependency_parser_source",
source="dependency_parser_py",
# This is run with Python 2.7 and 3.5+, so we shouldn't be running pyupgrade.
# skip_pyupgrade=True,
source="dependency_parser.py",
)

0 comments on commit 7d9b162

Please sign in to comment.