Skip to content

Commit

Permalink
Updated Scie with expanded Python constraints (#106)
Browse files Browse the repository at this point in the history
  • Loading branch information
sureshjoshi authored Dec 18, 2024
1 parent e7b141f commit 941f4e7
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 12 deletions.
2 changes: 1 addition & 1 deletion pants-plugins/experimental/scie/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,6 @@ python_distribution(
"Tracker": "https://github.com/sureshjoshi/pants-plugins/issues",
"Changelog": "https://github.com/sureshjoshi/pants-plugins/blob/main/pants-plugins/experimental/scie/CHANGELOG.md",
},
version="0.0.3",
version="0.0.5",
),
)
9 changes: 9 additions & 0 deletions pants-plugins/experimental/scie/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@

## [Unreleased]

## [0.0.5] - 2024-12-18

- Expanded `requires` to being greater than 3.9

## [0.0.4] - 2024-12-18

- Bumped `science` to 0.9.0
- No assertion on Python 3.12 or 3.13

## [0.0.3] - 2024-05-09

- Bumped `science` to 0.3.4
Expand Down
8 changes: 6 additions & 2 deletions pants-plugins/experimental/scie/rules.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,12 @@ async def _get_interpreter_config(targets: Targets) -> Interpreter:
InterpreterConstraintsRequest([tgt.address for tgt in targets]),
)
# TODO: Pull the interpreter_universe from somewhere else (Python Build standalone?)
minimum_version = constraints.minimum_python_version(["3.8", "3.9", "3.10", "3.11"])
assert minimum_version is not None, "No minimum python version found"
minimum_version = constraints.minimum_python_version(
["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
)
assert (
minimum_version is not None
), f"scie-plugin: No minimum python version found given py-{minimum_version}"
# Create a toml configuration from the input targets and the minimum_version
return Interpreter(version=minimum_version)

Expand Down
10 changes: 5 additions & 5 deletions pants-plugins/experimental/scie/subsystems.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ class Science(TemplatedExternalTool):
options_scope = "science"
help = softwrap("""A high level tool to build scies with.""")

default_version = "0.3.4"
default_version = "0.9.0"
default_known_versions = [
"0.3.4|linux_arm64|9d30ffffee826f52a69c056fcb7c5e9a25d48980c573066cf64dd7f987c13b66|8578528",
"0.3.4|linux_x86_64|926791a2243446711ed84b5465aa3786eed3c90d1654dd86ea82498fd5fcd4a2|9728714",
"0.3.4|macos_arm64|d1e6eefd9bc89f2edb39775435ee25ad7fd5b158431561ac6fbbbf1552f855c0|4303745",
"0.3.4|macos_x86_64|c3012fdd237a918db378bc215ec985aca0f26f42e8e4c80066032da94322897a|4502350",
"0.9.0|linux_arm64|c5fa67cf27f73c916c1422f33b11a8bf60ac0e49d477a53e2437c97a8dd23124|8626343",
"0.9.0|linux_x86_64|d2d0288d74da9ca5423c8ec8e3afe78228fe25c9eb854c5901e14882af23d5b1|9949993",
"0.9.0|macos_arm64|742d36790223b10577394f0f283afd91014fcb10cfab960de69a7e4f95100e83|4481336",
"0.9.0|macos_x86_64|b5e1c6a18a782c65591e5a1149cd15592509c79227243e34cca09bebf2cb1942|4605864",
]

default_url_template = (
Expand Down
8 changes: 4 additions & 4 deletions pants.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[GLOBAL]
pants_version = "2.21.0"
pants_version = "2.23.0"
pantsd = true
build_patterns = ["BUILD.pants", "BUILD"]
pythonpath = ["pants-plugins"]
print_stacktrace = true
plugins=["libcst==1.3.1"]
plugins=["libcst==1.4.0"]

backend_packages = [
"pants.backend.plugin_development",
Expand Down Expand Up @@ -44,15 +44,15 @@ root_patterns = [

[python]
enable_resolves = true
interpreter_constraints = ["==3.9.*"]
interpreter_constraints = [">=3.9"]
tailor_pex_binary_targets = false

[python.resolves]
pants-plugins = "build-support/lockfiles/pants-plugins.lock"
python-default = "build-support/lockfiles/python-default.lock"

[python.resolves_to_interpreter_constraints]
pants-plugins = [">=3.9,<3.10"]
pants-plugins = [">=3.9,<3.14"]

[bandit]
# Skipping assertion warnings - because this is an example project
Expand Down

0 comments on commit 941f4e7

Please sign in to comment.