]> git.ipfire.org Git - ipfire-3.x.git/blobdiff - python/python.nm
git: Update to 2.23.0
[ipfire-3.x.git] / python / python.nm
index d5c1a2d7b12e956cf75179c3d8cb981a0c564aba..b312f8be6514d5885abf410834de86e43307725a 100644 (file)
@@ -5,7 +5,7 @@
 
 name       = python
 major_ver  = 2.7
-version    = %{major_ver}.3
+version    = %{major_ver}.15
 release    = 1
 thisapp    = Python-%{version}
 
@@ -30,34 +30,38 @@ build
                autoconf
                automake
                bzip2-devel
-               db4-devel >= 1:4.8
                expat-devel
+               gdbm-devel
+               glibc-headers >= 2.16-4
+               libdb-devel
                libffi-devel
-               libselinux-devel
                ncurses-devel
                openssl-devel
-               pkg-config
+               pakfire-builder >= 0.9.23-4
                readline-devel
                sqlite-devel
                tar
+               util-linux
                zlib-devel
        end
 
        export CFLAGS  += -D_GNU_SOURCE -fwrapv
+       export CPPFLAGS = %(pkg-config --cflags-only-I libffi)
+       export OPT      = %{CFLAGS}
+       export CC       = gcc
+       export LINKCC   = gcc
+
+       if "%{lib}" == "lib64"
+               patches += %{DIR_SOURCE}/python-2.7.13-lib64.patch
+               patches += %{DIR_SOURCE}/python-2.7-lib64-sysconfig.patch
+       end
 
        prepare_cmds
-               # Apply patches for x86_64.
-               if [ "$(uname -m)" = "x86_64" ]; then
-                       patch -Np1 -i %{DIR_SOURCE}/python-2.7.3-lib64.patch
-                       patch -Np1 -i %{DIR_SOURCE}/python-2.7-lib64-sysconfig.patch
-               fi
-
                # Remove embedded copies of expat, zlib and libffi
                rm -rf Modules/{expat,zlib}
                rm -rf Modules/_ctypes/{darwin,libffi,libffi_arm_wince,libffi_msvc,libffi_osx}
 
-               # Remove autoconf version check and reconfigure
-               sed -e "s/^version_required.*//" -i configure.in
+               # Reconfigure
                autoreconf --force
        end
 
@@ -68,14 +72,8 @@ build
                --with-system-ffi \
                --enable-shared
 
-       build
-               export CPPFLAGS=$(pkg-config --cflags-only-I libffi)
-
-               OPT="%{CFLAGS}" \
-                       ./configure \
-                               %{configure_options}
-
-               make %{PARALLELISMFLAGS}
+       test
+               WITHIN_PYTHON_RPM_BUILD= EXTRATESTOPTS="--verbose" make test || :
        end
 
        install_cmds