-
-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support python 3.10 and Ubuntu 22.04
Ubuntu 22.04 only ships libbcm_host.so on aarch64, *not* libbcm_host.so.0, which is what Raspberry Pi OS ships (in addition to libbcm_host.so). Work around that by forcing the LD requires to only point to libbcm_host.so for our python extension library.
- Loading branch information
Showing
8 changed files
with
51 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# -*- python -*- | ||
|
||
# Copyright 2020-2022 Josh Pieper, [email protected]. | ||
# Copyright 2020-2023 Josh Pieper, [email protected]. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
|
@@ -57,7 +57,7 @@ test_suite( | |
"cpu": arch, | ||
}, | ||
) | ||
for pyver in ['3.7', '3.9'] | ||
for pyver in ['3.7', '3.9', '3.10'] | ||
for arch in ['armeabihf', 'aarch64'] | ||
] | ||
|
||
|
@@ -74,3 +74,10 @@ config_setting( | |
"define": "PYTHON=3.9", | ||
}, | ||
) | ||
|
||
config_setting( | ||
name = "python310", | ||
values = { | ||
"define": "PYTHON=3.10", | ||
}, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# -*- python -*- | ||
|
||
# Copyright 2020-2022 Josh Pieper, [email protected]. | ||
# Copyright 2020-2023 Josh Pieper, [email protected]. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
|
@@ -22,17 +22,20 @@ load("//tools/workspace:template_file.bzl", "template_file") | |
|
||
VERSION="0.3.26" | ||
|
||
PYTHON_SHORT_VERSIONS = ['37', '39'] | ||
PYTHON_SHORT_VERSIONS = ['37', '39', '310'] | ||
ARCHITECTURES = ['armv7l', 'aarch64'] | ||
ABITAG = { | ||
'37': 'abi3', | ||
'39': 'cp39', | ||
'310': 'cp310', | ||
} | ||
PTAG = { | ||
'37_armv7l': 'linux', | ||
'37_aarch64': 'manylinux_2_17', | ||
'39_armv7l': 'manylinux_2_17', | ||
'39_aarch64': 'manylinux_2_17', | ||
'310_armv7l': 'manylinux_2_17', | ||
'310_aarch64': 'manylinux_2_17', | ||
} | ||
|
||
|
||
|
@@ -84,7 +87,7 @@ pkg_tar( | |
"tar xf $(location wheel_tar) -C $$BUILDDIR && " + | ||
"cp $(location setup_{pyshortver}.py) $(location README.md) $$BUILDDIR && " + | ||
"cd $$BUILDDIR && " + | ||
"python3.9 setup_{pyshortver}.py bdist_wheel " + | ||
"python3 setup_{pyshortver}.py bdist_wheel " + | ||
" --plat-name {ptag}_{architecture} " + | ||
" --py-limited-api cp{pyshortver} " + | ||
" --dist-dir .. " + | ||
|
@@ -114,5 +117,7 @@ filegroup( | |
"//:python37_aarch64" : [":bdist_wheel_37_aarch64"], | ||
"//:python39_armeabihf" : [":bdist_wheel_39_armv7l"], | ||
"//:python39_aarch64" : [":bdist_wheel_39_aarch64"], | ||
"//:python310_armeabihf" : [":bdist_wheel_310_armv7l"], | ||
"//:python310_aarch64" : [":bdist_wheel_310_aarch64"], | ||
}), | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# -*- python -*- | ||
|
||
# Copyright 2020-2021 Josh Pieper, [email protected]. | ||
# Copyright 2020-2023 Josh Pieper, [email protected]. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
|
@@ -29,6 +29,7 @@ cc_binary( | |
"//conditions:default" : [], | ||
"//:python37" : ["@com_github_pybind_pybind11//:pybind11_37"], | ||
"//:python39" : ["@com_github_pybind_pybind11//:pybind11_39"], | ||
"//:python310" : ["@com_github_pybind_pybind11//:pybind11_310"], | ||
}), | ||
linkshared = True, | ||
) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
#!/usr/bin/python3 | ||
|
||
# Copyright 2020-2022 Josh Pieper, [email protected]. | ||
# Copyright 2020-2023 Josh Pieper, [email protected]. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
|
@@ -54,7 +54,7 @@ def main(): | |
|
||
run(f'cp bazel-bin/fw/pi3_hat.elf {outdir}/{datestr}-pi3hat-{git_hash}.elf') | ||
|
||
for pyver in ['3.7', '3.9']: | ||
for pyver in ['3.7', '3.9', '3.10']: | ||
for arch in ['pi', 'pi64']: | ||
pyarch = { | ||
'pi' : 'armv7l', | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters