Skip to content

Commit

Permalink
Fix Python 3.13 on raspbian
Browse files Browse the repository at this point in the history
  • Loading branch information
virtuald committed Oct 16, 2024
1 parent fdd3f0d commit b18786c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
10 changes: 8 additions & 2 deletions cross-ubuntu-py/Dockerfile.py313
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,11 @@ FROM wpilib/${ARCH}-cross-ubuntu-minimal:${VERSION}-${UBUNTU} AS pycompile

ARG TARGET_HOST=invalid-target-host
ARG AC_TARGET_HOST=invalid-ac-target-host
ARG EXTRA_CROSS_CONFIGURE_ARGS=

ENV TARGET_HOST=${TARGET_HOST}
ENV AC_TARGET_HOST=${AC_TARGET_HOST}
ENV EXTRA_CROSS_CONFIGURE_ARGS=${EXTRA_CROSS_CONFIGURE_ARGS}
ENV BUILD_HOST="x86_64"
ENV WORKING_DIRECTORY="/build"
ENV INSTALL_DIRECTORY="/build/crosspy"
Expand Down Expand Up @@ -57,15 +59,19 @@ RUN set -xe; \

RUN set -xe; \
# cross-compile
cd $WORKING_DIRECTORY;cd $SOURCE_DIRECTORY; make distclean; \
cd $WORKING_DIRECTORY; \
rm -rf $SOURCE_DIRECTORY; \
tar -xf $PYTHON_ARCHIVE; \
cd $SOURCE_DIRECTORY; \
./configure --host=$TARGET_HOST --build=$BUILD_HOST --prefix=$PREFIX \
--with-build-python=$(which $PYTHON_EXE) \
--disable-ipv6 \
ac_cv_host=$AC_TARGET_HOST \
ac_cv_buggy_getaddrinfo=no \
ac_cv_file__dev_ptmx=no ac_cv_file__dev_ptc=no \
ac_cv_have_long_long_format=yes \
ac_cv_pthread_is_default=no ac_cv_pthread=yes ac_cv_cxx_thread=yes; \
ac_cv_pthread_is_default=no ac_cv_pthread=yes ac_cv_cxx_thread=yes \
${EXTRA_CROSS_CONFIGURE_ARGS}; \
make -j; \
# make install here is fine because we include --prefix in the configure statement
make install
Expand Down
1 change: 1 addition & 0 deletions cross-ubuntu-py/py.mk
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,7 @@ build/cross-raspbian-py313:
--build-arg TARGET_HOST=$(TARGET_HOST_RASPBIAN) \
--build-arg AC_TARGET_HOST=$(AC_TARGET_HOST_RASPBIAN) \
--build-arg VERSION=$(VERSION_RASPBIAN) \
--build-arg EXTRA_CROSS_CONFIGURE_ARGS="ac_cv_libatomic_needed=yes" \
-f Dockerfile.py313

.PHONY: push/cross-raspbian-py313
Expand Down

0 comments on commit b18786c

Please sign in to comment.