mirror of
https://github.com/ankitects/anki.git
synced 2026-04-06 07:53:51 -04:00
fixes and documentation for Linux ARM64
+ add qt6 dep to wheel install docs + remove x86_64 constraint on orjson
This commit is contained in:
@@ -12,26 +12,40 @@ _python_distros = {
|
||||
url = "https://github.com/ankitects/python-build-standalone/releases/download/anki-2021-10-15/cpython-3.9.7-x86_64-unknown-linux-gnu-install_only-20211013T1538.tar.gz",
|
||||
sha256 = "6a42fe15950f4e42000f5c68ebefacf8fce024f4d80a446789c18b174efdec1b",
|
||||
),
|
||||
"linux_arm64": struct(
|
||||
# pending https://github.com/indygreg/python-build-standalone/issues/95
|
||||
url = "https://github.com/ankitects/python-build-standalone/releases/download/anki-2021-10-15/cpython-3.9.7-aarch64-unknown-linux-gnu-install_only-20211013T1538.tar.gz",
|
||||
sha256 = "2c5812d2e29b83b428a3da1f6c1a99b0581382e65290a767f8de25cbd1269d2a",
|
||||
),
|
||||
"windows_amd64": struct(
|
||||
url = "https://github.com/indygreg/python-build-standalone/releases/download/20211012/cpython-3.9.7-x86_64-pc-windows-msvc-shared-install_only-20211011T1926.tar.gz",
|
||||
sha256 = "80370f232fd63d5cb3ff9418121acb87276228b0dafbeee3c57af143aca11f89",
|
||||
),
|
||||
}
|
||||
|
||||
def get_platform(rctx):
|
||||
def _unix_arch(rctx):
|
||||
result = rctx.execute(["arch"])
|
||||
if result.return_code:
|
||||
fail("invoking arch failed", result.stderr)
|
||||
return result.stdout.strip()
|
||||
|
||||
def _get_platform(rctx):
|
||||
if rctx.os.name == "mac os x":
|
||||
result = rctx.execute(["arch"])
|
||||
if result.return_code:
|
||||
fail("invoking arch failed", result.stderr)
|
||||
arch = result.stdout.strip()
|
||||
arch = _unix_arch(rctx)
|
||||
if arch == "i386":
|
||||
return "macos_amd64"
|
||||
elif arch == "arm64":
|
||||
return "macos_arm64"
|
||||
else:
|
||||
fail("unexpected arch:", arch)
|
||||
fail("unexpected arch", arch)
|
||||
elif rctx.os.name == "linux":
|
||||
return "linux_amd64"
|
||||
arch = _unix_arch(rctx)
|
||||
if arch == "x86_64":
|
||||
return "linux_amd64"
|
||||
elif arch == "aarch64":
|
||||
return "linux_arm64"
|
||||
else:
|
||||
fail("unexpected arch", arch)
|
||||
elif rctx.os.name.startswith("windows"):
|
||||
return "windows_amd64"
|
||||
else:
|
||||
@@ -43,7 +57,7 @@ def _impl(rctx):
|
||||
path = rctx.os.environ.get("PYO3_PYTHON")
|
||||
rctx.symlink(path, "python")
|
||||
else:
|
||||
platform = get_platform(rctx)
|
||||
platform = _get_platform(rctx)
|
||||
distro = _python_distros.get(platform)
|
||||
rctx.download_and_extract(
|
||||
url = distro.url,
|
||||
|
||||
Reference in New Issue
Block a user