diff -durN -x '*~' -x '*.orig' Python-2.7.10.orig/Include/pythonrun.h Python-2.7.10/Include/pythonrun.h
--- Python-2.7.10.orig/Include/pythonrun.h 2015-05-23 18:09:00.000000000 +0200
-+++ Python-2.7.10/Include/pythonrun.h 2015-12-02 17:54:33.560101256 +0100
++++ Python-2.7.10/Include/pythonrun.h 2015-12-02 19:31:20.058862685 +0100
@@ -108,6 +108,8 @@
/* In their own files */
PyAPI_FUNC(const char *) Py_GetVersion(void);
PyAPI_FUNC(const char *) Py_GetBuildInfo(void);
diff -durN -x '*~' -x '*.orig' Python-2.7.10.orig/Lib/distutils/command/install.py Python-2.7.10/Lib/distutils/command/install.py
--- Python-2.7.10.orig/Lib/distutils/command/install.py 2015-05-23 18:09:01.000000000 +0200
-+++ Python-2.7.10/Lib/distutils/command/install.py 2015-12-02 17:54:33.560101256 +0100
++++ Python-2.7.10/Lib/distutils/command/install.py 2015-12-02 19:31:20.058862685 +0100
@@ -22,6 +22,8 @@
from site import USER_SITE
'data' : '$base',
diff -durN -x '*~' -x '*.orig' Python-2.7.10.orig/Lib/distutils/sysconfig.py Python-2.7.10/Lib/distutils/sysconfig.py
--- Python-2.7.10.orig/Lib/distutils/sysconfig.py 2015-05-23 18:09:02.000000000 +0200
-+++ Python-2.7.10/Lib/distutils/sysconfig.py 2015-12-02 17:57:40.004593153 +0100
++++ Python-2.7.10/Lib/distutils/sysconfig.py 2015-12-02 19:31:20.058862685 +0100
@@ -119,8 +119,12 @@
prefix = plat_specific and EXEC_PREFIX or PREFIX
else:
diff -durN -x '*~' -x '*.orig' Python-2.7.10.orig/Lib/distutils/tests/test_install.py Python-2.7.10/Lib/distutils/tests/test_install.py
--- Python-2.7.10.orig/Lib/distutils/tests/test_install.py 2015-05-23 18:09:02.000000000 +0200
-+++ Python-2.7.10/Lib/distutils/tests/test_install.py 2015-12-02 17:54:33.560101256 +0100
++++ Python-2.7.10/Lib/distutils/tests/test_install.py 2015-12-02 19:31:20.058862685 +0100
@@ -56,7 +56,7 @@
expected = os.path.normpath(expected)
self.assertEqual(got, expected)
check_path(cmd.install_purelib, libdir)
diff -durN -x '*~' -x '*.orig' Python-2.7.10.orig/Lib/site.py Python-2.7.10/Lib/site.py
--- Python-2.7.10.orig/Lib/site.py 2015-05-23 18:09:06.000000000 +0200
-+++ Python-2.7.10/Lib/site.py 2015-12-02 17:59:13.041917804 +0100
++++ Python-2.7.10/Lib/site.py 2015-12-02 19:31:20.058862685 +0100
@@ -288,13 +288,17 @@
if sys.platform in ('os2emx', 'riscos'):
sitepackages.append(os.path.join(prefix, "Lib", "site-packages"))
# locations.
diff -durN -x '*~' -x '*.orig' Python-2.7.10.orig/Lib/sysconfig.py Python-2.7.10/Lib/sysconfig.py
--- Python-2.7.10.orig/Lib/sysconfig.py 2015-05-23 18:09:07.000000000 +0200
-+++ Python-2.7.10/Lib/sysconfig.py 2015-12-02 17:54:33.563434609 +0100
++++ Python-2.7.10/Lib/sysconfig.py 2015-12-02 19:33:48.483250053 +0100
@@ -5,22 +5,24 @@
import os
from os.path import pardir, realpath
'include': '{userbase}/include/python{py_version_short}',
'scripts': '{userbase}/bin',
'data' : '{userbase}',
+@@ -409,7 +411,7 @@
+ else:
+ inc_dir = _PROJECT_BASE
+ else:
+- inc_dir = get_path('platinclude')
++ inc_dir = os.path.join(get_path('platstdlib'), "config")
+ return os.path.join(inc_dir, 'pyconfig.h')
+
+ def get_scheme_names():
diff -durN -x '*~' -x '*.orig' Python-2.7.10.orig/Lib/test/test_site.py Python-2.7.10/Lib/test/test_site.py
--- Python-2.7.10.orig/Lib/test/test_site.py 2015-05-23 18:09:12.000000000 +0200
-+++ Python-2.7.10/Lib/test/test_site.py 2015-12-02 17:54:42.220155116 +0100
++++ Python-2.7.10/Lib/test/test_site.py 2015-12-02 19:31:20.058862685 +0100
@@ -226,7 +226,7 @@
if sys.platform in ('os2emx', 'riscos'):
class PthFile(object):
diff -durN -x '*~' -x '*.orig' Python-2.7.10.orig/Makefile.pre.in Python-2.7.10/Makefile.pre.in
---- Python-2.7.10.orig/Makefile.pre.in 2015-12-02 17:53:51.063166393 +0100
-+++ Python-2.7.10/Makefile.pre.in 2015-12-02 17:54:33.560101256 +0100
+--- Python-2.7.10.orig/Makefile.pre.in 2015-12-02 19:31:01.322061528 +0100
++++ Python-2.7.10/Makefile.pre.in 2015-12-02 19:31:20.058862685 +0100
@@ -87,6 +87,8 @@
# Machine-dependent subdirectories
$(CC) -c $(PY_CFLAGS) -I$(DLINCLDIR) -o $@ $(srcdir)/Python/importdl.c
diff -durN -x '*~' -x '*.orig' Python-2.7.10.orig/Modules/getpath.c Python-2.7.10/Modules/getpath.c
--- Python-2.7.10.orig/Modules/getpath.c 2015-05-23 18:09:20.000000000 +0200
-+++ Python-2.7.10/Modules/getpath.c 2015-12-02 17:54:33.563434609 +0100
++++ Python-2.7.10/Modules/getpath.c 2015-12-02 19:31:20.062196042 +0100
@@ -116,9 +116,21 @@
#define EXEC_PREFIX PREFIX
#endif
reduce(char *dir)
diff -durN -x '*~' -x '*.orig' Python-2.7.10.orig/Python/getplatform.c Python-2.7.10/Python/getplatform.c
--- Python-2.7.10.orig/Python/getplatform.c 2015-05-23 18:09:24.000000000 +0200
-+++ Python-2.7.10/Python/getplatform.c 2015-12-02 17:54:33.563434609 +0100
++++ Python-2.7.10/Python/getplatform.c 2015-12-02 19:31:20.062196042 +0100
@@ -10,3 +10,23 @@
{
return PLATFORM;
+}
diff -durN -x '*~' -x '*.orig' Python-2.7.10.orig/Python/sysmodule.c Python-2.7.10/Python/sysmodule.c
--- Python-2.7.10.orig/Python/sysmodule.c 2015-05-23 18:09:24.000000000 +0200
-+++ Python-2.7.10/Python/sysmodule.c 2015-12-02 17:54:33.563434609 +0100
++++ Python-2.7.10/Python/sysmodule.c 2015-12-02 19:31:20.062196042 +0100
@@ -1437,6 +1437,10 @@
PyString_FromString(Py_GetCopyright()));
SET_SYS_FROM_STRING("platform",
PyString_FromString(Py_GetProgramFullPath()));
SET_SYS_FROM_STRING("prefix",
diff -durN -x '*~' -x '*.orig' Python-2.7.10.orig/configure.ac Python-2.7.10/configure.ac
---- Python-2.7.10.orig/configure.ac 2015-12-02 17:53:51.063166393 +0100
-+++ Python-2.7.10/configure.ac 2015-12-02 17:54:33.560101256 +0100
+--- Python-2.7.10.orig/configure.ac 2015-12-02 19:31:01.322061528 +0100
++++ Python-2.7.10/configure.ac 2015-12-02 19:31:20.062196042 +0100
@@ -739,6 +739,44 @@
;;
esac
AC_SUBST(LIBRARY)
AC_MSG_CHECKING(LIBRARY)
diff -durN -x '*~' -x '*.orig' Python-2.7.10.orig/setup.py Python-2.7.10/setup.py
---- Python-2.7.10.orig/setup.py 2015-12-02 17:53:51.053166330 +0100
-+++ Python-2.7.10/setup.py 2015-12-02 17:54:33.563434609 +0100
+--- Python-2.7.10.orig/setup.py 2015-12-02 19:31:01.312061456 +0100
++++ Python-2.7.10/setup.py 2015-12-02 19:31:20.062196042 +0100
@@ -496,6 +496,7 @@
except NameError:
have_unicode = 0
Summary(uk.UTF-8): Мова програмування дуже високого рівня з X-інтерфейсом
Name: python
Version: %{py_ver}.10
-Release: 6.1
+Release: 6.2
Epoch: 1
License: PSF
Group: Development/Languages/Python
# Source0-md5: c685ef0b8e9f27b5e3db5db12b268ac6
Source1: http://www.python.org/ftp/python/doc/%{dver}/%{name}-%{dver}-docs-html.tar.bz2
# Source1-md5: 545fef39b52b15641f6936c623150c63
+Source2: pyconfig.h.in
Patch0: %{name}-db.patch
Patch1: %{name}-pythonpath.patch
Patch2: %{name}-ac_fixes.patch
find $RPM_BUILD_ROOT%{py_libdir} -name \*.txt -exec rm {} \;
find $RPM_BUILD_ROOT%{py_libdir} -name README\* -exec rm {} \;
-mv $RPM_BUILD_ROOT%{py_incdir}/{pyconfig.h,pyconfig-%{_target_cpu}.h}
-ln -s pyconfig-%{_target_cpu}.h $RPM_BUILD_ROOT%{py_incdir}/pyconfig.h
+mv $RPM_BUILD_ROOT%{py_incdir}/pyconfig.h $RPM_BUILD_ROOT%{py_libdir}/config/pyconfig.h
+sed -e's#@PREFIX@#%{_prefix}#g;s#@PY_VER@#%{py_ver}#g' %{SOURCE2} > $RPM_BUILD_ROOT%{py_incdir}/pyconfig.h
%clean
rm -rf $RPM_BUILD_ROOT
-%post libs
-/sbin/ldconfig || :
-[ -e %{py_incdir}/pyconfig.h ] || ln -s pyconfig-%{_target_cpu}.h %{py_incdir}/pyconfig.h || :
+%post libs -p /sbin/ldconfig
%postun libs -p /sbin/ldconfig
-%post devel
-ln -sf pyconfig-%{_target_cpu}.h %{py_incdir}/pyconfig.h || :
-
%post doc-info -p /sbin/postshell
-/usr/sbin/fix-info-dir -c %{_infodir}
# required by sysconfig.py
%dir %{py_libdir}/config
%{py_libdir}/config/Makefile
+%{py_libdir}/config/pyconfig.h
%dir %{py_incdir}
-%ghost %{py_incdir}/pyconfig.h
-%{py_incdir}/pyconfig-%{_target_cpu}.h
+%{py_incdir}/pyconfig.h
%files -n pydoc
%defattr(644,root,root,755)
%attr(755,root,root) %{_libdir}/libpython.so
%{py_incdir}/*.h
%exclude %{py_incdir}/pyconfig.h
-%exclude %{py_incdir}/pyconfig-%{_target_cpu}.h
%{_pkgconfigdir}/python.pc
%{_pkgconfigdir}/python2.pc
%{_pkgconfigdir}/python-%{py_ver}.pc