diff --git a/.github/workflows/dist.yml b/.github/workflows/dist.yml index 4bc3788..b369a0a 100644 --- a/.github/workflows/dist.yml +++ b/.github/workflows/dist.yml @@ -28,4 +28,4 @@ jobs: with: user: ${{ secrets.WPI_ARTIFACTORY_USERNAME }} password: ${{ secrets.WPI_ARTIFACTORY_TOKEN }} - repository-url: https://wpilib.jfrog.io/artifactory/api/pypi/wpilib-python-release-2025-local + repository-url: https://wpilib.jfrog.io/artifactory/api/pypi/wpilib-python-release-2027-local diff --git a/Makefile b/Makefile index 2ce83ad..a8ee2de 100644 --- a/Makefile +++ b/Makefile @@ -1,11 +1,11 @@ PYVERSION = 3.13 -VERSION = 4.8.0 +VERSION = 4.10.0 DOWNLOAD_FROM = https://github.com/opencv/opencv/archive/${VERSION}.tar.gz LIBGZIP = $(abspath $(notdir ${DOWNLOAD_FROM})) SRCDIR = opencv-$(VERSION) -BUILT_TGZ = OpenCV-$(VERSION)-arm.tar.gz +BUILT_TGZ = OpenCV-$(VERSION)-aarch64.tar.gz .PHONY: all all: package @@ -29,7 +29,7 @@ package: ${BUILT_TGZ} '*/lib/lib*so.408' \ '*/share/opencv4/haarcascades/*.xml' \ '*/share/opencv4/lbpcascades/*.xml' - roborio-gen-whl data-core.py coredata -o dist --strip arm-frc2024-linux-gnueabi-strip + roborio-gen-whl data-core.py coredata -o dist --strip aarch64-bookworm-linux-gnu-strip # create dev package mkdir -p devdata/usr/local/lib @@ -44,4 +44,4 @@ package: ${BUILT_TGZ} mkdir -p data/usr/local/lib/python$(PYVERSION)/site-packages xtar -xf ${BUILT_TGZ} -C data/usr/local/lib/python$(PYVERSION)/site-packages --strip=4 \ '*/lib/python$(PYVERSION)/site-packages/cv2*.so' - roborio-gen-whl data-py.py data -o dist --strip arm-frc2024-linux-gnueabi-strip + roborio-gen-whl data-py.py data -o dist --strip aarch64-bookworm-linux-gnu-strip diff --git a/README.md b/README.md index 2b63428..bda4230 100644 --- a/README.md +++ b/README.md @@ -1,16 +1,16 @@ -OpenCV wheel builder for RoboRIO -================================ +OpenCV wheel builder for Systemcore +=================================== -Packages OpenCV in a wheel for installation on the RoboRIO. +Packages OpenCV in a wheel for installation on the Systemcore. Usage ===== -You can install this on your RoboRIO by installing the `robotpy-opencv` package +You can install this on your Systemcore by installing the `robotpy-opencv` package with `robotpy-installer` ([see the docs for details](https://robotpy.readthedocs.io/en/stable/install/robot.html)). For detailed information about how to use OpenCV, see their [website](http://opencv.org/). There's lots of documentation and tutorials/etc available. The image processing section of the Programmer's Guide at the [RobotPy documentation site](http://robotpy.readthedocs.io) -also has some details for using OpenCV on a RoboRIO. +also has some details for using OpenCV on a Systemcore. diff --git a/build.sh b/build.sh index 06cafdc..bb5223b 100755 --- a/build.sh +++ b/build.sh @@ -1,8 +1,8 @@ #!/bin/bash -e -OPENCV_VERSION=4.8.0 +OPENCV_VERSION=4.10.0 PYTHON_VERSION=$(/build/venv/bin/cross-python -c 'import sys; print("%d.%d" % sys.version_info[:2])') -COMPILER=arm-frc2024-linux-gnueabi +COMPILER=aarch64-bookworm-linux-gnu pushd `dirname $0` ROOT=`pwd` @@ -20,14 +20,14 @@ function assert_path { fi } -sed -i "s/arm-linux-gnueabi/$COMPILER/g" "$CVDIR"/platforms/linux/arm-gnueabi.toolchain.cmake +sed -i "s/aarch64-linux-gnu/$COMPILER/g" "$CVDIR"/platforms/linux/aarch64-gnu.toolchain.cmake [ -d build ] || mkdir build pushd build PYTHON3_INCLUDE_PATH=/build/crosspy/include/python${PYTHON_VERSION} PYTHON3_SITE_PACKAGES=/build/venv/cross/lib/python${PYTHON_VERSION}/site-packages/ -PYTHON3_NUMPY_INCLUDE_DIRS="$PYTHON3_SITE_PACKAGES"/numpy/_core/include +PYTHON3_NUMPY_INCLUDE_DIRS="$BUILD"/numpy/_core/include # Tried to compile with OpenBLAS support but cmake is weird.. # @@ -41,7 +41,8 @@ PYTHON3_NUMPY_INCLUDE_DIRS="$PYTHON3_SITE_PACKAGES"/numpy/_core/include # -DLAPACK_LIBRARIES=openblas \ # -DLAPACK_IMPL=OpenBLAS \ -/build/venv/bin/cross-python -m pip --disable-pip-version-check install --prefer-binary numpy +/build/venv/bin/build-python -m pip download --platform=manylinux_2_28_aarch64 --only-binary=:all: numpy==2.3.1 +unzip numpy*.whl assert_path -d "$PYTHON3_INCLUDE_PATH" #assert_path -f "$PYTHON3_LIBRARY" @@ -55,10 +56,11 @@ CMAKE_PREFIX_PATH=/build/venv/cross cmake \ -DWITH_CUDA=OFF \ -DWITH_IPP=OFF \ -DWITH_ITT=OFF \ - -DWITH_OPENCL=NO \ + -DWITH_OPENCL=OFF \ -DWITH_FFMPEG=OFF \ -DWITH_OPENEXR=OFF \ -DWITH_GSTREAMER=OFF \ + -DWITH_LAPACK=OFF \ -DWITH_GTK=OFF \ -DWITH_1394=OFF \ -DWITH_JASPER=OFF \ @@ -69,7 +71,7 @@ CMAKE_PREFIX_PATH=/build/venv/cross cmake \ -DBUILD_JPEG=ON -DBUILD_PNG=ON -DBUILD_ZLIB=ON \ \ -DOPENCV_GENERATE_PKGCONFIG=ON \ - -DENABLE_NEON=ON -DENABLE_VFPV3=ON -DSOFTFP=ON \ + -DENABLE_CXX11=ON \ \ -DBUILD_opencv_apps=OFF \ -DBUILD_DOCS=OFF -DBUILD_EXAMPLES=OFF -DBUILD_TESTS=OFF -DBUILD_PERF_TESTS=OFF \ @@ -91,5 +93,5 @@ fi make $MAKEARGS cpack -G TGZ -mv OpenCV-${OPENCV_VERSION}-arm.tar.gz ${ROOT}/OpenCV-${OPENCV_VERSION}-arm.tar.gz +mv OpenCV-${OPENCV_VERSION}-aarch64.tar.gz ${ROOT}/OpenCV-${OPENCV_VERSION}-aarch64.tar.gz popd \ No newline at end of file diff --git a/data-core.py b/data-core.py index a216853..edf2cad 100644 --- a/data-core.py +++ b/data-core.py @@ -1,5 +1,5 @@ name = "robotpy-opencv-core" -version = "4.8.0+r2" +version = "4.10.0" url = "https://opencv.org" license = "Apache 2" install_requires = ["numpy"] diff --git a/data-py.py b/data-py.py index f61dbdb..ef73d3c 100644 --- a/data-py.py +++ b/data-py.py @@ -1,5 +1,5 @@ name = "robotpy-opencv" -version = "4.8.0+r2" +version = "4.10.0" url = "https://opencv.org" license = "Apache 2" install_requires = ["numpy", f"robotpy-opencv-core=={version}"] diff --git a/toolchain.cmake b/toolchain.cmake index a64bf78..a9cd4e0 100644 --- a/toolchain.cmake +++ b/toolchain.cmake @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.1) -set(ARM_PREFIX arm-frc2024-linux-gnueabi) +set(ARM_PREFIX aarch64-bookworm-linux-gnu) set(CMAKE_SYSTEM_NAME Linux) set(CMAKE_SYSTEM_PROCESSOR arm) @@ -13,4 +13,4 @@ set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY) -include("${CMAKE_CURRENT_LIST_DIR}/opencv-4.8.0/platforms/linux/arm-gnueabi.toolchain.cmake") +include("${CMAKE_CURRENT_LIST_DIR}/opencv-4.10.0/platforms/linux/aarch64-gnu.toolchain.cmake")