Ignore:
Timestamp:
Jun 3, 2017, 10:51:43 PM (8 years ago)
Author:
dmik
Message:

spec: python: Release version 2.7.6-18.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • spec/trunk/SPECS/python.spec

    r1118 r1156  
    1 #define svn_url     F:/rd/rpm/python/trunk
    2 %define svn_url     http://svn.netlabs.org/repos/rpm/python/trunk
    3 %define svn_rev     1117
    4 
    51%{!?__python_ver:%global __python_ver EMPTY}
    62#global __python_ver 2.7
     
    4743%global _python_bytecompile_errors_terminate_build 0
    4844
     45# Completely disable python dependency generators as we enforce the right
     46# provides/requires manually. This, in particular, prevents python-libs from
     47# having the python(abi) dependency so that it can be installed anone.
     48%global __python_provides %{nil}
     49%global __python_requires %{nil}
     50
     51# Exclude Windows installer stubs from debug info stripping
     52%define _strip_opts --debuginfo -x "wininst-*.exe"
     53
    4954Summary: An interpreted, interactive, object-oriented programming language
    5055Name: %{python}
    5156Version: 2.7.6
    52 Release: 17%{?dist}
     57Release: 18%{?dist}
    5358License: Python
    5459Group: Development/Languages
     60Requires: %{name}-libs = %{version}-%{release}
    5561Provides: python-abi = %{pybasever}
    5662Provides: python(abi) = %{pybasever}
    5763
    58 Source: %{name}-%{version}%{?svn_rev:-r%{svn_rev}}.zip
    59 
    60 BuildRequires: gcc make subversion zip
     64%scm_source svn http://svn.netlabs.org/repos/rpm/python/trunk 1151
    6165
    6266%if %{main_python}
     
    7680%endif
    7781
     82# Because of fread override that fixes freezes when reading big files on JFS
     83Requires: libcx >= 0.5.3
     84
    7885# YD because of libcx
    7986Requires: db4 > 4.8.30-6
     
    8390Conflicts: rpm < 4.13.0-8
    8491Conflicts: yum-metadata-parser < 1.1.4-6
    85 
    86 # YD unix adds this automatically by parsing elf binaries
    87 Requires: %{name}-libs = %{version}-%{release}
    8892
    8993BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
     
    108112%endif
    109113
    110 # OS/2 specific
    111 BuildRequires: mmap urpo-devel
    112 
    113114URL: http://www.python.org/
    114115
     
    140141Summary: The libraries for python runtime
    141142Group: Applications/System
    142 Requires: %{name} = %{version}-%{release}
     143
    143144# Needed for ctypes, to load libraries, worked around for Live CDs size
    144145# Requires: binutils
     
    152153Summary: The libraries and header files needed for Python development
    153154Group: Development/Libraries
    154 Requires: %{python}%{?_isa} = %{version}-%{release}
     155Requires: %{python} = %{version}-%{release}
    155156Requires: python-rpm-macros
    156157Requires: python2-rpm-macros
     
    224225
    225226%prep
    226 %if %{?svn_rev:%(sh -c 'if test -f "%{_sourcedir}/%{name}-%{version}-r%{svn_rev}.zip" ; then echo 1 ; else echo 0 ; fi')}%{!?svn_rev):0}
    227 %setup -q
    228 %else
    229 %setup -n "%{name}-%{version}" -Tc
    230 svn export %{?svn_rev:-r %{svn_rev}} %{svn_url} . --force
    231 rm -f "%{_sourcedir}/%{name}-%{version}%{?svn_rev:-r%{svn_rev}}.zip"
    232 (cd .. && zip -SrX9 "%{_sourcedir}/%{name}-%{version}%{?svn_rev:-r%{svn_rev}}.zip" "%{name}-%{version}")
    233 %endif
     227%scm_setup
    234228
    235229%if 0%{?with_systemtap}
     
    258252%build
    259253
    260 export LDFLAGS="-g -Zbin-files -Zhigh-mem -Zomf -Zargs-wild -Zargs-resp"
    261 export LIBS="-lcx -lssl -lcrypto -lurpo -lpthread -lintl"
     254# NOTE: Put -lcx to LDFLAGS instead of LIBS to have LIBCx linked to all shared
     255# (.pyd) modules in addition to the python DLL and EXE itself
     256export LDFLAGS="-g -Zbin-files -Zhigh-mem -Zomf -Zargs-wild -Zargs-resp -Zmap -lcx"
     257export LIBS="-lssl -lcrypto -lintl"
    262258%configure \
    263259        --enable-shared \
     
    354350rm %{buildroot}%{pylibdir}/*.egg-info
    355351
     352# Get rid of all .pyo files as they are identical to .pyc (only needed in
     353# python -O mode which is used rarely or not at all on OS/2)
     354find %{buildroot}%{pylibdir} -type f -name *.pyo -exec rm -f {} +
     355
    356356%clean
    357357rm -fr %{buildroot}
     
    370370
    371371
    372 %files
     372%files -f %{debug_package_exclude_files}
    373373%defattr(-, root, root, -)
    374374%doc LICENSE README
     
    382382%{_bindir}/python%{pybasever}.exe
    383383%{_mandir}/*/*
    384 %exclude %{_bindir}/*.dbg
    385384
    386385%dir %{pylibdir}
     
    388387%{dynload_dir}/Python-%{version}-py%{pybasever}.egg-info
    389388%{dynload_dir}/*.pyd
     389%exclude %{dynload_dir}/*.map
    390390%exclude %{dynload_dir}/_ctypes_test.pyd
    391391%exclude %{dynload_dir}/_ct3574.pyd
     
    438438%{_includedir}/python%{pybasever}/%{_pyconfig_h}
    439439
    440 %files libs
     440%files libs -f %{debug_package_exclude_files}
    441441%defattr(-,root,root,-)
    442442#%doc LICENSE README
     
    446446%doc systemtap-example.stp pyfuntop.stp
    447447%endif
    448 %exclude %{_libdir}/*.dbg
    449448%{pylibdir}/unittest/*
    450449
     
    517516
    518517%changelog
     518* Sat Jun 3 2017 Dmitriy Kuminov <coding@dmik.org> 2.7.6-18
     519- Put the LIBCx library to LDFLAGS rather than LIBS to have all module DLLs
     520  linked against it as well.
     521- Rebuild against LIBCx 0.5.3 to incorporate DosRead JFS workaround for fread.
     522- Remove urpo as it conflicts with LIBCx.
     523- Remove pthread from libraries as not needed any more.
     524- Remove .pyo files (needed only in python -O mode which is rarely used).
     525- Remove .dbg files for Windows stubs (wininst-*.exe).
     526- Use scm_source/scm_setup for downloading sources.
     527
    519528* Mon Apr 24 2017 yd <yd@os2power.com> 2.7.6-17
    520529- add new requirements and move unittest files. ticket#248.
Note: See TracChangeset for help on using the changeset viewer.