Skip to content
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

Python updates with openssl300 #996

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
20 changes: 13 additions & 7 deletions 10.9-libcxx/stable/main/finkinfo/languages/python38.info
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ BuildDepends: <<
readline8,
sqlite3-dev (>= 3.30.1-1),
openssl300-dev (>= 3.0.1-1),
pkgconfig (>= 0.9.0-1),
pkgconf,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ppkg-config? And fix $PKG_CONFIG down below to match?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have not tested this, but python310 did not report any errors of the kind in #996 (comment), so it's probably safe to switch as well.

tcltk-dev (>= 8.4.1-1),
x11-dev
<<
Expand All @@ -52,7 +52,7 @@ Source: https://www.python.org/ftp/python/%v/Python-%v.tar.xz
Source-Checksum: SHA256(d85dbb3774132473d8081dcb158f34a10ccad7a90b96c7e50ea4bb61f5ce4562)

PatchFile: %n.patch
PatchFile-MD5: 25181b340fc83818ea6d910b64481f0b
PatchFile-MD5: f286c8ce64870c408d860c698eba626a

PatchScript: <<
#!/bin/sh -ex
Expand All @@ -78,22 +78,26 @@ ConfigureParams: <<
--with-tcltk-includes="-I%p/include -I/opt/X11/include" \
--with-tcltk-libs="-L%p/lib -ltcl -ltk" \
--with-dtrace \
--without-ensurepip
--without-ensurepip \
PKG_CONFIG=%p/bin/pkgconf
<<

CompileScript: <<
#!/bin/sh -ex
darwinvers=$(uname -r | cut -d. -f1)
SDK_PATH="$(xcrun --sdk macosx --show-sdk-path)"
# for OS X 10.14, ensure full SDK is available, but include it after any fink specific versions.
if [ "$(uname -r | cut -d. -f1)" -ge 18 ]; then
if [ $darwinvers -ge 18 ]; then
export CFLAGS="-Wno-nullability-completeness -Wno-expansion-to-defined"
#export CPPFLAGS="-I%p/include -I%p/include/ncursesw -I$SDK_PATH/usr/include"
#perl -pi -e "s|/usr/include|$SDK_PATH/usr/include|" setup.py
fi
# https://github.com/python/cpython/issues/97897
if [ $darwinvers -eq 21 ]; then
MKFIFOAT_CONFIG_PARAMS="ac_cv_func_mkfifoat=no ac_cv_func_mknodat=no"
fi

# https://bugs.python.org/issue28456 and radar://28372390
# https://daniel.haxx.se/blog/2016/10/11/poll-on-mac-10-12-is-broken/
./configure %c $DIST_CONFIG_PARAMS
./configure %c $MKFIFOAT_CONFIG_PARAMS $DIST_CONFIG_PARAMS
perl -pi -e 's|\#define HAVE_POLL 1||' ./pyconfig.h
perl -pi -e 's|\#define HAVE_POLL_H 1||g' ./pyconfig.h
perl -pi -e 's|\#define HAVE_SYS_POLL_H 1||g' ./pyconfig.h
Expand Down Expand Up @@ -171,6 +175,8 @@ InstallScript: <<
# install some docs and other useful tidbits
rm -rf Misc/RPM
/bin/cp -R Misc Tools %i/lib/python%type_raw[python]
pushd %i/lib/python%type_raw[python]
DYLD_LIBRARY_PATH=%i/lib %i/bin/python%type_raw[python] -m compileall Tools/[a-su]* Tools/tz || exit 1

# Doc tarball missing upstream.
# mkdir -p %i/share/doc/%n/html
Expand Down
30 changes: 15 additions & 15 deletions 10.9-libcxx/stable/main/finkinfo/languages/python38.patch
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
diff -ru Python-3.8.0.orig/Lib/ctypes/macholib/dyld.py Python-3.8.0/Lib/ctypes/macholib/dyld.py
--- Python-3.8.0.orig/Lib/ctypes/macholib/dyld.py 2019-10-14 09:34:47.000000000 -0400
+++ Python-3.8.0/Lib/ctypes/macholib/dyld.py 2019-11-11 20:38:48.540916924 -0500
@@ -23,6 +23,7 @@
@@ -28,6 +28,7 @@

DEFAULT_LIBRARY_FALLBACK = [
os.path.expanduser("~/lib"),
Expand All @@ -25,7 +25,7 @@ diff -ru Python-3.8.0.orig/Lib/test/test_posix.py Python-3.8.0/Lib/test/test_pos
diff -ru Python-3.8.0.orig/Makefile.pre.in Python-3.8.0/Makefile.pre.in
--- Python-3.8.0.orig/Makefile.pre.in 2019-10-14 09:34:47.000000000 -0400
+++ Python-3.8.0/Makefile.pre.in 2019-11-11 20:45:58.085438080 -0500
@@ -628,7 +628,7 @@
@@ -631,7 +631,7 @@
$(BLDSHARED) $(NO_AS_NEEDED) -o $@ -Wl,-h$@ $^

libpython$(LDVERSION).dylib: $(LIBRARY_OBJS)
Expand All @@ -34,7 +34,7 @@ diff -ru Python-3.8.0.orig/Makefile.pre.in Python-3.8.0/Makefile.pre.in


libpython$(VERSION).sl: $(LIBRARY_OBJS)
@@ -1236,7 +1236,7 @@
@@ -1248,7 +1248,7 @@
if test -f $(DESTDIR)$(BINDIR)/python$(VERSION)$(EXE) -o -h $(DESTDIR)$(BINDIR)/python$(VERSION)$(EXE); \
then rm -f $(DESTDIR)$(BINDIR)/python$(VERSION)$(EXE); \
fi; \
Expand All @@ -58,7 +58,7 @@ diff -ru Python-3.8.0.orig/Modules/_dbmmodule.c Python-3.8.0/Modules/_dbmmodule.
diff -ru Python-3.8.2.orig/configure Python-3.8.2/configure
--- Python-3.8.2.orig/configure 2020-02-24 22:36:47.000000000 -0400
+++ Python-3.8.2/configure 2020-04-21 04:12:43.000000000 -0500
@@ -9207,7 +9207,7 @@
@@ -9238,7 +9238,7 @@
LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Darwin/*)
gcc_version=`gcc -dumpversion`
Expand All @@ -67,7 +67,7 @@ diff -ru Python-3.8.2.orig/configure Python-3.8.2/configure
then
LIBTOOL_CRUFT="-lcc_dynamic"
else
@@ -15885,7 +15885,7 @@
@@ -15969,7 +15969,7 @@
# first curses header check
ac_save_cppflags="$CPPFLAGS"
if test "$cross_compiling" = no; then
Expand All @@ -76,7 +76,7 @@ diff -ru Python-3.8.2.orig/configure Python-3.8.2/configure
fi

for ac_header in curses.h ncurses.h
@@ -16395,7 +16395,7 @@
@@ -16479,7 +16479,7 @@

if test $ac_sys_system = Darwin
then
Expand All @@ -88,15 +88,15 @@ diff -ru Python-3.8.2.orig/configure Python-3.8.2/configure
diff -ru Python-3.8.0.orig/setup.py Python-3.8.0/setup.py
--- Python-3.8.0.orig/setup.py 2019-10-14 09:34:47.000000000 -0400
+++ Python-3.8.0/setup.py 2019-11-11 21:46:23.537101707 -0500
@@ -409,6 +409,7 @@
@@ -394,6 +394,7 @@
longest, g))

if self.missing:
+ num_missing=len(self.missing)
print()
print("Python build finished successfully!")
print("The necessary bits to build these optional modules were not "
@@ -416,7 +417,10 @@
@@ -401,7 +402,10 @@
print_three_column(self.missing)
print("To find the necessary bits, look in setup.py in"
" detect_modules() for the module's name.")
Expand All @@ -107,15 +107,15 @@ diff -ru Python-3.8.0.orig/setup.py Python-3.8.0/setup.py

if mods_built:
print()
@@ -441,6 +445,7 @@
@@ -426,6 +430,7 @@
print("Failed to build these modules:")
print_three_column(failed)
print()
+ sys.exit(1)

if self.failed_on_import:
failed = self.failed_on_import[:]
@@ -648,9 +653,9 @@
@@ -633,9 +638,9 @@
# Ensure that /usr/local is always used, but the local build
# directories (i.e. '.' and 'Include') must be first. See issue
# 10520.
Expand All @@ -128,7 +128,7 @@ diff -ru Python-3.8.0.orig/setup.py Python-3.8.0/setup.py
# only change this for cross builds for 3.3, issues on Mageia
if CROSS_COMPILING:
self.add_cross_compiling_paths()
@@ -971,7 +976,7 @@
@@ -956,7 +961,7 @@
if curses_library == 'ncursesw':
curses_defines.append(('HAVE_NCURSESW', '1'))
if not CROSS_COMPILING:
Expand All @@ -137,7 +137,7 @@ diff -ru Python-3.8.0.orig/setup.py Python-3.8.0/setup.py
# Bug 1464056: If _curses.so links with ncursesw,
# _curses_panel.so must link with panelw.
panel_library = 'panelw'
@@ -1299,7 +1304,7 @@
@@ -1284,7 +1389,7 @@
if self.compiler.find_library_file(self.lib_dirs,
'gdbm_compat'):
gdbm_libs.append('gdbm_compat')
Expand All @@ -146,7 +146,7 @@ diff -ru Python-3.8.0.orig/setup.py Python-3.8.0/setup.py
if dbm_setup_debug: print("building dbm using gdbm")
dbmext = Extension(
'_dbm', ['_dbmmodule.c'],
@@ -1350,13 +1355,8 @@
@@ -1335,13 +1340,8 @@
# We hunt for #define SQLITE_VERSION "n.n.n"
# We need to find >= sqlite version 3.3.9, for sqlite3_prepare_v2
sqlite_incdir = sqlite_libdir = None
Expand All @@ -162,7 +162,7 @@ diff -ru Python-3.8.0.orig/setup.py Python-3.8.0/setup.py
if CROSS_COMPILING:
sqlite_inc_paths = []
MIN_SQLITE_VERSION_NUMBER = (3, 7, 2)
@@ -1369,7 +1369,7 @@
@@ -1354,7 +1354,7 @@
if MACOS:
sysroot = macosx_sdk_root()

Expand All @@ -171,7 +171,7 @@ diff -ru Python-3.8.0.orig/setup.py Python-3.8.0/setup.py
d = d_
if MACOS and is_macosx_sdk_path(d):
d = os.path.join(sysroot, d[1:])
@@ -1402,11 +1402,9 @@
@@ -1387,11 +1387,9 @@
sqlite_dirs_to_check = [
os.path.join(sqlite_incdir, '..', 'lib64'),
os.path.join(sqlite_incdir, '..', 'lib'),
Expand Down