Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
python/features.bzl export-subst
tools/publish/*.txt linguist-generated=true
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ A brief description of the categories of changes:
`requirements_linux.txt`, `requirements_windows.txt` for each respective OS
and one extra file `requirements_universal.txt` if you prefer a single file.
The `requirements.txt` file may be removed in the future.
* The rules_python version is now reported in `//python/features.bzl#features.version`

{#v0-0-0-removed}
### Removed
Expand Down
5 changes: 5 additions & 0 deletions python/features.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@
# limitations under the License.
"""Allows detecting of rules_python features that aren't easily detected."""

# This is a magic string expanded by `git archive`, as set by `.gitattributes`
# See https://git-scm.com/docs/git-archive/2.29.0#Documentation/git-archive.txt-export-subst
_VERSION_PRIVATE = "$Format:%(describe:tags=true)$"

features = struct(
version = _VERSION_PRIVATE if "$Format" not in _VERSION_PRIVATE else "",
precompile = True,
)