diff --git a/third_party/python/BUILD b/third_party/python/BUILD index e5c8b1c..895845d 100644 --- a/third_party/python/BUILD +++ b/third_party/python/BUILD @@ -417,9 +417,24 @@ pip_library( python_wheel( name = "debugpy", - hashes = ["f058c204341fd7ff800ee0edafc106ca0fb1c9857e8a8895a6e04cca3ddcb7bf"], + hashes = [ + "c1178ae571aff42e61801a38b007af504ec8e05fde1c5c12e5a7efef21009642", # linux_amd64, Python 3.10 + "7de0b7dfeedc504421032afba845ae2a7bcc32ddfb07dae2c3ca5442f821c344", # linux_amd64, Python 3.11 + "88f47850a4284b88bd2bfee1f26132147d5d504e4e86c22485dfa44b97e19b4b", # linux_amd64, Python 3.12 + "84562982dd7cf5ebebfdea667ca20a064e096099997b175fe204e86817f64eaf", # linux_amd64, Python 3.13 + "077a7447589ee9bc1ff0cdf443566d0ecf540ac8aa7333b775ebcb8ce9f4ecad", # linux_amd64, Python 3.14 + "157e96ffb7f80b3ad36d808646198c90acb46fdcfd8bb1999838f0b6f2b59c64", # darwin_amd64, Python 3.10 + "eada6042ad88fa1571b74bd5402ee8b86eded7a8f7b827849761700aff171f1b", # darwin_amd64/darwin_arm64, Python 3.11 + "4ae3135e2089905a916909ef31922b2d733d756f66d87345b3e5e52b7a55f13d", # darwin_amd64/darwin_arm64, Python 3.12 + "5dff4bb27027821fdfcc9e8f87309a28988231165147c31730128b1c983e282a", # darwin_amd64/darwin_arm64, Python 3.13 + "9c74df62fc064cd5e5eaca1353a3ef5a5d50da5eb8058fcef63106f7bebe6173", # darwin_amd64/darwin_arm64, Python 3.14 + "5be9bed9ae3be00665a06acaa48f8329d2b9632f15fd09f6a9a8c8d9907e54d7", # any + ], licences = ["MIT"], - version = "1.5.0", + version = "1.8.20", + zip_safe = False, + # There doesn't seem to be a predictable URL for this version of debugpy so we need to resolve it instead. + tool = "//tools:wheel_resolver", ) python_wheel( diff --git a/tools/BUILD b/tools/BUILD index db64b73..5763c65 100644 --- a/tools/BUILD +++ b/tools/BUILD @@ -13,3 +13,20 @@ remote_file( binary = True, visibility = ["PUBLIC"], ) + +_WHEEL_RESOLVER_VERSION = "2.0.0" + +remote_file( + name = "wheel_resolver", + url = + f"https://github.com/please-build/python-rules/releases/download/wheel_resolver-v{_WHEEL_RESOLVER_VERSION}/wheel_resolver-{_WHEEL_RESOLVER_VERSION}-{CONFIG.OS}_{CONFIG.ARCH}", + hashes = [ + "b48315ec1c6670faf7feb2a532a4d0cb104a03113525ef1799062d7576f66b36", # darwin_amd64 + "70db6d2eb18ab915f555824a8f29fe0909bcf87db0b583a5d6ad3156a54a034a", # darwin_arm64 + "d47802282b4acf1669a1d69531c69eb2dd3f0f069fd8e59d0c9aff946f7aff44", # freebsd_amd64 + "6aa0304bde5ab5f68d3415fd8761f6684f5c88835791b0dbd12f909120d797c6", # linux_amd64 + "09e340203aa88d4e9de7f61b044d1f29fb688abf3c8b7547f80ad6ca3e441495", # linux_arm64 + ], + binary = True, + visibility = ["PUBLIC"], +) diff --git a/tools/please_pex/BUILD b/tools/please_pex/BUILD index 1483108..02c3642 100644 --- a/tools/please_pex/BUILD +++ b/tools/please_pex/BUILD @@ -44,6 +44,7 @@ genrule( visibility = ["PUBLIC"], deps = [ "//third_party/python:behave_bootstrap", + "//third_party/python:debugpy", "//third_party/python:pytest_bootstrap", "//third_party/python:unittest_bootstrap", ], diff --git a/tools/please_pex/pex/pex_main.py b/tools/please_pex/pex/pex_main.py index 374d5c3..76a8fc2 100644 --- a/tools/please_pex/pex/pex_main.py +++ b/tools/please_pex/pex/pex_main.py @@ -92,6 +92,7 @@ def _explode_zip(): # that the cache has already been prepared. lockfile.write("pex unzip completed") sys.path = [PEX_PATH] + [x for x in sys.path if x != PEX] + sys.path.insert(1, os.path.join(sys.path[0], '.bootstrap')) try: yield finally: