Skip to content

Commit

Permalink
Add libmpdec-dev to CI deps, remove CI hack, and enforce mpdecimal ve…
Browse files Browse the repository at this point in the history
…rsion check in configure
  • Loading branch information
erlend-aasland committed May 6, 2024
1 parent e3f3e17 commit c84f2b7
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 67 deletions.
11 changes: 4 additions & 7 deletions .github/workflows/build.yml
Expand Up @@ -232,8 +232,7 @@ jobs:
../cpython-ro-srcdir/configure \
--config-cache \
--with-pydebug \
--with-openssl=$OPENSSL_DIR \
--with-system-libmpdec=no
--with-openssl=$OPENSSL_DIR
build_ubuntu_free_threading:
name: 'Ubuntu (free-threading)'
Expand All @@ -247,8 +246,7 @@ jobs:
--config-cache \
--with-pydebug \
--with-openssl=$OPENSSL_DIR \
--disable-gil \
--with-system-libmpdec=no
--disable-gil
build_ubuntu_ssltests:
name: 'Ubuntu SSL tests with OpenSSL'
Expand Down Expand Up @@ -373,8 +371,7 @@ jobs:
../cpython-ro-srcdir/configure \
--config-cache \
--with-pydebug \
--with-openssl=$OPENSSL_DIR \
--with-system-libmpdec=no
--with-openssl=$OPENSSL_DIR
- name: Build CPython out-of-tree
working-directory: ${{ env.CPYTHON_BUILDDIR }}
run: make -j4
Expand Down Expand Up @@ -480,7 +477,7 @@ jobs:
save: ${{ github.event_name == 'push' }}
max-size: "200M"
- name: Configure CPython
run: ./configure --config-cache --with-address-sanitizer --without-pymalloc --with-system-libmpdec=no
run: ./configure --config-cache --with-address-sanitizer --without-pymalloc
- name: Build CPython
run: make -j4
- name: Display build info
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/posix-deps-apt.sh
Expand Up @@ -15,6 +15,7 @@ apt-get -yq install \
libgdbm-dev \
libgdbm-compat-dev \
liblzma-dev \
libmpdec-dev \
libncurses5-dev \
libreadline6-dev \
libsqlite3-dev \
Expand Down
78 changes: 22 additions & 56 deletions configure

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 12 additions & 4 deletions configure.ac
Expand Up @@ -3983,7 +3983,7 @@ AC_MSG_RESULT([$with_system_libmpdec])
AS_VAR_IF(
[with_system_libmpdec], [yes],
[PKG_CHECK_MODULES(
[LIBMPDEC], [libmpdec], [],
[LIBMPDEC], [libmpdec >= 2.5.0], [],
[LIBMPDEC_CFLAGS=${LIBMPDEC_CFLAGS-""}
LIBMPDEC_LIBS=${LIBMPDEC_LIBS-"-lmpdec -lm"}
LIBMPDEC_INTERNAL=])],
Expand All @@ -3995,9 +3995,17 @@ AS_VAR_IF([with_system_libmpdec], [yes],
[WITH_SAVE_ENV([
CPPFLAGS="$LIBMPDEC_CFLAGS $CPPFLAGS"
LDFLAGS="$LIBMPDEC_LIBS $LDFLAGS"
AC_SEARCH_LIBS(
[mpd_version], [mpdec],
[have_mpdec=yes], [have_mpdec=no])])],
AC_LINK_IFELSE([
AC_LANG_PROGRAM([
#include <mpdecimal.h>
#if MPD_VERSION_HEX < 0x02050000
# error "mpdecimal 2.5.0 or higher required"
#endif
], [void *x = mpd_version;])],
[have_mpdec=yes],
[have_mpdec=no])
])],
[AS_VAR_SET([have_mpdec], [yes])
AC_MSG_WARN([m4_normalize([
the bundled copy of libmpdecimal is scheduled for removal in Python 3.15;
Expand Down

0 comments on commit c84f2b7

Please sign in to comment.