Skip to content

Commit

Permalink
chore: release 0.3.7
Browse files Browse the repository at this point in the history
  • Loading branch information
oxidase committed Jul 4, 2024
1 parent 8323400 commit ed199f4
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 6 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ jobs:
run: |
set -euo pipefail
export RULES_PYTHON_RELEASE=$(curl -s https://api.github.com/repos/bazelbuild/rules_python/releases/latest | jq -c .)
export RULES_PYTHON_TAG=$(echo $RULES_PYTHON_RELEASE | jq -r '.tag_name')
export RULES_PYTHON_URL=$(echo $RULES_PYTHON_RELEASE | jq -r '.assets[].browser_download_url')
export RULES_PYTHON_SHA256=$(curl -s $RULES_PYTHON_URL | sha256sum)
git config user.name "${{ github.triggering_actor }}"
git config user.email "${{ github.triggering_actor }}@users.noreply.github.com"
Expand Down
23 changes: 21 additions & 2 deletions .github/workflows/release-notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,36 @@ Paste this snippet into your `WORKSPACE` file:
```starlark
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

toolchain_name = "python"
python_version = "3.12"

# Setup rules_python
http_archive(
name = "rules_python",
sha256 = "${RULES_PYTHON_SHA256}",
strip_prefix = "rules_python-${RULES_PYTHON_TAG}",
url = "${RULES_PYTHON_URL}",
)

load("@rules_python//python:repositories.bzl", "py_repositories", "python_register_toolchains")

py_repositories()

python_register_toolchains(toolchain_name, python_version)

# Setup rules_ophiuchus
http_archive(
name = "rules_ophiuchus",
sha256 = "${SHA256}",
strip_prefix = "${PREFIX}",
url = "https://github.com/oxidase/rules_ophiuchus/releases/download/v${TAG}/${ARCHIVE}",
)

load("@rules_ophiuchus//python:poetry_parse.bzl", "poetry_parse")
load("@rules_ophiuchus//python:repositories.bzl", install_poetry_dependencies = "install_dependencies")

install_poetry_dependencies()
install_poetry_dependencies(toolchain_name, python_version)

load("@rules_ophiuchus//python:poetry_parse.bzl", "poetry_parse")

poetry_parse(
name = "poetry",
Expand Down
5 changes: 1 addition & 4 deletions python/repositories.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,12 @@ poetry_deps_repo = repository_rule(
)

def _internal_definitions_repo_impl(rctx):
generator = "{} by {}".format(rctx.attr.generator_name, rctx.attr.generator_function)

rctx.file("BUILD", "")
rctx.file("defs.bzl", """# Generated by {generator}
rctx.file("defs.bzl", """
python_host = "{python_host}"
python_version = "{python_version}"
python_toolchain_prefix = "{python_toolchain_prefix}"
""".format(
generator = generator,
python_host = rctx.attr.python_host,
python_version = rctx.attr.python_version,
python_toolchain_prefix = rctx.attr.python_toolchain_prefix,
Expand Down

0 comments on commit ed199f4

Please sign in to comment.