Skip to content

GH-132983: Remove zstd version check in the header file #133502

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 6, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions Modules/_zstd/_zstdmodule.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,6 @@ Python module.
#include "zdict.h"


// if you update the minimum version, you should update the compile
// check in configure.ac
#define PYTHON_MINIMUM_SUPPORTED_ZSTD_VERSION 10405

#if ZSTD_VERSION_NUMBER < PYTHON_MINIMUM_SUPPORTED_ZSTD_VERSION
#error "_zstd module requires zstd v1.4.5+"
#endif

/* Forward declaration of module state */
typedef struct _zstd_state _zstd_state;

Expand Down
192 changes: 2 additions & 190 deletions configure

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

17 changes: 2 additions & 15 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -5386,21 +5386,8 @@ PKG_CHECK_MODULES([LIBLZMA], [liblzma], [have_liblzma=yes], [
])
])

dnl zstd 1.4.5 added ZDICT_finalizeDictionary
PKG_CHECK_MODULES([LIBZSTD], [libzstd >= 1.4.5], [have_libzstd=yes], [
WITH_SAVE_ENV([
CPPFLAGS="$CPPFLAGS $LIBZSTD_CFLAGS"
LIBS="$LIBS $LIBZSTD_LIBS"
AC_CHECK_HEADERS([zstd.h zdict.h], [
PY_CHECK_LIB([zstd], [ZDICT_finalizeDictionary],
[have_libzstd=yes], [have_libzstd=no])
], [have_libzstd=no])
AS_VAR_IF([have_libzstd], [yes], [
LIBZSTD_CFLAGS=${LIBZSTD_CFLAGS-""}
LIBZSTD_LIBS=${LIBZSTD_LIBS-"-lzstd"}
])
])
])
dnl zstd 1.4.5 stabilised ZDICT_finalizeDictionary
PKG_CHECK_MODULES([LIBZSTD], [libzstd >= 1.4.5], [have_libzstd=yes], [have_libzstd=no])

dnl PY_CHECK_NETDB_FUNC(FUNCTION)
AC_DEFUN([PY_CHECK_NETDB_FUNC], [PY_CHECK_FUNC([$1], [@%:@include <netdb.h>])])
Expand Down
6 changes: 0 additions & 6 deletions pyconfig.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -1630,18 +1630,12 @@
/* Define to 1 if you have the 'writev' function. */
#undef HAVE_WRITEV

/* Define to 1 if you have the <zdict.h> header file. */
#undef HAVE_ZDICT_H

/* Define if the zlib library has inflateCopy */
#undef HAVE_ZLIB_COPY

/* Define to 1 if you have the <zlib.h> header file. */
#undef HAVE_ZLIB_H

/* Define to 1 if you have the <zstd.h> header file. */
#undef HAVE_ZSTD_H

/* Define to 1 if you have the '_getpty' function. */
#undef HAVE__GETPTY

Expand Down
Loading