# ====================================================== # Conditionals and other variables controlling the build # ====================================================== %{!?__python_ver:%global __python_ver EMPTY} %global __python_ver 27 %global unicode ucs4 %if "%{__python_ver}" != "EMPTY" %global main_python 0 %global python python%{__python_ver} %global tkinter tkinter%{__python_ver} %else %global main_python 1 %global python python %global tkinter tkinter %endif %global pybasever 2.7 %global pylibdir %{_libdir}/python%{pybasever} %global tools_dir %{pylibdir}/Tools %global demo_dir %{pylibdir}/Demo %global doc_tools_dir %{pylibdir}/Doc/tools %global dynload_dir %{pylibdir}/lib-dynload %global site_packages %{pylibdir}/site-packages # Python's configure script defines SOVERSION, and this is used in the Makefile # to determine INSTSONAME, the name of the libpython DSO: # LDLIBRARY='libpython$(VERSION).so' # INSTSONAME="$LDLIBRARY".$SOVERSION # We mirror this here in order to make it easier to add the -gdb.py hooks. # (if these get out of sync, the payload of the libs subpackage will fail # and halt the build) %global py_SOVERSION 1.0 %global py_INSTSONAME_optimized libpython%{pybasever}.so.%{py_SOVERSION} %global py_INSTSONAME_debug libpython%{pybasever}_d.so.%{py_SOVERSION} %global with_debug_build 1 # Disabled for now: %global with_huntrleaks 0 %global with_gdb_hooks 1 # systemtap isn't supported on PPC 32 bit. # As of 2012-06-07, EPEL only builds 32 bit PPC so the builds will fail in koji. # http://sourceware.org/systemtap/wiki/SystemtapDtraceComparison %ifarch %{ix86} x86_64 ppc64 s390x %global with_systemtap 1 %else %global with_systemtap 0 %endif # some arches don't have valgrind so we need to disable its support on them %ifarch %{ix86} x86_64 ppc %{power64} s390x %global with_valgrind 1 %else %global with_valgrind 0 %endif %global with_gdbm 1 # Turn this to 0 to turn off the "check" phase: %global run_selftest_suite 1 # Some of the files below /usr/lib/pythonMAJOR.MINOR/test (e.g. bad_coding.py) # are deliberately invalid, leading to SyntaxError exceptions if they get # byte-compiled. # # These errors are ignored by the normal python build, and aren't normally a # problem in the buildroots since /usr/bin/python isn't present. # # However, for the case where we're rebuilding the python srpm on a machine # that does have python installed we need to set this to avoid # brp-python-bytecompile treating these as fatal errors: # %global _python_bytecompile_errors_terminate_build 0 # We need to get a newer configure generated out of configure.in for the following # patches: # patch 4 (CFLAGS) # patch 52 (valgrind) # patch 55 (systemtap) # patch 145 (linux2) # # For patch 55 (systemtap), we need to get a new header for configure to use # # configure.in requires autoconf-2.65, but the version in Fedora is currently # autoconf-2.66 # # For now, we'll generate a patch to the generated configure script and # pyconfig.h.in on a machine that has a local copy of autoconf 2.65 # # Instructions on obtaining such a copy can be seen at # http://bugs.python.org/issue7997 # # To make it easy to regenerate the patch, this specfile can be run in two # ways: # (i) regenerate_autotooling_patch 0 : the normal approach: prep the # source tree using a pre-generated patch to the "configure" script, and do a # full build # (ii) regenerate_autotooling_patch 1 : intended to be run on a developer's # workstation: prep the source tree without patching configure, then rerun a # local copy of autoconf-2.65, regenerate the patch, then exit, without doing # the rest of the build %global regenerate_autotooling_patch 0 # ================== # Top-level metadata # ================== Summary: An interpreted, interactive, object-oriented programming language Name: %{python} # Remember to also rebase python-docs when changing this: Version: 2.7.8 Release: 1%{?dist} License: Python Group: Development/Languages Requires: %{python}-libs%{?_isa} = %{version}-%{release} Provides: python-abi = %{pybasever} Provides: python(abi) = %{pybasever} # ======================= # Build-time requirements # ======================= # (keep this list alphabetized) BuildRequires: autoconf BuildRequires: bluez-libs-devel BuildRequires: bzip2 BuildRequires: bzip2-devel BuildRequires: expat-devel BuildRequires: findutils BuildRequires: gcc-c++ %if %{with_gdbm} BuildRequires: gdbm-devel %endif BuildRequires: glibc-devel BuildRequires: gmp-devel BuildRequires: db4-devel BuildRequires: libffi-devel BuildRequires: libGL-devel BuildRequires: libX11-devel BuildRequires: ncurses-devel BuildRequires: openssl-devel BuildRequires: pkgconfig BuildRequires: readline-devel BuildRequires: sqlite-devel %if 0%{?with_systemtap} BuildRequires: systemtap-sdt-devel # (this introduces a circular dependency, in that systemtap-sdt-devel's # /usr/bin/dtrace is a python script) %global tapsetdir /usr/share/systemtap/tapset %endif # with_systemtap BuildRequires: tar BuildRequires: tcl-devel BuildRequires: tix-devel BuildRequires: tk-devel %if 0%{?with_valgrind} BuildRequires: valgrind-devel %endif BuildRequires: zlib-devel # ======================= # Source code and patches # ======================= Source: http://www.python.org/ftp/python/%{version}/Python-%{version}.tar.xz # Work around bug 562906 until it's fixed in rpm-build by providing a fixed # version of pythondeps.sh: Source2: pythondeps.sh %global __python_requires %{SOURCE2} # Systemtap tapset to make it easier to use the systemtap static probes # (actually a template; LIBRARY_PATH will get fixed up during install) # Written by dmalcolm; not yet sent upstream Source3: libpython.stp # Example systemtap script using the tapset # Written by wcohen, mjw, dmalcolm; not yet sent upstream Source4: systemtap-example.stp # Another example systemtap script that uses the tapset # Written by dmalcolm; not yet sent upstream Source5: pyfuntop.stp # Supply various useful macros for building python 2 modules: # __python27, python27_sitelib, python27_sitearch, python27_version Source6: macros.python27 Source7: pynche # Modules/Setup.dist is ultimately used by the "makesetup" script to construct # the Makefile and config.c # # Upstream leaves many things disabled by default, to try to make it easy as # possible to build the code on as many platforms as possible. # # TODO: many modules can also now be built by setup.py after the python binary # has been built; need to assess if we should instead build things there # # We patch it downstream as follows: # - various modules are built by default by upstream as static libraries; # we built them as shared libraries # - build the "readline" module (appears to also be handled by setup.py now) # - enable the build of the following modules: # - array arraymodule.c # array objects # - cmath cmathmodule.c # -lm # complex math library functions # - math mathmodule.c # -lm # math library functions, e.g. sin() # - _struct _struct.c # binary structure packing/unpacking # - time timemodule.c # -lm # time operations and variables # - operator operator.c # operator.add() and similar goodies # - _weakref _weakref.c # basic weak reference support # - _testcapi _testcapimodule.c # Python C API test module # - _random _randommodule.c # Random number generator # - _collections _collectionsmodule.c # Container types # - itertools itertoolsmodule.c # - strop stropmodule.c # - _functools _functoolsmodule.c # - _bisect _bisectmodule.c # Bisection algorithms # - unicodedata unicodedata.c # static Unicode character database # - _locale _localemodule.c # - fcntl fcntlmodule.c # fcntl(2) and ioctl(2) # - spwd spwdmodule.c # spwd(3) # - grp grpmodule.c # grp(3) # - select selectmodule.c # select(2); not on ancient System V # - mmap mmapmodule.c # Memory-mapped files # - _csv _csv.c # CSV file helper # - _socket socketmodule.c # Socket module helper for socket(2) # - _ssl _ssl.c # - crypt cryptmodule.c -lcrypt # crypt(3) # - nis nismodule.c -lnsl # Sun yellow pages -- not everywhere # - termios termios.c # Steen Lumholt's termios module # - resource resource.c # Jeremy Hylton's rlimit interface # - audioop audioop.c # Operations on audio samples # - imageop imageop.c # Operations on images # - _md5 md5module.c md5.c # - _sha shamodule.c # - _sha256 sha256module.c # - _sha512 sha512module.c # - linuxaudiodev linuxaudiodev.c # - timing timingmodule.c # - _tkinter _tkinter.c tkappinit.c # - dl dlmodule.c # - gdbm gdbmmodule.c # - _bsddb _bsddb.c # - binascii binascii.c # - parser parsermodule.c # - cStringIO cStringIO.c # - cPickle cPickle.c # - zlib zlibmodule.c # - _multibytecodec cjkcodecs/multibytecodec.c # - _codecs_cn cjkcodecs/_codecs_cn.c # - _codecs_hk cjkcodecs/_codecs_hk.c # - _codecs_iso2022 cjkcodecs/_codecs_iso2022.c # - _codecs_jp cjkcodecs/_codecs_jp.c # - _codecs_kr cjkcodecs/_codecs_kr.c # - _codecs_tw cjkcodecs/_codecs_tw.c Patch0: python-2.7.1-config.patch # Removes the "-g" option from "pydoc", for some reason; I believe # (dmalcolm 2010-01-29) that this was introduced in this change: # - fix pydoc (#68082) # in 2.2.1-12 as a response to the -g option needing TkInter installed # (Red Hat Linux 8) # Not upstream Patch1: 00001-pydocnogui.patch # Add $(CFLAGS) to the linker arguments when linking the "python" binary # since some architectures (sparc64) need this (rhbz:199373). # Not yet filed upstream Patch4: python-2.5-cflags.patch # Work around a bug in Python' gettext module relating to the "Plural-Forms" # header (rhbz:252136) # Related to upstream issues: # http://bugs.python.org/issue1448060 and http://bugs.python.org/issue1475523 # though the proposed upstream patches are, alas, different Patch6: python-2.5.1-plural-fix.patch # This patch was listed in the changelog as: # * Fri Sep 14 2007 Jeremy Katz - 2.5.1-11 # - fix encoding of sqlite .py files to work around weird encoding problem # in Turkish (#283331) # A traceback attached to rhbz 244016 shows the problem most clearly: a # traceback on attempting to import the sqlite module, with: # "SyntaxError: encoding problem: with BOM (__init__.py, line 1)" # This seems to come from Parser/tokenizer.c:check_coding_spec # Our patch changes two source files within sqlite3, removing the # "coding: ISO-8859-1" specs and character E4 = U+00E4 = # LATIN SMALL LETTER A WITH DIAERESIS from in ghaering's surname. # # It may be that the conversion of "ISO-8859-1" to "iso-8859-1" is thwarted # by the implementation of "tolower" in the Turkish locale; see: # https://bugzilla.redhat.com/show_bug.cgi?id=191096#c9 # # TODO: Not yet sent upstream, and appears to me (dmalcolm 2010-01-29) that # it may be papering over a symptom Patch7: python-2.5.1-sqlite-encoding.patch # FIXME: Lib/ctypes/util.py posix implementation defines a function # _get_soname(f). Upstreams's implementation of this uses objdump to read the # SONAME from a library; we avoid this, apparently to minimize space # requirements on the live CD: # (rhbz:307221) Patch10: python-2.7rc1-binutils-no-dep.patch # Upstream as of Python 2.7.3: # Patch11: python-2.7rc1-codec-ascii-tolower.patch # Add various constants to the socketmodule (rhbz#436560): # TODO: these patches were added in 2.5.1-22 and 2.5.1-24 but appear not to # have been sent upstream yet: Patch13: python-2.7rc1-socketmodule-constants.patch Patch14: python-2.7rc1-socketmodule-constants2.patch # Remove an "-rpath $(LIBDIR)" argument from the linkage args in configure.in: # FIXME: is this for OSF, not Linux? Patch16: python-2.6-rpath.patch # Fixup distutils/unixccompiler.py to remove standard library path from rpath: # Adapted from Patch0 in ivazquez' python3000 specfile, removing usage of # super() as it's an old-style class Patch17: python-2.6.4-distutils-rpath.patch # 00055 # # Systemtap support: add statically-defined probe points # Patch based on upstream bug: http://bugs.python.org/issue4111 # fixed up by mjw and wcohen for 2.6.2, then fixed up by dmalcolm for 2.6.4 # then rewritten by mjw (attachment 390110 of rhbz 545179), then reformatted # for 2.7rc1 by dmalcolm: Patch55: 00055-systemtap.patch # Upstream as of Python 2.7.4 # Patch101: 00101-lib64-regex.patch # Only used when "%{_lib}" == "lib64" # Fixup various paths throughout the build and in distutils from "lib" to "lib64", # and add the /usr/lib64/pythonMAJOR.MINOR/site-packages to sitedirs, in front of # /usr/lib/pythonMAJOR.MINOR/site-packages # Not upstream Patch102: python-2.7.6-lib64.patch # Python 2.7 split out much of the path-handling from distutils/sysconfig.py to # a new sysconfig.py (in r77704). # We need to make equivalent changes to that new file to ensure that the stdlib # and platform-specific code go to /usr/lib64 not /usr/lib, on 64-bit archs: Patch103: python-2.7-lib64-sysconfig.patch # 00104 # # Only used when "%{_lib}" == "lib64" # Another lib64 fix, for distutils/tests/test_install.py; not upstream: Patch104: 00104-lib64-fix-for-test_install.patch # 00111 # # Patch the Makefile.pre.in so that the generated Makefile doesn't try to build # a libpythonMAJOR.MINOR.a (bug 550692): # Downstream only: not appropriate for upstream Patch111: 00111-2.7.6-no-static-lib.patch # 00112 # # Patch to support building both optimized vs debug stacks DSO ABIs, sharing # the same .py and .pyc files, using "_d.so" to signify a debug build of an # extension module. # # Based on Debian's patch for the same, # http://patch-tracker.debian.org/patch/series/view/python2.6/2.6.5-2/debug-build.dpatch # # (which was itself based on the upstream Windows build), but with some # changes: # # * Debian's patch to dynload_shlib.c looks for module_d.so, then module.so, # but this can potentially find a module built against the wrong DSO ABI. We # instead search for just module_d.so in a debug build # # * We remove this change from configure.in's build of the Makefile: # SO=$DEBUG_EXT.so # so that sysconfig.py:customize_compiler stays with shared_lib_extension='.so' # on debug builds, so that UnixCCompiler.find_library_file can find system # libraries (otherwise "make sharedlibs" fails to find system libraries, # erroneously looking e.g. for "libffi_d.so" rather than "libffi.so") # # * We change Lib/distutils/command/build_ext.py:build_ext.get_ext_filename # to add the _d there, when building an extension. This way, "make sharedlibs" # can build ctypes, by finding the sysmtem libffi.so (rather than failing to # find "libffi_d.so"), and builds the module as _ctypes_d.so # # * Similarly, update build_ext:get_libraries handling of Py_ENABLE_SHARED by # appending "_d" to the python library's name for the debug configuration # # * We modify Modules/makesetup to add the "_d" to the generated Makefile # rules for the various Modules/*.so targets # # This may introduce issues when building an extension that links directly # against another extension (e.g. users of NumPy?), but seems more robust when # searching for external libraries # # * We don't change Lib/distutils/command/build.py: build.build_purelib to # embed plat_specifier, leaving it as is, as pure python builds should be # unaffected by these differences (we'll be sharing the .py and .pyc files) # # * We introduce DEBUG_SUFFIX as well as DEBUG_EXT: # - DEBUG_EXT is used by ELF files (names and SONAMEs); it will be "_d" for # a debug build # - DEBUG_SUFFIX is used by filesystem paths; it will be "-debug" for a # debug build # # Both will be empty in an optimized build. "_d" contains characters that # are valid ELF metadata, but this leads to various ugly filesystem paths (such # as the include path), and DEBUG_SUFFIX allows these paths to have more natural # names. Changing this requires changes elsewhere in the distutils code. # # * We add DEBUG_SUFFIX to PYTHON in the Makefile, so that the two # configurations build parallel-installable binaries with different names # ("python-debug" vs "python"). # # * Similarly, we add DEBUG_SUFFIX within python-config and # python$(VERSION)-config, so that the two configuration get different paths # for these. # # See also patch 130 below # Patch112: python-2.7.3-debug-build.patch # 00113 # # Add configure-time support for the COUNT_ALLOCS and CALL_PROFILE options # described at http://svn.python.org/projects/python/trunk/Misc/SpecialBuilds.txt # so that if they are enabled, they will be in that build's pyconfig.h, so that # extension modules will reliably use them # Not yet sent upstream Patch113: 00113-more-configuration-flags.patch # 00114 # # Add flags for statvfs.f_flag to the constant list in posixmodule (i.e. "os") # (rhbz:553020); partially upstream as http://bugs.python.org/issue7647 # Not yet sent upstream Patch114: 00114-statvfs-f_flag-constants.patch # Upstream as of Python 2.7.3: # Patch115: make-pydoc-more-robust-001.patch # Upstream r79310 removed the "Modules" directory from sys.path when Python is # running from the build directory on POSIX to fix a unit test (issue #8205). # This seems to have broken the compileall.py done in "make install": it cannot # find shared library extension modules at this point in the build (sys.path # does not contain DESTDIR/usr/lib(64)/python-2.7/lib-dynload for some reason), # leading to the build failing with: # Traceback (most recent call last): # File "/home/david/rpmbuild/BUILDROOT/python-2.7-0.1.rc2.fc14.x86_64/usr/lib64/python2.7/compileall.py", line 17, in # import struct # File "/home/david/rpmbuild/BUILDROOT/python-2.7-0.1.rc2.fc14.x86_64/usr/lib64/python2.7/struct.py", line 1, in # from _struct import * # ImportError: No module named _struct # This patch adds the build Modules directory to build path. Patch121: 00121-add-Modules-to-build-path.patch # 00125 # # COUNT_ALLOCS is useful for debugging, but the upstream behaviour of always # emitting debug info to stdout on exit is too verbose and makes it harder to # use the debug build. Add a "PYTHONDUMPCOUNTS" environment variable which # must be set to enable the output on exit # Not yet sent upstream Patch125: 00125-less-verbose-COUNT_ALLOCS.patch # Upstream as of Python 2.7.5 # Patch126: fix-dbm_contains-on-64bit-bigendian.patch # Upstream as of Python 2.7.5 # Patch127: fix-test_structmember-on-64bit-bigendian.patch # 2.7.1 (in r84230) added a test to test_abc which fails if python is # configured with COUNT_ALLOCS, which is the case for our debug build # (the COUNT_ALLOCS instrumentation keeps "C" alive). # Not yet sent upstream Patch128: python-2.7.1-fix_test_abc_with_COUNT_ALLOCS.patch # 00130 # # Add "--extension-suffix" option to python-config and python-debug-config # (rhbz#732808) # # This is adapted from 3.2's PEP-3149 support. # # Fedora's debug build has some non-standard features (see also patch 112 # above), though largely shared with Debian/Ubuntu and Windows # # In particular, SO in the Makefile is currently always just ".so" for our # python 2 optimized builds, but for python 2 debug it should be '_d.so', to # distinguish the debug vs optimized ABI, following the pattern in the above # patch. # # Not yet sent upstream Patch130: python-2.7.2-add-extension-suffix-to-python-config.patch # 00131 # # The four tests in test_io built on top of check_interrupted_write_retry # fail when built in Koji, for ppc and ppc64; for some reason, the SIGALRM # handlers are never called, and the call to write runs to completion # (rhbz#732998) Patch131: 00131-disable-tests-in-test_io.patch # 00132 # # Add non-standard hooks to unittest for use in the "check" phase below, when # running selftests within the build: # @unittest._skipInRpmBuild(reason) # for tests that hang or fail intermittently within the build environment, and: # @unittest._expectedFailureInRpmBuild # for tests that always fail within the build environment # # The hooks only take effect if WITHIN_PYTHON_RPM_BUILD is set in the # environment, which we set manually in the appropriate portion of the "check" # phase below (and which potentially other python-* rpms could set, to reuse # these unittest hooks in their own "check" phases) Patch132: 00132-add-rpmbuild-hooks-to-unittest.patch # 00133 # # "dl" is deprecated, and test_dl doesn't work on 64-bit builds: Patch133: 00133-skip-test_dl.patch # 00134 # # Fix a failure in test_sys.py when configured with COUNT_ALLOCS enabled # Not yet sent upstream Patch134: 00134-fix-COUNT_ALLOCS-failure-in-test_sys.patch # 00135 # # Skip "test_callback_in_cycle_resurrection" in a debug build, where it fails: # Not yet sent upstream Patch135: 00135-skip-test-within-test_weakref-in-debug-build.patch # 00136 # # Some tests try to seek on sys.stdin, but don't work as expected when run # within Koji/mock; skip them within the rpm build: # One of the problematic tests was removed in 2.7.6 Patch136: 00136-2.7.6-skip-tests-of-seeking-stdin-in-rpmbuild.patch # 00137 # # Some tests within distutils fail when run in an rpmbuild: Patch137: 00137-skip-distutils-tests-that-fail-in-rpmbuild.patch # 00138 # # Fixup some tests within distutils to work with how debug builds are set up: Patch138: 00138-fix-distutils-tests-in-debug-build.patch # 00139 # # ARM-specific: skip known failure in test_float: # http://bugs.python.org/issue8265 (rhbz#706253) Patch139: 00139-skip-test_float-known-failure-on-arm.patch # 00140 # # Sparc-specific: skip known failure in test_ctypes: # http://bugs.python.org/issue8314 (rhbz#711584) # which appears to be a libffi bug Patch140: 00140-skip-test_ctypes-known-failure-on-sparc.patch # 00141 # # Fix test_gc's test_newinstance case when configured with COUNT_ALLOCS: # Not yet sent upstream Patch141: 00141-fix-test_gc_with_COUNT_ALLOCS.patch # 00142 # # Some pty tests fail when run in mock (rhbz#714627): Patch142: 00142-2.7.6-skip-failing-pty-tests-in-rpmbuild.patch # 00143 # # Fix the --with-tsc option on ppc64, and rework it on 32-bit ppc to avoid # aliasing violations (rhbz#698726) # Sent upstream as http://bugs.python.org/issue12872 Patch143: 00143-tsc-on-ppc.patch # 00144 # # (Optionally) disable the gdbm module: Patch144: 00144-no-gdbm.patch # 00145 # # Upstream as of Python 2.7.3: # Patch145: 00145-force-sys-platform-to-be-linux2.patch # 00146 # # Support OpenSSL FIPS mode (e.g. when OPENSSL_FORCE_FIPS_MODE=1 is set) # - handle failures from OpenSSL (e.g. on attempts to use MD5 in a # FIPS-enforcing environment) # - add a new "usedforsecurity" keyword argument to the various digest # algorithms in hashlib so that you can whitelist a callsite with # "usedforsecurity=False" # (sent upstream for python 3 as http://bugs.python.org/issue9216; this is a # backport to python 2.7; see RHEL6 patch 119) # - enforce usage of the _hashlib implementation: don't fall back to the _md5 # and _sha* modules (leading to clearer error messages if fips selftests # fail) # - don't build the _md5 and _sha* modules; rely on the _hashlib implementation # of hashlib (for example, md5.py will use _hashlib's implementation of MD5, # if permitted by the FIPS setting) # (rhbz#563986) Patch146: 00146-hashlib-fips.patch # 00147 # # Add a sys._debugmallocstats() function # Based on patch 202 from RHEL 5's python.spec, with updates from rhbz#737198 # Sent upstream as http://bugs.python.org/issue14785 Patch147: 00147-add-debug-malloc-stats.patch # 00148 # # Upstream as of Python 2.7.3: # Patch148: 00148-gdbm-1.9-magic-values.patch # 00149 # # python3.spec's # Patch149: 00149-backport-issue11254-pycache-bytecompilation-fix.patch # is not relevant for Python 2 # 00150 # # python3.spec has: # Patch150: 00150-disable-rAssertAlmostEqual-cmath-on-ppc.patch # as a workaround for a glibc bug on PPC (bz #750811) # 00151 # # Upstream as of Python 2.7.3: # Patch151: 00151-fork-deadlock.patch # 00152 # # python3.spec has: # Patch152: 00152-fix-test-gdb-regex.patch # 00153 # # Strip out lines of the form "warning: Unable to open ..." from gdb's stderr # when running test_gdb.py; also cope with change to gdb in F17 onwards in # which values are printed as "v@entry" rather than just "v": # Not yet sent upstream Patch153: 00153-fix-test_gdb-noise.patch # 00154 # # python3.spec on f15 has: # Patch154: 00154-skip-urllib-test-requiring-working-DNS.patch # 00155 # # Avoid allocating thunks in ctypes unless absolutely necessary, to avoid # generating SELinux denials on "import ctypes" and "import uuid" when # embedding Python within httpd (rhbz#814391) Patch155: 00155-avoid-ctypes-thunks.patch # 00156 # # Recent builds of gdb will only auto-load scripts from certain safe # locations. Turn off this protection when running test_gdb in the selftest # suite to ensure that it can load our -gdb.py script (rhbz#817072): # Not yet sent upstream Patch156: 00156-gdb-autoload-safepath.patch # 00157 # # Update uid/gid handling throughout the standard library: uid_t and gid_t are # unsigned 32-bit values, but existing code often passed them through C long # values, which are signed 32-bit values on 32-bit architectures, leading to # negative int objects for uid/gid values >= 2^31 on 32-bit architectures. # # Introduce _PyObject_FromUid/Gid to convert uid_t/gid_t values to python # objects, using int objects where the value will fit (long objects otherwise), # and _PyArg_ParseUid/Gid to convert int/long to uid_t/gid_t, with -1 allowed # as a special case (since this is given special meaning by the chown syscall) # # Update standard library to use this throughout for uid/gid values, so that # very large uid/gid values are round-trippable, and -1 remains usable. # (rhbz#697470) Patch157: 00157-uid-gid-overflows.patch # Upstream as of Python 2.7.4 # Patch158: 00158-fix-hashlib-leak.patch # 00160 # # python3.spec's # Patch160: 00160-disable-test_fs_holes-in-rpm-build.patch # is not relevant for Python 2 # 00161 # # python3.spec has: # Patch161: 00161-fix-test_tools-directory.patch # which will likely become relevant for Python 2 next time we rebase # 00162 # # python3.spec has: # Patch162: 00162-distutils-sysconfig-fix-CC-options.patch # 00163 # # python3.spec has: # Patch163: 00163-disable-parts-of-test_socket-in-rpm-build.patch # 00164 # # python3.spec has: # Patch164: 00164-disable-interrupted_write-tests-on-ppc.patch # 00165 # # Backport to Python 2 from Python 3.3 of improvements to the "crypt" module # adding precanned ways of salting a password (rhbz#835021) # Based on r88500 patch to py3k from Python 3.3 # plus 6482dd1c11ed, 0586c699d467, 62994662676a, 74a1110a3b50, plus edits # to docstrings to note that this additional functionality is not standard # within 2.7 Patch165: 00165-crypt-module-salt-backport.patch # 00166 # # Bulletproof the gdb debugging hooks against the case where co_filename for # a frame can't be read from the inferior process (rhbz#912025) # # Not yet sent upstream Patch166: 00166-fix-fake-repr-in-gdb-hooks.patch # 00167 # # Don't run any of the stack navigation tests in test_gdb when Python is # optimized, since there appear to be many different ways in which gdb can # fail to read the PyFrameObject* for arbitrary places in the callstack, # presumably due to compiler optimization (rhbz#912025) # # Not yet sent upstream Patch167: 00167-disable-stack-navigation-tests-when-optimized-in-test_gdb.patch # 00168 # # Update distutils.sysconfig so that if CFLAGS is defined in the environment, # when building extension modules, it is appended to the full compilation # flags from Python's Makefile, rather than instead reducing the compilation # flags to the subset within OPT and adding it to those. # # In particular, this should ensure that "-fno-strict-aliasing" is used by # "python setup.py build" even when CFLAGS is defined in the environment. # # (rhbz#849994) Patch168: 00168-distutils-cflags.patch # 00169 # # Use SHA-256 rather than implicitly using MD5 within the challenge handling # in multiprocessing.connection # # Sent upstream as http://bugs.python.org/issue17258 # (rhbz#879695) Patch169: 00169-avoid-implicit-usage-of-md5-in-multiprocessing.patch # 00170 # # In debug builds, try to print repr() when a C-level assert fails in the # garbage collector (typically indicating a reference-counting error # somewhere else e.g in an extension module) # Backported to 2.7 from a patch I sent upstream for py3k # http://bugs.python.org/issue9263 (rhbz#614680) # hiding the proposed new macros/functions within gcmodule.c to avoid exposing # them within the extension API. # (rhbz#850013) Patch170: 00170-gc-assertions.patch # Upstream as of Python 2.7.4 # Patch171: 00171-raise-correct-exception-when-dev-urandom-is-missing.patch # Upstream as of Python 2.7.4 # Patch172: 00172-use-poll-for-multiprocessing-socket-connection.patch # 00173 # # Workaround for ENOPROTOOPT seen in Koji within # test.test_support.bind_port() # (rhbz#913732) Patch173: 00173-workaround-ENOPROTOOPT-in-bind_port.patch # 00174 # # Workaround for failure to set up prefix/exec_prefix when running # an embededed libpython that sets Py_SetProgramName() to a name not # on $PATH when run from the root directory due to # https://fedoraproject.org/wiki/Features/UsrMove # e.g. cmpi-bindings under systemd (rhbz#817554): Patch174: 00174-fix-for-usr-move.patch # 00175 # # Upstream as of Python 2.7.5 # Patch175: 00175-fix-configure-Wformat.patch # 00176 # # python3.spec had: # Patch176: 00176-upstream-issue16754-so-extension.patch # doesn't affect python2 # 00177 # # python3.spec has # Patch177: 00177-platform-unicode.patch # Does not affect python2 # 00178 # # python3.spec has # Patch178: 00178-dont-duplicate-flags-in-sysconfig.patch # Does not affect python2 AFAICS (different sysconfig values initialization) # 00179 # # python3.spec has # Patch179: 00179-dont-raise-error-on-gdb-corrupted-frames-in-backtrace.patch # Doesn't seem to affect python2 # 00180 # # Enable building on ppc64p7 # Not appropriate for upstream, Fedora-specific naming Patch180: 00180-python-add-support-for-ppc64p7.patch # 00181 # # Allow arbitrary timeout for Condition.wait, as reported in # https://bugzilla.redhat.com/show_bug.cgi?id=917709 # Upstream doesn't want this: http://bugs.python.org/issue17748 # But we have no better solution downstream yet, and since there is # no API breakage, we apply this patch. # Doesn't apply to Python 3, where this is fixed otherwise and works. Patch181: 00181-allow-arbitrary-timeout-in-condition-wait.patch # 00182 # # python3.spec had # Patch182: 00182-fix-test_gdb-test_threads.patch # 00183 # # python3.spec has # Patch183: 00183-cve-2013-2099-fix-ssl-match_hostname-dos.patch # 00184 # # Fix for https://bugzilla.redhat.com/show_bug.cgi?id=979696 # Fixes build of ctypes against libffi with multilib wrapper # Python recognizes ffi.h only if it contains "#define LIBFFI_H", # but the wrapper doesn't contain that, which makes the build fail # We patch this by also accepting "#define ffi_wrapper_h" Patch184: 00184-ctypes-should-build-with-libffi-multilib-wrapper.patch # 00185 # # Makes urllib2 honor "no_proxy" enviroment variable for "ftp:" URLs # when ftp_proxy is set Patch185: 00185-urllib2-honors-noproxy-for-ftp.patch # 00187 # # Add an explicit RPATH to pyexpat.so pointing at the directory # containing the system expat (which has the extra XML_SetHashSalt # symbol), to avoid an ImportError with a link error if there's an # LD_LIBRARY_PATH containing a "vanilla" build of expat (without the # symbol) Patch187: 00187-add-RPATH-to-pyexpat.patch # 00189 # # Fixes gdb py-bt command not to raise exception while processing # statements from eval # rhbz#1008154 (patch by Attila Fazekas) Patch189: 00189-gdb-py-bt-dont-raise-exception-from-eval.patch # 00190 # # # Importing get_python_version in bdist_rpm # http://bugs.python.org/issue18045 # rhbz#1029082 # FIXED UPSTREAM #Patch190: 00190-get_python_version.patch # 00191 # # # Disabling NOOP test as it fails without internet connection Patch191: 00191-disable-NOOP.patch # 00192 # # # Fixing buffer overflow (upstream patch) # rhbz#1062375 # FIXED UPSTREAM #Patch192: 00192-buffer-overflow.patch # 00193 # # # Enable loading sqlite extensions. This patch isn't needed for # python3.spec, since Python 3 has a configuration option for this. # rhbz#1066708 # Patch provided by John C. Peterson Patch193: 00193-enable-loading-sqlite-extensions.patch # 00194 # # # Fix tests with SQLite >= 3.8.4 # http://bugs.python.org/issue20901 # http://hg.python.org/cpython/raw-rev/1763e27a182d # FIXED UPSTREAM #Patch194: 00194-fix-tests-with-sqlite-3.8.4.patch # Since openssl-1.0.1h-5.fc21 SSLv2 and SSLV3 protocols # are disabled by default in openssl, according the comment in openssl # patch this affects only SSLv23_method, this patch enables SSLv2 # and SSLv3 when SSLv23_method is used # Update: # Patch disabled, Openssl reverted disabling sslv3 and now # disables only sslv2 all tests pass #Patch195: 00195-enable-sslv23-in-ssl.patch # http://bugs.python.org/issue21308 # Backport of ssl module from python3 Patch196: 00196-ssl-backport.patch # http://bugs.python.org/issue22023 # Patch seg fault in unicodeobject.c Patch197: 00197-unicode_fromformat.patch # 00201 # # Modified patch from python26 for python27 so it will build on el5 Patch201: 00201-expat-version.patch # 00202 # # Fix for test_io tests failing on ppc64 # # Upstream fixed at: http://bugs.python.org/issue17835 # Patch202: 00202-test_io.patch # 00204 # # Skip test that that needs DNS to work which is forbidden in koji, # very similar to patch 154 # Patch204: 00204-skip-test_missing_localfile.patch # (New patches go here ^^^) # # When adding new patches to "python" and "python3" in Fedora 17 onwards, # please try to keep the patch numbers in-sync between the two specfiles: # # - use the same patch number across both specfiles for conceptually-equivalent # fixes, ideally with the same name # # - when a patch is relevant to both specfiles, use the same introductory # comment in both specfiles where possible (to improve "diff" output when # comparing them) # # - when a patch is only relevant for one of the two specfiles, leave a gap # in the patch numbering in the other specfile, adding a comment when # omitting a patch, both in the manifest section here, and in the "prep" # phase below # # Hopefully this will make it easier to ensure that all relevant fixes are # applied to both versions. # This is the generated patch to "configure"; see the description of # %{regenerate_autotooling_patch} # above: Patch5000: 05000-autotool-intermediates.patch # ====================================================== # Additional metadata, and subpackages # ====================================================== %if %{main_python} Obsoletes: Distutils Provides: Distutils Obsoletes: python2 Provides: python2 = %{version} Obsoletes: python-elementtree <= 1.2.6 Obsoletes: python-ordereddict <= 1.1-8 Obsoletes: python-sqlite < 2.3.2 Provides: python-sqlite = 2.3.2 Obsoletes: python-ctypes < 1.0.1 Provides: python-ctypes = 1.0.1 Obsoletes: python-hashlib < 20081120 Provides: python-hashlib = 20081120 Obsoletes: python-unittest2 < 0.5.1-9 Provides: python-unittest2 = 0.5.1-9 Obsoletes: python-uuid < 1.31 Provides: python-uuid = 1.31 # obsolete, not provide PyXML as proposed in feature # https://fedoraproject.org/wiki/Features/RemovePyXML#How_To_Test Obsoletes: PyXML <= 0.8.4-29 # python-argparse is part of python as of version 2.7 # drop this Provides in F17 # (having Obsoletes here caused problems with multilib; see rhbz#667984) Provides: python-argparse = %{version}-%{release} %endif BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) URL: http://www.python.org/ %description Python is an interpreted, interactive, object-oriented programming language often compared to Tcl, Perl, Scheme or Java. Python includes modules, classes, exceptions, very high level dynamic data types and dynamic typing. Python supports interfaces to many system calls and libraries, as well as to various windowing systems (X11, Motif, Tk, Mac and MFC). Programmers can write new built-in modules for Python in C or C++. Python can be used as an extension language for applications that need a programmable interface. Note that documentation for Python is provided in the python-docs package. This package provides the "python" executable; most of the actual implementation is within the "python-libs" package. %package libs Summary: Runtime libraries for Python Group: Applications/System # Needed for ctypes, to load libraries, worked around for Live CDs size # Requires: binutils Requires: expat %description libs This package contains runtime libraries for use by Python: - the libpython dynamic library, for use by applications that embed Python as a scripting language, and by the main "python" executable - the Python standard library %package devel Summary: The libraries and header files needed for Python development Group: Development/Libraries Requires: %{python}%{?_isa} = %{version}-%{release} Requires: pkgconfig # Needed here because of the migration of Makefile from -devel to the main # package Conflicts: %{python} < %{version}-%{release} %if %{main_python} Obsoletes: python2-devel Provides: python2-devel = %{version}-%{release} %endif %description devel The Python programming language's interpreter can be extended with dynamically loaded extensions and can be embedded in other programs. This package contains the header files and libraries needed to do these types of tasks. Install python-devel if you want to develop Python extensions. The python package will also need to be installed. You'll probably also want to install the python-docs package, which contains Python documentation. %package tools Summary: A collection of development tools included with Python Group: Development/Tools Requires: %{name} = %{version}-%{release} Requires: %{tkinter} = %{version}-%{release} %if %{main_python} Obsoletes: python2-tools Provides: python2-tools = %{version} %endif %description tools This package includes several tools to help with the development of Python programs, including IDLE (an IDE with editing and debugging facilities), a color editor (pynche), and a python gettext program (pygettext.py). %package -n %{tkinter} Summary: A graphical user interface for the Python scripting language Group: Development/Languages Requires: %{name} = %{version}-%{release} %if %{main_python} Obsoletes: tkinter2 Provides: tkinter2 = %{version} %endif %description -n %{tkinter} The Tkinter (Tk interface) program is an graphical user interface for the Python scripting language. You should install the tkinter package if you'd like to use a graphical user interface for Python programming. %package test Summary: The test modules from the main python package Group: Development/Languages Requires: %{name} = %{version}-%{release} %description test The test modules from the main python package: %{name} These have been removed to save space, as they are never or almost never used in production. You might want to install the python-test package if you're developing python code that uses more than just unittest and/or test_support.py. %if 0%{?with_debug_build} %package debug Summary: Debug version of the Python runtime Group: Applications/System # The debug build is an all-in-one package version of the regular build, and # shares the same .py/.pyc files and directories as the regular build. Hence # we depend on all of the subpackages of the regular build: Requires: %{name}%{?_isa} = %{version}-%{release} Requires: %{name}-libs%{?_isa} = %{version}-%{release} Requires: %{name}-devel%{?_isa} = %{version}-%{release} Requires: %{name}-test%{?_isa} = %{version}-%{release} Requires: %{tkinter}%{?_isa} = %{version}-%{release} Requires: %{name}-tools%{?_isa} = %{version}-%{release} %description debug python-debug provides a version of the Python runtime with numerous debugging features enabled, aimed at advanced Python users, such as developers of Python extension modules. This version uses more memory and will be slower than the regular Python build, but is useful for tracking down reference-counting issues, and other bugs. The bytecodes are unchanged, so that .pyc files are compatible between the two version of Python, but the debugging features mean that C/C++ extension modules are ABI-incompatible with those built for the standard runtime. It shares installation directories with the standard Python runtime, so that .py and .pyc files can be shared. All compiled extension modules gain a "_d" suffix ("foo_d.so" rather than "foo.so") so that each Python implementation can load its own extensions. %endif # with_debug_build # ====================================================== # The prep phase of the build: # ====================================================== %prep %setup -q -n Python-%{version} %if 0%{?with_systemtap} # Provide an example of usage of the tapset: cp -a %{SOURCE4} . cp -a %{SOURCE5} . %endif # with_systemtap # Ensure that we're using the system copy of various libraries, rather than # copies shipped by upstream in the tarball: # Remove embedded copy of expat: rm -r Modules/expat || exit 1 # Remove embedded copy of libffi: for SUBDIR in darwin libffi libffi_arm_wince libffi_msvc libffi_osx ; do rm -r Modules/_ctypes/$SUBDIR || exit 1 ; done # Remove embedded copy of zlib: rm -r Modules/zlib || exit 1 # Don't build upstream Python's implementation of these crypto algorithms; # instead rely on _hashlib and OpenSSL. # # For example, in our builds md5.py uses always uses hashlib.md5 (rather than # falling back to _md5 when hashlib.md5 is not available); hashlib.md5 is # implemented within _hashlib via OpenSSL (and thus respects FIPS mode) for f in md5module.c md5.c shamodule.c sha256module.c sha512module.c; do rm Modules/$f done # # Apply patches: # %patch0 -p1 -b .rhconfig %patch1 -p1 -b .no_gui %patch4 -p1 -b .cflags %patch6 -p1 -b .plural %patch7 -p1 # Try not disabling egg-infos, bz#414711 #patch50 -p1 -b .egginfo # patch101: upstream as of Python 2.7.4 %if "%{_lib}" == "lib64" %patch102 -p1 -b .lib64 %patch103 -p1 -b .lib64-sysconfig %patch104 -p1 %endif %patch10 -p1 -b .binutils-no-dep # patch11: upstream as of Python 2.7.3 %patch13 -p1 -b .socketmodule %patch14 -p1 -b .socketmodule2 %patch16 -p1 -b .rpath %patch17 -p1 -b .distutils-rpath %if 0%{?with_systemtap} %patch55 -p1 -b .systemtap %endif %patch111 -p1 -b .no-static-lib %patch112 -p1 -b .debug-build %patch113 -p1 -b .more-configuration-flags %patch114 -p1 -b .statvfs-f-flag-constants # patch115: upstream as of Python 2.7.3 %patch121 -p1 %patch125 -p1 -b .less-verbose-COUNT_ALLOCS # 00126: upstream as of Python 2.7.5 # 00127: upstream as of Python 2.7.5 %patch128 -p1 %patch130 -p1 %ifarch ppc %{power64} %patch131 -p1 %endif %patch132 -p1 %patch133 -p1 %patch134 -p1 %patch135 -p1 %patch136 -p1 -b .stdin-test %patch137 -p1 %patch138 -p1 %ifarch %{arm} %patch139 -p1 %endif %ifarch %{sparc} %patch140 -p1 %endif %patch141 -p1 %patch142 -p1 -b .tty-fail %patch143 -p1 -b .tsc-on-ppc %if !%{with_gdbm} %patch144 -p1 %endif # 00145: upstream as of Python 2.7.3 %patch146 -p1 %patch147 -p1 # 00148: upstream as of Python 2.7.3 # 00149: not for python 2 # 00150: not for python 2 # 00151: upstream as of Python 2.7.3 # 00152: not for python 2 %patch153 -p0 # 00154: not for python 2 %patch155 -p1 %patch156 -p1 %patch157 -p1 # 00158: upstream as of Python 2.7.4 # 00160: not for python 2 # 00161: not for python 2 yet # 00162: not for python 2 yet # 00163: not for python 2 yet # 00164: not for python 2 yet %patch165 -p1 mv Modules/cryptmodule.c Modules/_cryptmodule.c %patch166 -p1 %patch167 -p1 %patch168 -p1 %patch169 -p1 %patch170 -p1 # 00171: upstream as of Python 2.7.4 # 00171: upstream as of Python 2.7.4 %patch173 -p1 %patch174 -p1 -b .fix-for-usr-move # 00175: upstream as of Python 2.7.5 # 00176: not for python 2 # 00177: not for python 2 # 00178: not for python 2 # 00179: not for python 2 %patch180 -p1 %patch181 -p1 # 00182: not for python 2 # 00183: not for python 2 %patch184 -p1 %patch185 -p1 %patch187 -p1 %patch189 -p1 # 00190: upstream as of Python 2.7.7 %patch191 -p1 # 00192: upstream as of Python 2.7.7 %patch193 -p1 # 00194: upstream as of Python 2.7.7 #%patch195 -p1 %patch196 -p1 %patch197 -p1 %if 0%{?rhel} == 5 %patch201 -p1 %endif #%patch202 -p1 %patch204 -p1 # compile against respective Berkeley DB versions %if 0%{?rhel} == 5 sed -i '/^DBLIB/aDBLIBVER=4.3' Modules/Setup.dist %endif %if 0%{?rhel} == 6 sed -i '/^DBLIB/aDBLIBVER=4.7' Modules/Setup.dist %endif sed -i "/^DBINC/cDBINC=usr/include/db4" Modules/Setup.dist sed -i '/^_bsddb/c_bsddb _bsddb.c -I$(DBINC) -L$(DBLIB) -ldb-$(DBLIBVER)' Modules/Setup.dist # This shouldn't be necesarry, but is right now (2.2a3) find -name "*~" |xargs rm -f %if ! 0%{regenerate_autotooling_patch} # Normally we apply the patch to "configure" # We don't apply the patch if we're working towards regenerating it %patch5000 -p0 -b .autotool-intermediates %endif # ====================================================== # Configuring and building the code: # ====================================================== %build topdir=$(pwd) export CFLAGS="$RPM_OPT_FLAGS -D_GNU_SOURCE -fPIC -fwrapv" export CXXFLAGS="$RPM_OPT_FLAGS -D_GNU_SOURCE -fPIC -fwrapv" export CPPFLAGS="$(pkg-config --cflags-only-I libffi)" export OPT="$RPM_OPT_FLAGS -D_GNU_SOURCE -fPIC -fwrapv" export LINKCC="gcc" export LDFLAGS="$RPM_LD_FLAGS" if pkg-config openssl ; then export CFLAGS="$CFLAGS $(pkg-config --cflags openssl)" export LDFLAGS="$LDFLAGS $(pkg-config --libs-only-L openssl)" fi # Force CC export CC=gcc %if 0%{regenerate_autotooling_patch} # If enabled, this code regenerates the patch to "configure", using a # local copy of autoconf-2.65, then exits the build # # The following assumes that the copy is installed to ~/autoconf-2.65/bin # as per these instructions: # http://bugs.python.org/issue7997 for f in pyconfig.h.in configure ; do cp $f $f.autotool-intermediates ; done # Rerun the autotools: PATH=~/autoconf-2.65/bin:$PATH autoconf autoheader # Regenerate the patch: gendiff . .autotool-intermediates > %{PATCH5000} # Exit the build exit 1 %endif # Define a function, for how to perform a "build" of python for a given # configuration: BuildPython() { ConfName=$1 BinaryName=$2 SymlinkName=$3 ExtraConfigArgs=$4 PathFixWithThisBinary=$5 ConfDir=build/$ConfName echo STARTING: BUILD OF PYTHON FOR CONFIGURATION: $ConfName - %{_bindir}/$BinaryName mkdir -p $ConfDir pushd $ConfDir # Use the freshly created "configure" script, but in the directory two above: %if 0%{?rhel} == 5 $topdir/configure \ --prefix=%{_prefix} \ --libdir=%{_libdir} \ %else %global _configure $topdir/configure %configure \ %endif --enable-ipv6 \ --enable-shared \ --enable-unicode=%{unicode} \ --with-dbmliborder=gdbm:ndbm:bdb \ --with-system-expat \ --with-system-ffi \ %if 0%{?with_systemtap} --with-dtrace \ --with-tapset-install-dir=%{tapsetdir} \ %endif %if 0%{?with_valgrind} --with-valgrind \ %endif $ExtraConfigArgs \ %{nil} make EXTRA_CFLAGS="$CFLAGS" %{?_smp_mflags} # We need to fix shebang lines across the full source tree. # # We do this using the pathfix.py script, which requires one of the # freshly-built Python binaries. # # We use the optimized python binary, and make the shebangs point at that same # optimized python binary: if $PathFixWithThisBinary then LD_LIBRARY_PATH="$topdir/$ConfDir" ./$BinaryName \ $topdir/Tools/scripts/pathfix.py \ -i "%{_bindir}/env $BinaryName" \ $topdir fi # Rebuild with new python # We need a link to a versioned python in the build directory ln -s $BinaryName $SymlinkName LD_LIBRARY_PATH="$topdir/$ConfDir" PATH=$PATH:$topdir/$ConfDir make -s EXTRA_CFLAGS="$CFLAGS" %{?_smp_mflags} popd echo FINISHED: BUILD OF PYTHON FOR CONFIGURATION: $ConfDir } # Use "BuildPython" to support building with different configurations: %if 0%{?with_debug_build} BuildPython debug \ python-debug \ python%{pybasever}-debug \ %ifarch %{ix86} x86_64 ppc %{power64} "--with-pydebug --with-tsc --with-count-allocs --with-call-profile" \ %else "--with-pydebug --with-count-allocs --with-call-profile" \ %endif false %endif # with_debug_build BuildPython optimized \ python \ python%{pybasever} \ "" \ true # ====================================================== # Installing the built code: # ====================================================== %install topdir=$(pwd) rm -rf %{buildroot} mkdir -p %{buildroot}%{_prefix} %{buildroot}%{_mandir} # Clean up patched .py files that are saved as .lib64 for f in distutils/command/install distutils/sysconfig; do rm -f Lib/$f.py.lib64 done InstallPython() { ConfName=$1 BinaryName=$2 PyInstSoName=$3 ConfDir=build/$ConfName echo STARTING: INSTALL OF PYTHON FOR CONFIGURATION: $ConfName - %{_bindir}/$BinaryName mkdir -p $ConfDir pushd $ConfDir make install DESTDIR=%{buildroot} # We install a collection of hooks for gdb that make it easier to debug # executables linked against libpython (such as /usr/lib/python itself) # # These hooks are implemented in Python itself # # gdb-archer looks for them in the same path as the ELF file, with a -gdb.py suffix. # We put them in the debuginfo package by installing them to e.g.: # /usr/lib/debug/usr/lib/libpython2.6.so.1.0.debug-gdb.py # (note that the debug path is /usr/lib/debug for both 32/64 bit) # # See https://fedoraproject.org/wiki/Features/EasierPythonDebugging for more # information # # Initially I tried: # /usr/lib/libpython2.6.so.1.0-gdb.py # but doing so generated noise when ldconfig was rerun (rhbz:562980) # %if 0%{?with_gdb_hooks} DirHoldingGdbPy=%{_prefix}/lib/debug/%{_libdir} PathOfGdbPy=$DirHoldingGdbPy/$PyInstSoName.debug-gdb.py mkdir -p %{buildroot}$DirHoldingGdbPy cp $topdir/Tools/gdb/libpython.py %{buildroot}$PathOfGdbPy # Manually byte-compile the file, in case find-debuginfo.sh is run before # brp-python-bytecompile, so that the .pyc/.pyo files are properly listed in # the debuginfo manifest: LD_LIBRARY_PATH="$topdir/$ConfDir" $topdir/$ConfDir/$BinaryName \ -c "import compileall; import sys; compileall.compile_dir('%{buildroot}$DirHoldingGdbPy', ddir='$DirHoldingGdbPy')" LD_LIBRARY_PATH="$topdir/$ConfDir" $topdir/$ConfDir/$BinaryName -O \ -c "import compileall; import sys; compileall.compile_dir('%{buildroot}$DirHoldingGdbPy', ddir='$DirHoldingGdbPy')" %endif # with_gdb_hooks popd echo FINISHED: INSTALL OF PYTHON FOR CONFIGURATION: $ConfName } # Use "InstallPython" to support building with different configurations: # Install the "debug" build first, so that we can move some files aside %if 0%{?with_debug_build} InstallPython debug \ python%{pybasever}-debug \ %{py_INSTSONAME_debug} %endif # with_debug_build # Now the optimized build: InstallPython optimized \ python%{pybasever} \ %{py_INSTSONAME_optimized} # Fix the interpreter path in binaries installed by distutils # (which changes them by itself) # Make sure we preserve the file permissions for fixed in %{buildroot}%{_bindir}/pydoc; do sed 's,#!.*/python$,#!%{_bindir}/env python%{pybasever},' $fixed > $fixed- \ && cat $fixed- > $fixed && rm -f $fixed- done # Junk, no point in putting in -test sub-pkg rm -f %{buildroot}/%{pylibdir}/idlelib/testcode.py* # don't include tests that are run at build time in the package # This is documented, and used: rhbz#387401 if /bin/false; then # Move this to -test subpackage. mkdir save_bits_of_test for i in test_support.py __init__.py; do cp -a %{buildroot}/%{pylibdir}/test/$i save_bits_of_test done rm -rf %{buildroot}/%{pylibdir}/test mkdir %{buildroot}/%{pylibdir}/test cp -a save_bits_of_test/* %{buildroot}/%{pylibdir}/test fi %if %{main_python} %else mv %{buildroot}%{_bindir}/python %{buildroot}%{_bindir}/%{python} %if 0%{?with_debug_build} mv %{buildroot}%{_bindir}/python-debug %{buildroot}%{_bindir}/%{python}-debug %endif # with_debug_build #mv %{buildroot}/%{_mandir}/man1/python.1 %{buildroot}/%{_mandir}/man1/python%{pybasever}.1 %endif # tools mkdir -p ${RPM_BUILD_ROOT}%{site_packages} #pynche install -p -m755 %{SOURCE7} ${RPM_BUILD_ROOT}%{_bindir}/pynche chmod 755 ${RPM_BUILD_ROOT}%{_bindir}/pynche rm -f Tools/pynche/*.pyw cp -rp Tools/pynche \ ${RPM_BUILD_ROOT}%{site_packages}/ sed -i '1c#!/usr/bin/python2.7' ${RPM_BUILD_ROOT}%{site_packages}/pynche/pynche mv Tools/pynche/README Tools/pynche/README.pynche #gettext install -m755 Tools/i18n/pygettext.py %{buildroot}%{_bindir}/ install -m755 Tools/i18n/msgfmt.py %{buildroot}%{_bindir}/ # Useful development tools install -m755 -d %{buildroot}%{tools_dir}/scripts install Tools/README %{buildroot}%{tools_dir}/ install Tools/scripts/*py %{buildroot}%{tools_dir}/scripts/ # Documentation tools install -m755 -d %{buildroot}%{doc_tools_dir} #install -m755 Doc/tools/mkhowto %{buildroot}%{doc_tools_dir} # Useful demo scripts install -m755 -d %{buildroot}%{demo_dir} cp -ar Demo/* %{buildroot}%{demo_dir} # Get rid of crap find %{buildroot}/ -name "*~"|xargs rm -f find %{buildroot}/ -name ".cvsignore"|xargs rm -f find %{buildroot}/ -name "*.bat"|xargs rm -f find . -name "*~"|xargs rm -f find . -name ".cvsignore"|xargs rm -f #zero length rm -f %{buildroot}%{pylibdir}/LICENSE.txt #make the binaries install side by side with the main python and delete # un-needed ones %if !%{main_python} rm %{buildroot}%{_libdir}/pkgconfig/python.pc rm %{buildroot}%{_libdir}/pkgconfig/python2.pc # These files don't exist if debug is turned off, simply add -f to avoid error rm -f %{buildroot}%{_libdir}/pkgconfig/python-debug.pc rm -f %{buildroot}%{_libdir}/pkgconfig/python2-debug.pc pushd %{buildroot}/%{_mandir}/man1 rm python.1 rm python2.1 ln -s python%{pybasever}.1 python%{__python_ver} pushd %{buildroot}%{_bindir} mv idle idle%{__python_ver} mv pynche pynche%{__python_ver} mv pygettext.py pygettext%{__python_ver}.py mv msgfmt.py msgfmt%{__python_ver}.py mv smtpd.py smtpd%{__python_ver}.py mv pydoc pydoc%{__python_ver} #rm python rm python27 rm python2 rm python2-* rm python-* # on el6, python-tools provides 2to3 # on el5, python26-tools provides 2to3. it would be preferable for # python27-tools to provides this but we can worry about that later rm 2to3 ln -s python%{pybasever} %{python} %if 0%{?with_debug_build} #ln -s python%{pybasever}-debug %{python}-debug %endif popd %endif # Fix for bug #136654 rm -f %{buildroot}%{pylibdir}/email/test/data/audiotest.au %{buildroot}%{pylibdir}/test/audiotest.au # Fix bug #143667: python should own /usr/lib/python2.x on 64-bit machines %if "%{_lib}" == "lib64" install -d %{buildroot}/usr/lib/python%{pybasever}/site-packages %endif # Make python-devel multilib-ready (bug #192747, #139911) %global _pyconfig32_h pyconfig-32.h %global _pyconfig64_h pyconfig-64.h %ifarch %{power64} s390x x86_64 ia64 alpha sparc64 aarch64 %global _pyconfig_h %{_pyconfig64_h} %else %global _pyconfig_h %{_pyconfig32_h} %endif %if 0%{?with_debug_build} %global PyIncludeDirs python%{pybasever} python%{pybasever}-debug %else %global PyIncludeDirs python%{pybasever} %endif for PyIncludeDir in %{PyIncludeDirs} ; do mv %{buildroot}%{_includedir}/$PyIncludeDir/pyconfig.h \ %{buildroot}%{_includedir}/$PyIncludeDir/%{_pyconfig_h} cat > %{buildroot}%{_includedir}/$PyIncludeDir/pyconfig.h << EOF #include #if __WORDSIZE == 32 #include "%{_pyconfig32_h}" #elif __WORDSIZE == 64 #include "%{_pyconfig64_h}" #else #error "Unknown word size" #endif EOF done ln -s ../../libpython%{pybasever}.so %{buildroot}%{pylibdir}/config/libpython%{pybasever}.so # Fix for bug 201434: make sure distutils looks at the right pyconfig.h file # Similar for sysconfig: sysconfig.get_config_h_filename tries to locate # pyconfig.h so it can be parsed, and needs to do this at runtime in site.py # when python starts up. # # Split this out so it goes directly to the pyconfig-32.h/pyconfig-64.h # variants: sed -i -e "s/'pyconfig.h'/'%{_pyconfig_h}'/" \ %{buildroot}%{pylibdir}/distutils/sysconfig.py \ %{buildroot}%{pylibdir}/sysconfig.py # Install macros for rpm: mkdir -p %{buildroot}/%{_sysconfdir}/rpm install -m 644 %{SOURCE6} %{buildroot}/%{_sysconfdir}/rpm # Ensure that the curses module was linked against libncursesw.so, rather than # libncurses.so (bug 539917) ldd %{buildroot}/%{dynload_dir}/_curses*.so \ | grep curses \ | grep libncurses.so && (echo "_curses.so linked against libncurses.so" ; exit 1) # Ensure that the debug modules are linked against the debug libpython, and # likewise for the optimized modules and libpython: for Module in %{buildroot}/%{dynload_dir}/*.so ; do case $Module in *_d.so) ldd $Module | grep %{py_INSTSONAME_optimized} && (echo Debug module $Module linked against optimized %{py_INSTSONAME_optimized} ; exit 1) ;; *) ldd $Module | grep %{py_INSTSONAME_debug} && (echo Optimized module $Module linked against debug %{py_INSTSONAME_optimized} ; exit 1) ;; esac done # # Systemtap hooks: # %if 0%{?with_systemtap} # Install a tapset for this libpython into tapsetdir, fixing up the path to the # library: mkdir -p %{buildroot}%{tapsetdir} %ifarch %{power64} s390x x86_64 ia64 alpha sparc64 aarch64 %global libpython_stp_optimized libpython%{pybasever}-64.stp %global libpython_stp_debug libpython%{pybasever}-debug-64.stp %else %global libpython_stp_optimized libpython%{pybasever}-32.stp %global libpython_stp_debug libpython%{pybasever}-debug-32.stp %endif sed \ -e "s|LIBRARY_PATH|%{_libdir}/%{py_INSTSONAME_optimized}|" \ %{SOURCE3} \ > %{buildroot}%{tapsetdir}/%{libpython_stp_optimized} %if 0%{?with_debug_build} sed \ -e "s|LIBRARY_PATH|%{_libdir}/%{py_INSTSONAME_debug}|" \ %{SOURCE3} \ > %{buildroot}%{tapsetdir}/%{libpython_stp_debug} %endif # with_debug_build %endif # with_systemtap # ====================================================== # Running the upstream test suite # ====================================================== %check topdir=$(pwd) CheckPython() { ConfName=$1 BinaryName=$2 ConfDir=$(pwd)/build/$ConfName echo STARTING: CHECKING OF PYTHON FOR CONFIGURATION: $ConfName # Note that we're running the tests using the version of the code in the # builddir, not in the buildroot. pushd $ConfDir EXTRATESTOPTS="--verbose" %if 0%{?with_huntrleaks} # Try to detect reference leaks on debug builds. By default this means # running every test 10 times (6 to stabilize, then 4 to watch): if [ "$ConfName" = "debug" ] ; then EXTRATESTOPTS="$EXTRATESTOPTS --huntrleaks : " fi %endif # Run the upstream test suite, setting "WITHIN_PYTHON_RPM_BUILD" so that the # our non-standard decorators take effect on the relevant tests: # @unittest._skipInRpmBuild(reason) # @unittest._expectedFailureInRpmBuild WITHIN_PYTHON_RPM_BUILD= EXTRATESTOPTS="$EXTRATESTOPTS" make test popd echo FINISHED: CHECKING OF PYTHON FOR CONFIGURATION: $ConfName } %if 0%{run_selftest_suite} # Check each of the configurations: %if 0%{?with_debug_build} CheckPython \ debug \ python%{pybasever}-debug %endif # with_debug_build CheckPython \ optimized \ python%{pybasever} %endif # run_selftest_suite # ====================================================== # Cleaning up # ====================================================== %clean rm -fr %{buildroot} # ====================================================== # Scriptlets # ====================================================== %post libs -p /sbin/ldconfig %postun libs -p /sbin/ldconfig %files %defattr(-, root, root, -) %doc LICENSE README %{_bindir}/pydoc* %{_bindir}/%{python} %if %{main_python} %{_bindir}/python2 %endif %{_bindir}/python%{pybasever} %{_mandir}/*/* %files libs %defattr(-,root,root,-) %doc LICENSE README %dir %{pylibdir} %dir %{dynload_dir} %{dynload_dir}/Python-%{version}-py%{pybasever}.egg-info %{dynload_dir}/_bisectmodule.so %{dynload_dir}/_bsddb.so %{dynload_dir}/_codecs_cn.so %{dynload_dir}/_codecs_hk.so %{dynload_dir}/_codecs_iso2022.so %{dynload_dir}/_codecs_jp.so %{dynload_dir}/_codecs_kr.so %{dynload_dir}/_codecs_tw.so %{dynload_dir}/_collectionsmodule.so %{dynload_dir}/_csv.so %{dynload_dir}/_ctypes.so %{dynload_dir}/_curses.so %{dynload_dir}/_curses_panel.so %{dynload_dir}/_elementtree.so %{dynload_dir}/_functoolsmodule.so %{dynload_dir}/_hashlib.so %{dynload_dir}/_heapq.so %{dynload_dir}/_hotshot.so %{dynload_dir}/_io.so %{dynload_dir}/_json.so %{dynload_dir}/_localemodule.so %{dynload_dir}/_lsprof.so %{dynload_dir}/_multibytecodecmodule.so %{dynload_dir}/_multiprocessing.so %{dynload_dir}/_randommodule.so %{dynload_dir}/_socketmodule.so %{dynload_dir}/_sqlite3.so %{dynload_dir}/_ssl.so %{dynload_dir}/_struct.so %{dynload_dir}/arraymodule.so %{dynload_dir}/audioop.so %{dynload_dir}/binascii.so %{dynload_dir}/bz2.so %{dynload_dir}/cPickle.so %{dynload_dir}/cStringIO.so %{dynload_dir}/cmathmodule.so %{dynload_dir}/_cryptmodule.so %{dynload_dir}/datetime.so %{dynload_dir}/dbm.so %{dynload_dir}/dlmodule.so %{dynload_dir}/fcntlmodule.so %{dynload_dir}/future_builtins.so %if %{with_gdbm} %{dynload_dir}/gdbmmodule.so %endif %{dynload_dir}/grpmodule.so %{dynload_dir}/imageop.so %{dynload_dir}/itertoolsmodule.so %{dynload_dir}/linuxaudiodev.so %{dynload_dir}/math.so %{dynload_dir}/mmapmodule.so %{dynload_dir}/nismodule.so %{dynload_dir}/operator.so %{dynload_dir}/ossaudiodev.so %{dynload_dir}/parsermodule.so %{dynload_dir}/pyexpat.so %{dynload_dir}/readline.so %{dynload_dir}/resource.so %{dynload_dir}/selectmodule.so %{dynload_dir}/spwdmodule.so %{dynload_dir}/stropmodule.so %{dynload_dir}/syslog.so %{dynload_dir}/termios.so %{dynload_dir}/timemodule.so %{dynload_dir}/timingmodule.so %{dynload_dir}/unicodedata.so %{dynload_dir}/xxsubtype.so %{dynload_dir}/zlibmodule.so %dir %{site_packages} %{site_packages}/README %{pylibdir}/*.py* %{pylibdir}/*.doc %{pylibdir}/wsgiref.egg-info %dir %{pylibdir}/bsddb %{pylibdir}/bsddb/*.py* %{pylibdir}/compiler %dir %{pylibdir}/ctypes %{pylibdir}/ctypes/*.py* %{pylibdir}/ctypes/macholib %{pylibdir}/curses %dir %{pylibdir}/distutils %{pylibdir}/distutils/*.py* %{pylibdir}/distutils/README %{pylibdir}/distutils/command %exclude %{pylibdir}/distutils/command/wininst-*.exe %dir %{pylibdir}/email %{pylibdir}/email/*.py* %{pylibdir}/email/mime %{pylibdir}/encodings %{pylibdir}/hotshot %{pylibdir}/idlelib %{pylibdir}/importlib %dir %{pylibdir}/json %{pylibdir}/json/*.py* %{pylibdir}/lib2to3 %{pylibdir}/logging %{pylibdir}/multiprocessing %{pylibdir}/plat-linux2 %{pylibdir}/pydoc_data %dir %{pylibdir}/sqlite3 %{pylibdir}/sqlite3/*.py* %dir %{pylibdir}/test %{pylibdir}/test/test_support.py* %{pylibdir}/test/__init__.py* %{pylibdir}/unittest %{pylibdir}/wsgiref %{pylibdir}/xml %if "%{_lib}" == "lib64" %attr(0755,root,root) %dir %{_prefix}/lib/python%{pybasever} %attr(0755,root,root) %dir %{_prefix}/lib/python%{pybasever}/site-packages %endif # "Makefile" and the config-32/64.h file are needed by # distutils/sysconfig.py:_init_posix(), so we include them in the libs # package, along with their parent directories (bug 531901): %dir %{pylibdir}/config %{pylibdir}/config/Makefile %dir %{_includedir}/python%{pybasever} %{_includedir}/python%{pybasever}/%{_pyconfig_h} %{_libdir}/%{py_INSTSONAME_optimized} %if 0%{?with_systemtap} %{tapsetdir}/%{libpython_stp_optimized} %doc systemtap-example.stp pyfuntop.stp %endif %files devel %defattr(-,root,root,-) %{_libdir}/pkgconfig/python-%{pybasever}.pc %{pylibdir}/config/* %exclude %{pylibdir}/config/Makefile %{pylibdir}/distutils/command/wininst-*.exe %{_includedir}/python%{pybasever}/*.h %exclude %{_includedir}/python%{pybasever}/%{_pyconfig_h} %doc Misc/README.valgrind Misc/valgrind-python.supp Misc/gdbinit %if %{main_python} %{_bindir}/python-config %{_bindir}/python2-config %endif %{_bindir}/python%{pybasever}-config %{_libdir}/libpython%{pybasever}.so %config(noreplace) %{_sysconfdir}/rpm/macros.python27 %files tools %defattr(-,root,root,755) %doc Tools/pynche/README.pynche %{site_packages}/pynche %{_bindir}/smtpd*.py* %{_bindir}/idle* %{_bindir}/pynche* %{_bindir}/pygettext*.py* %{_bindir}/msgfmt*.py* %{tools_dir} %{demo_dir} %{pylibdir}/Doc %files -n %{tkinter} %defattr(-,root,root,755) %{pylibdir}/lib-tk %{dynload_dir}/_tkinter.so %files test %defattr(-, root, root, -) %{pylibdir}/bsddb/test %{pylibdir}/ctypes/test %{pylibdir}/distutils/tests %{pylibdir}/email/test %{pylibdir}/json/tests %{pylibdir}/sqlite3/test %{pylibdir}/test/* # These two are shipped in the main subpackage: %exclude %{pylibdir}/test/test_support.py* %exclude %{pylibdir}/test/__init__.py* %{dynload_dir}/_ctypes_test.so %{dynload_dir}/_testcapimodule.so # We don't bother splitting the debug build out into further subpackages: # if you need it, you're probably a developer. # Hence the manifest is the combination of analogous files in the manifests of # all of the other subpackages %if 0%{?with_debug_build} %files debug %defattr(-,root,root,-) # Analog of the core subpackage's files: %{_bindir}/%{python}-debug %if %{main_python} %{_bindir}/python2-debug %endif %{_bindir}/python%{pybasever}-debug # Analog of the -libs subpackage's files, with debug builds of the built-in # "extension" modules: %{dynload_dir}/_bisectmodule_d.so %{dynload_dir}/_bsddb_d.so %{dynload_dir}/_codecs_cn_d.so %{dynload_dir}/_codecs_hk_d.so %{dynload_dir}/_codecs_iso2022_d.so %{dynload_dir}/_codecs_jp_d.so %{dynload_dir}/_codecs_kr_d.so %{dynload_dir}/_codecs_tw_d.so %{dynload_dir}/_collectionsmodule_d.so %{dynload_dir}/_csv_d.so %{dynload_dir}/_ctypes_d.so %{dynload_dir}/_curses_d.so %{dynload_dir}/_curses_panel_d.so %{dynload_dir}/_elementtree_d.so %{dynload_dir}/_functoolsmodule_d.so %{dynload_dir}/_hashlib_d.so %{dynload_dir}/_heapq_d.so %{dynload_dir}/_hotshot_d.so %{dynload_dir}/_io_d.so %{dynload_dir}/_json_d.so %{dynload_dir}/_localemodule_d.so %{dynload_dir}/_lsprof_d.so %{dynload_dir}/_multibytecodecmodule_d.so %{dynload_dir}/_multiprocessing_d.so %{dynload_dir}/_randommodule_d.so %{dynload_dir}/_socketmodule_d.so %{dynload_dir}/_sqlite3_d.so %{dynload_dir}/_ssl_d.so %{dynload_dir}/_struct_d.so %{dynload_dir}/arraymodule_d.so %{dynload_dir}/audioop_d.so %{dynload_dir}/binascii_d.so %{dynload_dir}/bz2_d.so %{dynload_dir}/cPickle_d.so %{dynload_dir}/cStringIO_d.so %{dynload_dir}/cmathmodule_d.so %{dynload_dir}/_cryptmodule_d.so %{dynload_dir}/datetime_d.so %{dynload_dir}/dbm_d.so %{dynload_dir}/dlmodule_d.so %{dynload_dir}/fcntlmodule_d.so %{dynload_dir}/future_builtins_d.so %if %{with_gdbm} %{dynload_dir}/gdbmmodule_d.so %endif %{dynload_dir}/grpmodule_d.so %{dynload_dir}/imageop_d.so %{dynload_dir}/itertoolsmodule_d.so %{dynload_dir}/linuxaudiodev_d.so %{dynload_dir}/math_d.so %{dynload_dir}/mmapmodule_d.so %{dynload_dir}/nismodule_d.so %{dynload_dir}/operator_d.so %{dynload_dir}/ossaudiodev_d.so %{dynload_dir}/parsermodule_d.so %{dynload_dir}/pyexpat_d.so %{dynload_dir}/readline_d.so %{dynload_dir}/resource_d.so %{dynload_dir}/selectmodule_d.so %{dynload_dir}/spwdmodule_d.so %{dynload_dir}/stropmodule_d.so %{dynload_dir}/syslog_d.so %{dynload_dir}/termios_d.so %{dynload_dir}/timemodule_d.so %{dynload_dir}/timingmodule_d.so %{dynload_dir}/unicodedata_d.so %{dynload_dir}/xxsubtype_d.so %{dynload_dir}/zlibmodule_d.so # No need to split things out the "Makefile" and the config-32/64.h file as we # do for the regular build above (bug 531901), since they're all in one package # now; they're listed below, under "-devel": %{_libdir}/%{py_INSTSONAME_debug} %if 0%{?with_systemtap} %{tapsetdir}/%{libpython_stp_debug} %endif # Analog of the -devel subpackage's files: %dir %{pylibdir}/config-debug %{_libdir}/pkgconfig/python-%{pybasever}-debug.pc %{pylibdir}/config-debug/* %{_includedir}/python%{pybasever}-debug/*.h %if %{main_python} %{_bindir}/python-debug-config %{_bindir}/python2-debug-config %endif %{_bindir}/python%{pybasever}-debug-config %{_libdir}/libpython%{pybasever}_d.so # Analog of the -tools subpackage's files: # None for now; we could build precanned versions that have the appropriate # shebang if needed # Analog of the tkinter subpackage's files: %{dynload_dir}/_tkinter_d.so # Analog of the -test subpackage's files: %{dynload_dir}/_ctypes_test_d.so %{dynload_dir}/_testcapimodule_d.so %endif # with_debug_build # We put the debug-gdb.py file inside /usr/lib/debug to avoid noise from # ldconfig (rhbz:562980). # # The /usr/lib/rpm/redhat/macros defines %__debug_package to use # debugfiles.list, and it appears that everything below /usr/lib/debug and # (/usr/src/debug) gets added to this file (via LISTFILES) in # /usr/lib/rpm/find-debuginfo.sh # # Hence by installing it below /usr/lib/debug we ensure it is added to the # -debuginfo subpackage # (if it doesn't, then the rpmbuild ought to fail since the debug-gdb.py # payload file would be unpackaged) # ====================================================== # Finally, the changelog: # ====================================================== %changelog * Sun Nov 30 2014 Mark McKinstry - 2.7.8-1 - upgrade to python 2.7.8 using fedora 2.7.8-10 spec * Sun Nov 30 2014 Mark McKinstry - 2.7.6-1 - include fixes from Steve Simpson - remove patch203 - fixed upstream - fix macros.python27 to refer to python 2.7 * Fri May 24 2013 Mark Mckinstry - 2.7.5-1 - include updates from Aurelien Bompard in rhbz#829892 - include changes from Fedora 19 python up to 2.7.5-1 - upgrade to python 2.7.5 - remove patch200 for sqlite, upstream fixed in 2.7.4 - add patch203 to fix urllib test failing on ppc64 - add patch204 to skip a failing test - modify pynche27 source so it runs with python27 - rename man page to python27 * Tue May 29 2012 Mark McKinstry - 2.7.3-1 - don't build with systemtap on 32 bit ppc since it isn't supported - remove patch 156 since RHEL's gdb doesn't support an option it is using and RHEL/EPEL doesn't support the ARM architecture which is why the patch was added so its not needed - include patch 201 from python26 so expat stuff will built on el5 - include patch 200 from http://bugs.python.org/issue14572 so we can build on el5 which comes with sqlite3 3.3 - debug package should require the tkinter macro instead of plain old 'tkinter' - remove stuff in pkgconfig directory that is named to suggest it is part of the "main" python RPM - remove 2to3 binary which conflicts with python-tools on el6 and python26-tools on el5 - supply different RPM macros for python27 - setting the macro _configure doesn't work on el5 and el6 so we need to call configure directly - include patch 54 so it will link against db4 4.3 on el5 - remove requirement for expat-devel >= 2.1 that was added for CVE-2012-0876, Red Hat should backport this fix for RHEL but hasn't yet. - start spec from the python 2.7.3-6 from Fedora 17