2006-12-19 00:17:38 +01:00
#
2011-02-17 18:32:10 +01:00
# spec file for package python
2006-12-19 00:17:38 +01:00
#
2018-01-02 16:34:11 +01:00
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
2006-12-19 00:17:38 +01:00
#
2008-08-08 02:47:35 +02:00
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
2006-12-19 00:17:38 +01:00
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
2016-06-30 12:50:57 +02:00
2006-12-19 00:17:38 +01:00
Name : python
2018-05-22 10:06:13 +02:00
Version : 2.7.15
2011-12-08 14:04:48 +01:00
Release : 0
Summary : Python Interpreter
2013-07-08 15:12:23 +02:00
License : Python-2.0
2006-12-19 00:17:38 +01:00
Group : Development/Languages/Python
2013-07-08 15:12:23 +02:00
Url : http://www.python.org/
2012-04-17 16:57:13 +02:00
%define tarversion %{version}
2011-12-08 14:04:48 +01:00
%define tarname Python-%{tarversion}
2013-06-03 17:40:08 +02:00
Source0 : http://www.python.org/ftp/python/%{version} /%{tarname} .tar.xz
2010-09-03 17:55:49 +02:00
Source1 : README.SUSE
Source2 : pythonstart
Source3 : python.sh
Source4 : python.csh
2015-09-14 17:36:31 +02:00
Source8 : sle_tls_checks_policy.py
2006-12-19 00:17:38 +01:00
#Source11: testfiles.tar.bz2
2007-07-27 15:45:45 +02:00
# issues with copyrighted Unicode testing files
2011-09-16 18:22:41 +02:00
2011-08-24 15:28:09 +02:00
# !!!!!!!!!!!!!!
# do not add or edit patches here. please edit python-base.spec
# instead and run pre_checkin.sh
# !!!!!!!!!!!!!!
# COMMON-PATCH-BEGIN
2010-09-03 17:55:49 +02:00
Patch1 : python-2.7-dirs.patch
2011-08-24 15:28:09 +02:00
Patch2 : python-distutils-rpm-8.patch
2013-06-03 17:40:08 +02:00
Patch3 : python-2.7.5-multilib.patch
2010-09-03 17:55:49 +02:00
Patch4 : python-2.5.1-sqlite.patch
2013-05-09 18:15:40 +02:00
Patch5 : python-2.7.4-canonicalize2.patch
2011-08-24 15:28:09 +02:00
Patch7 : python-2.6-gettext-plurals.patch
Patch8 : python-2.6b3-curses-panel.patch
2011-12-08 14:04:48 +01:00
Patch10 : sparc_longdouble.patch
2011-08-24 15:28:09 +02:00
Patch13 : python-2.7.2-fix_date_time_compiler.patch
2012-04-17 16:57:13 +02:00
Patch17 : remove-static-libpython.diff
2012-08-06 18:21:50 +02:00
# PATCH-FEATURE-OPENSUSE python-bundle-lang.patch bnc#617751 dimstar@opensuse.org -- gettext: when looking in default_localedir also check in locale-bundle.
Patch20 : python-bundle-lang.patch
2014-12-22 17:49:53 +01:00
# PATCH-FIX-UPSTREAM Fix argument passing in libffi for aarch64
Patch22 : python-2.7-libffi-aarch64.patch
2013-07-15 10:03:24 +02:00
Patch24 : python-bsddb6.diff
2015-02-25 17:42:06 +01:00
# PATCH-FIX-UPSTREAM accept directory-based CA paths as well
Patch33 : python-2.7.9-ssl_ca_path.patch
2015-05-21 15:58:17 +02:00
# PATCH-FEATURE-SLE disable SSL verification-by-default in http clients
Patch34 : python-2.7.9-sles-disable-verification-by-default.patch
2018-05-22 10:06:13 +02:00
# PATCH-FIX-UPSTREAM do not use non-ASCII filename in test_ssl.py
Patch35 : do-not-use-non-ascii-in-test_ssl.patch
2017-03-24 18:13:29 +01:00
# PATCH-FIX-UPSTREAM bmwiedemann@suse.de -- allow python packages to build reproducibly
Patch38 : reproducible.patch
2018-02-02 13:44:43 +01:00
# bypass boo#1078485 random failing tests
Patch40 : python-skip_random_failing_tests.patch
2018-02-20 14:42:29 +01:00
# PATCH-FIX-UPSTREAM sorted tar https://github.com/python/cpython/pull/2263
Patch41 : python-sorted_tar.patch
2011-08-24 15:28:09 +02:00
# COMMON-PATCH-END
2011-12-08 14:04:48 +01:00
BuildRequires : automake
BuildRequires : db-devel
BuildRequires : fdupes
BuildRequires : gdbm-devel
BuildRequires : gmp-devel
BuildRequires : libbz2-devel
2017-08-21 14:25:25 +02:00
BuildRequires : libnsl-devel
2011-12-08 14:04:48 +01:00
BuildRequires : libopenssl-devel
BuildRequires : ncurses-devel
BuildRequires : readline-devel
BuildRequires : sqlite-devel
BuildRequires : tk-devel
2013-06-03 17:40:08 +02:00
BuildRequires : xz
2015-05-21 15:52:43 +02:00
BuildRequires : pkgconfig(x11)
2011-12-08 14:31:32 +01:00
%define python_version %(echo %{tarversion} | head -c 3)
2006-12-19 00:17:38 +01:00
%define idle_name idle
2012-08-13 17:34:55 +02:00
Requires : python-base = %{version}
2015-09-14 17:36:31 +02:00
%if %{suse_version} == 1315 && !0%{?is_opensuse}
Recommends: python-strict-tls-check
%endif
2008-10-13 16:53:57 +02:00
Provides : %{name} = %{python_version}
2016-12-02 16:37:55 +01:00
Provides : python2 = %{version}
2011-12-08 14:04:48 +01:00
Obsoletes : python-elementtree
Obsoletes : python-nothreads
Obsoletes : python-sqlite
Obsoletes : python21
# bug437293
%ifarch ppc64
Obsoletes : python-64bit
%endif
BuildRoot : %{_tmppath} /%{name} -%{version} -build
2006-12-19 00:17:38 +01:00
%description
Python is an interpreted, object-oriented programming language, and is
often compared to Tcl, Perl, Scheme, or Java. You can find an overview
of Python in the documentation and tutorials included in the python-doc
(HTML) or python-doc-pdf (PDF) packages.
If you want to install third party modules using distutils, you need to
install python-devel package.
%package idle
Summary : An Integrated Development Environment for Python
Group : Development/Languages/Python
2012-08-13 17:34:55 +02:00
Requires : python-base = %{version}
2011-12-08 14:04:48 +01:00
Requires : python-tk
2016-12-02 16:37:55 +01:00
Provides : python2-idle = %{version}
2006-12-19 00:17:38 +01:00
%description idle
IDLE is a Tkinter based integrated development environment for Python.
It features a multi-window text editor with multiple undo, Python
colorizing, and many other things, as well as a Python shell window and
a debugger.
%package demo
Summary : Python Demonstration Scripts
Group : Development/Languages/Python
2012-08-13 17:34:55 +02:00
Requires : python-base = %{version}
2011-12-08 14:04:48 +01:00
Provides : pyth_dmo
Obsoletes : pyth_dmo
2016-12-02 16:37:55 +01:00
Provides : python2-demo = %{version}
2006-12-19 00:17:38 +01:00
%description demo
Various demonstrations of what you can do with Python and a number of
programs that are useful for building or extending Python.
%package tk
2011-12-08 14:04:48 +01:00
Summary : TkInter - Python Tk Interface
Group : Development/Libraries/Python
2012-08-13 17:34:55 +02:00
Requires : python-base = %{version}
2011-12-08 14:04:48 +01:00
Provides : pyth_tk
Provides : pyth_tkl
Provides : python-tkinter
Provides : python_tkinter_lib
2007-05-25 00:42:28 +02:00
#%ifarch %ix86
#Provides: _tkinter.so
#%endif
2011-12-08 14:04:48 +01:00
Obsoletes : pyth_tk
Obsoletes : pyth_tkl
Obsoletes : python-tkinter
2016-12-02 16:37:55 +01:00
Provides : python2-tk = %{version}
2006-12-19 00:17:38 +01:00
%description tk
Python interface to Tk. Tk is the GUI toolkit that comes with Tcl. The
" x r p m " package uses this Python interface.
%package curses
2011-12-08 14:04:48 +01:00
Summary : Python Interface to the (N)Curses Library
Group : Development/Libraries/Python
2012-08-13 17:34:55 +02:00
Requires : python-base = %{version}
2006-12-19 00:17:38 +01:00
Obsoletes : pyth_cur
Provides : pyth_cur
2016-12-02 16:37:55 +01:00
Provides : python2-curses = %{version}
2006-12-19 00:17:38 +01:00
%description curses
An easy to use interface to the (n)curses CUI library. CUI stands for
Console User Interface.
%package gdbm
2011-12-08 14:04:48 +01:00
Summary : Python Interface to the GDBM Library
Group : Development/Libraries/Python
2012-08-13 17:34:55 +02:00
Requires : python-base = %{version}
2006-12-19 00:17:38 +01:00
Obsoletes : pygdmod
Provides : pygdmod
2016-12-02 16:37:55 +01:00
Provides : python2-gdbm = %{version}
2006-12-19 00:17:38 +01:00
%description gdbm
An easy to use interface for GDBM databases. GDBM is the GNU
implementation of the standard Unix DBM databases.
2015-09-14 17:36:31 +02:00
%if %{suse_version} == 1315 && !0%{?is_opensuse}
%package strict-tls-check
Summary : Enable secure verification of TLS certificates
Group : Development/Libraries/Python
Requires : %{name} = %{version}
Supplements: %{name}
%description strict-tls-check
When this package is present, Python performs strict verification of
TLS certificates, including hostname check, by default. This is
the preferred secure setting.
It is distributed as a separate package, because this behavior
can cause verification errors in improperly written legacy scripts
that rely on earlier non-verification behavior.
%endif
2006-12-19 00:17:38 +01:00
%prep
%setup -q -n %{tarname}
2011-08-24 15:28:09 +02:00
# COMMON-PREP-BEGIN
2010-09-03 17:55:49 +02:00
%patch1 -p1
%patch2 -p1
2013-06-03 12:24:54 +02:00
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch7 -p1
%patch8 -p1
2011-05-04 16:18:55 +02:00
%patch10 -p1
2013-06-03 12:24:54 +02:00
%patch13 -p1
%patch17 -p1
2012-08-06 18:21:50 +02:00
%patch20 -p1
2013-06-03 17:40:08 +02:00
%patch22 -p1
2013-08-16 13:26:52 +02:00
%patch24 -p1
2015-02-25 17:42:06 +01:00
%patch33 -p1
2015-09-14 17:36:31 +02:00
%if %{suse_version} == 1315 && !0%{?is_opensuse}
2015-05-21 15:58:17 +02:00
%patch34 -p1
%endif
2015-09-10 16:02:25 +02:00
%patch35 -p1
2017-03-24 18:13:29 +01:00
%patch38 -p1
2018-02-02 13:44:43 +01:00
%ifarch ppc ppc64 ppc64le
%patch40 -p1
%endif
2018-02-20 14:42:29 +01:00
%patch41 -p1
2011-05-24 17:33:04 +02:00
# drop Autoconf version requirement
2013-05-09 18:15:40 +02:00
sed -i 's/^version_required/dnl version_required/' configure.ac
# COMMON-PREP-END
2006-12-19 00:17:38 +01:00
2015-09-14 17:36:31 +02:00
%if %{suse_version} == 1315 && !0%{?is_opensuse}
cp %{SOURCE8} Lib/
%endif
2006-12-19 00:17:38 +01:00
%build
2017-01-05 12:54:43 +01:00
export OPT=" %{optflags} - D O P E N S S L _ L O A D _ C O N F - f w r a p v "
2011-05-24 17:33:04 +02:00
2008-09-08 01:36:49 +02:00
autoreconf -f -i . # Modules/_ctypes/libffi
# prevent make from trying to rebuild asdl stuff, which requires existing
# python installation
touch Parser/asdl* Python/Python-ast.c Include/Python-ast.h
2011-05-24 17:33:04 +02:00
2011-12-08 14:04:48 +01:00
%configure \
2008-05-07 00:09:21 +02:00
--docdir=%{_docdir} /python \
2006-12-19 00:17:38 +01:00
--enable-ipv6 \
--with-fpectl \
--enable-shared \
--enable-unicode=ucs4
2011-05-24 17:33:04 +02:00
2016-06-30 15:10:14 +02:00
LD_LIBRARY_PATH=$PWD:$LD_LIBRARY_PATH \
make %{?_smp_mflags}
2008-09-24 00:12:56 +02:00
%check
2006-12-19 00:17:38 +01:00
# on hppa, the threading of glibc is quite broken. The tests just stop
# at some point, and the machine does not build anything more until a
2011-12-08 14:04:48 +01:00
# timeout several hours later.
2013-06-27 18:01:09 +02:00
%ifnarch hppa
2008-04-09 00:44:31 +02:00
# Limit virtual memory to avoid spurious failures
if test $(ulimit -v) = unlimited || test $(ulimit -v) -gt 10000000; then
ulimit -v 10000000 || :
fi
2012-05-15 16:17:54 +02:00
LIST=" t e s t _ u r l l i b t e s t _ s s l t e s t _ h a s h l i b t e s t _ h m a c t e s t _ u r l l i b 2 _ l o c a l n e t t e s t _ u n i c o d e d a t a t e s t _ t a r f i l e t e s t _ s q l i t e t e s t _ t c l t e s t _ d b m t e s t _ a n y d b m t e s t _ d u m b d b m t e s t _ g d b m t e s t _ w h i c h d b t e s t _ t k t e s t _ t t k _ t e x t o n l y t e s t _ b s d d b t e s t _ b s d d b 3 t e s t _ r e a d l i n e "
2012-03-29 19:39:12 +02:00
make test TESTOPTS=" $ L I S T " TESTPYTHONOPTS=" - R "
2006-12-19 00:17:38 +01:00
%endif
%install
2008-10-13 16:53:57 +02:00
# replace rest of /usr/local/bin/python or /usr/bin/python2.x with /usr/bin/python
2016-06-30 15:10:14 +02:00
find . -name '*.py' -type f | grep -vE " ^ . / P a r s e r / | ^ . / P y t h o n / " \
| xargs grep -lE '^#! *(/usr/.*bin/(env +)?)?python' \
| xargs sed -r -i -e '1s@^#![[:space:]]*(/usr/(local/)?bin/(env +)?)?python([0-9]+\.[0-9]+)?@#!/usr/bin/python@'
2007-07-27 15:45:45 +02:00
# the grep inbetween makes it much faster
2006-12-19 00:17:38 +01:00
########################################
# install it
########################################
2011-12-08 14:04:48 +01:00
%make_install OPT=" %{optflags} - f P I C "
2006-12-19 00:17:38 +01:00
########################################
# some cleanups
########################################
# remove hard links and replace them with symlinks
for dir in bin include %{_lib} ; do
2011-12-08 14:04:48 +01:00
rm -f %{buildroot} /%{_prefix} /$dir/python
ln -s python%{python_version} %{buildroot} /%{_prefix} /$dir/python
2006-12-19 00:17:38 +01:00
done
2008-09-08 01:36:49 +02:00
# kill imageop.so, it's insecure
2011-12-08 14:04:48 +01:00
rm -f %{buildroot} /%{_libdir} /python%{python_version} /lib-dynload/imageop.so
2008-09-24 00:12:56 +02:00
#cleanup for -base
2012-03-30 19:00:51 +02:00
rm %{buildroot} %{_bindir} /python%{python_version}
rm %{buildroot} %{_bindir} /python2
rm %{buildroot} %{_bindir} /python
2011-12-08 14:04:48 +01:00
rm %{buildroot} %{_bindir} /smtpd.py
rm %{buildroot} %{_bindir} /pydoc
rm %{buildroot} %{_bindir} /2to3
rm %{buildroot} %{_mandir} /man1/python*
rm %{buildroot} %{_libdir} /libpython*.so.*
rm %{buildroot} %{_libdir} /python
2015-09-14 17:36:31 +02:00
find %{buildroot} %{_libdir} /python%{python_version} -maxdepth 1 \
! \( -name " s s l . p y * " -o -name " s l e _ t l s _ c h e c k s _ p o l i c y . p y * " \) \
-exec rm {} " ; "
2011-12-08 14:04:48 +01:00
rm %{buildroot} %{_bindir} /python%{python_version} -config
2012-03-30 19:00:51 +02:00
rm %{buildroot} %{_bindir} /python2-config
2011-12-08 14:04:48 +01:00
rm %{buildroot} %{_bindir} /python-config
rm %{buildroot} %{_libdir} /pkgconfig/*
rm -r %{buildroot} %{_includedir} /python
rm -r %{buildroot} %{_includedir} /python%{python_version}
rm -r %{buildroot} %{_libdir} /python%{python_version} /compiler
rm -r %{buildroot} %{_libdir} /python%{python_version} /config
rm -r %{buildroot} %{_libdir} /python%{python_version} /ctypes
rm -r %{buildroot} %{_libdir} /python%{python_version} /distutils
rm -r %{buildroot} %{_libdir} /python%{python_version} /email
rm -r %{buildroot} %{_libdir} /python%{python_version} /encodings
2014-12-15 16:06:19 +01:00
rm -r %{buildroot} %{_libdir} /python%{python_version} /ensurepip
2011-12-08 14:04:48 +01:00
rm -r %{buildroot} %{_libdir} /python%{python_version} /hotshot
rm -r %{buildroot} %{_libdir} /python%{python_version} /importlib
rm -r %{buildroot} %{_libdir} /python%{python_version} /json
rm -r %{buildroot} %{_libdir} /python%{python_version} /lib2to3
rm -r %{buildroot} %{_libdir} /python%{python_version} /logging
rm -r %{buildroot} %{_libdir} /python%{python_version} /multiprocessing
rm -r %{buildroot} %{_libdir} /python%{python_version} /plat-*
rm -r %{buildroot} %{_libdir} /python%{python_version} /pydoc_data
rm -r %{buildroot} %{_libdir} /python%{python_version} /test
rm -r %{buildroot} %{_libdir} /python%{python_version} /unittest
rm -r %{buildroot} %{_libdir} /python%{python_version} /wsgiref
rm -r %{buildroot} %{_libdir} /python%{python_version} /xml
rm %{buildroot} %{_libdir} /libpython%{python_version} .so
rm %{buildroot} %{_libdir} /python%{python_version} /site-packages/README
rm %{buildroot} %{_libdir} /python%{python_version} /lib-dynload/_bisect.so
rm %{buildroot} %{_libdir} /python%{python_version} /lib-dynload/_csv.so
rm %{buildroot} %{_libdir} /python%{python_version} /lib-dynload/_collections.so
rm %{buildroot} %{_libdir} /python%{python_version} /lib-dynload/_ctypes.so
rm %{buildroot} %{_libdir} /python%{python_version} /lib-dynload/_ctypes_test.so
rm %{buildroot} %{_libdir} /python%{python_version} /lib-dynload/_elementtree.so
rm %{buildroot} %{_libdir} /python%{python_version} /lib-dynload/_functools.so
rm %{buildroot} %{_libdir} /python%{python_version} /lib-dynload/_heapq.so
rm %{buildroot} %{_libdir} /python%{python_version} /lib-dynload/_hotshot.so
rm %{buildroot} %{_libdir} /python%{python_version} /lib-dynload/_io.so
rm %{buildroot} %{_libdir} /python%{python_version} /lib-dynload/_json.so
rm %{buildroot} %{_libdir} /python%{python_version} /lib-dynload/_locale.so
rm %{buildroot} %{_libdir} /python%{python_version} /lib-dynload/_lsprof.so
rm %{buildroot} %{_libdir} /python%{python_version} /lib-dynload/_multiprocessing.so
rm %{buildroot} %{_libdir} /python%{python_version} /lib-dynload/_random.so
rm %{buildroot} %{_libdir} /python%{python_version} /lib-dynload/_socket.so
rm %{buildroot} %{_libdir} /python%{python_version} /lib-dynload/_struct.so
rm %{buildroot} %{_libdir} /python%{python_version} /lib-dynload/_testcapi.so
rm %{buildroot} %{_libdir} /python%{python_version} /lib-dynload/array.so
rm %{buildroot} %{_libdir} /python%{python_version} /lib-dynload/binascii.so
rm %{buildroot} %{_libdir} /python%{python_version} /lib-dynload/bz2.so
rm %{buildroot} %{_libdir} /python%{python_version} /lib-dynload/cPickle.so
rm %{buildroot} %{_libdir} /python%{python_version} /lib-dynload/cStringIO.so
rm %{buildroot} %{_libdir} /python%{python_version} /lib-dynload/cmath.so
rm %{buildroot} %{_libdir} /python%{python_version} /lib-dynload/crypt.so
rm %{buildroot} %{_libdir} /python%{python_version} /lib-dynload/datetime.so
rm %{buildroot} %{_libdir} /python%{python_version} /lib-dynload/fcntl.so
rm %{buildroot} %{_libdir} /python%{python_version} /lib-dynload/future_builtins.so
rm %{buildroot} %{_libdir} /python%{python_version} /lib-dynload/grp.so
rm %{buildroot} %{_libdir} /python%{python_version} /lib-dynload/itertools.so
rm %{buildroot} %{_libdir} /python%{python_version} /lib-dynload/linuxaudiodev.so
rm %{buildroot} %{_libdir} /python%{python_version} /lib-dynload/math.so
rm %{buildroot} %{_libdir} /python%{python_version} /lib-dynload/mmap.so
rm %{buildroot} %{_libdir} /python%{python_version} /lib-dynload/nis.so
rm %{buildroot} %{_libdir} /python%{python_version} /lib-dynload/operator.so
rm %{buildroot} %{_libdir} /python%{python_version} /lib-dynload/ossaudiodev.so
rm %{buildroot} %{_libdir} /python%{python_version} /lib-dynload/parser.so
rm %{buildroot} %{_libdir} /python%{python_version} /lib-dynload/pyexpat.so
rm %{buildroot} %{_libdir} /python%{python_version} /lib-dynload/resource.so
rm %{buildroot} %{_libdir} /python%{python_version} /lib-dynload/select.so
rm %{buildroot} %{_libdir} /python%{python_version} /lib-dynload/spwd.so
rm %{buildroot} %{_libdir} /python%{python_version} /lib-dynload/strop.so
rm %{buildroot} %{_libdir} /python%{python_version} /lib-dynload/syslog.so
rm %{buildroot} %{_libdir} /python%{python_version} /lib-dynload/termios.so
rm %{buildroot} %{_libdir} /python%{python_version} /lib-dynload/time.so
rm %{buildroot} %{_libdir} /python%{python_version} /lib-dynload/unicodedata.so
rm %{buildroot} %{_libdir} /python%{python_version} /lib-dynload/zlib.so
rm %{buildroot} %{_libdir} /python%{python_version} /lib-dynload/_codecs*.so
rm %{buildroot} %{_libdir} /python%{python_version} /lib-dynload/_multibytecodec.so
rm %{buildroot} %{_libdir} /python%{python_version} /lib-dynload/audioop.so
rm -f %{buildroot} %{_libdir} /python%{python_version} /lib-dynload/dl.so
2012-03-29 19:02:42 +02:00
rm %{buildroot} %{_libdir} /python%{python_version} /lib-dynload/Python-%{tarversion} -py%{python_version} .egg-info
2007-08-06 22:02:29 +02:00
# replace duplicate .pyo/.pyc with hardlinks
2011-12-08 14:04:48 +01:00
%fdupes %{buildroot} /%{_libdir} /python%{python_version}
2006-12-19 00:17:38 +01:00
########################################
# documentation
########################################
2011-12-08 14:04:48 +01:00
export PDOCS=%{buildroot} %{_docdir} /%{name}
2006-12-19 00:17:38 +01:00
install -d -m 755 $PDOCS
2011-12-08 14:04:48 +01:00
install -c -m 644 %{SOURCE1} $PDOCS/
2006-12-19 00:17:38 +01:00
install -c -m 644 LICENSE $PDOCS/
install -c -m 644 README $PDOCS/
########################################
# tools and demos
########################################
find Tools/ Demo/ -type d \( -regex " . * / . c v s i g n o r e " \) -exec rm -f \{\} \;
for x in `find Tools/ Demo/ \( -not -name Makefile \) -print | sort` ; do
test -d $x && ( install -c -m 755 -d $PDOCS/$x ) \
|| ( install -c -m 644 $x $PDOCS/$x )
done
########################################
# idle
########################################
# move idle config into /etc
2011-12-08 14:04:48 +01:00
install -d -m755 %{buildroot} %{_sysconfdir} /%{idle_name}
(
cd %{buildroot} /%{_libdir} /python%{python_version} /idlelib/
2006-12-19 00:17:38 +01:00
for file in *.def ; do
2011-12-08 14:04:48 +01:00
mv $file %{buildroot} %{_sysconfdir} /%{idle_name} /
ln -sf /etc/%{idle_name} /$file %{buildroot} /%{_libdir} /python%{python_version} /idlelib/
2006-12-19 00:17:38 +01:00
done
)
########################################
# startup script
########################################
2011-12-08 14:04:48 +01:00
install -m 644 %{SOURCE2} %{buildroot} /etc
install -d -m 755 %{buildroot} %{_sysconfdir} /profile.d
install -m 644 %{SOURCE3} %{SOURCE4} %{buildroot} %{_sysconfdir} /profile.d
2006-12-19 00:17:38 +01:00
2010-10-04 15:38:36 +02:00
%post -p /sbin/ldconfig
2006-12-19 00:17:38 +01:00
2010-10-04 15:38:36 +02:00
%postun -p /sbin/ldconfig
2006-12-19 00:17:38 +01:00
%files idle
%defattr (644, root, root, 755)
2011-12-08 14:04:48 +01:00
%dir %{_sysconfdir} /%{idle_name}
%config %{_sysconfdir} /%{idle_name} /*
2006-12-19 00:17:38 +01:00
%doc Lib/idlelib/NEWS.txt
%doc Lib/idlelib/README.txt
%doc Lib/idlelib/TODO.txt
%doc Lib/idlelib/extend.txt
%doc Lib/idlelib/ChangeLog
%{_libdir} /python%{python_version} /idlelib
%attr (755, root, root) %{_bindir} /%{idle_name}
%files demo
%defattr (644, root, root, 755)
%doc %{_docdir} /%{name} /Demo
%doc %{_docdir} /%{name} /Tools
%files tk
%defattr (644, root, root, 755)
%{_libdir} /python%{python_version} /lib-tk/
%{_libdir} /python%{python_version} /lib-dynload/_tkinter.so
%files curses
%defattr (644, root, root, 755)
%{_libdir} /python%{python_version} /curses
%{_libdir} /python%{python_version} /lib-dynload/_curses.so
%{_libdir} /python%{python_version} /lib-dynload/_curses_panel.so
%files gdbm
%defattr (644, root, root, 755)
%{_libdir} /python%{python_version} /lib-dynload/gdbm.so
2008-09-24 00:12:56 +02:00
%{_libdir} /python%{python_version} /lib-dynload/dbm.so
2006-12-19 00:17:38 +01:00
2015-09-14 17:36:31 +02:00
%if %{suse_version} == 1315 && !0%{?is_opensuse}
%files strict-tls-check
%defattr (644, root, root, 755)
%{_libdir} /python%{python_version} /sle_tls_checks_policy.py*
%endif
2006-12-19 00:17:38 +01:00
%files
%defattr (644, root, root, 755)
%dir %{_docdir} /%{name}
%doc %{_docdir} /%{name} /README
%doc %{_docdir} /%{name} /LICENSE
%doc %{_docdir} /%{name} /README.SUSE
2011-12-08 14:04:48 +01:00
%config %{_sysconfdir} /pythonstart
%config %{_sysconfdir} /profile.d/python.*
2006-12-19 00:17:38 +01:00
%dir %{_libdir} /python%{python_version}
2008-09-24 00:12:56 +02:00
%{_libdir} /python%{python_version} /ssl.py*
2008-12-19 15:13:49 +01:00
%{_libdir} /python%{python_version} /bsddb
2006-12-19 00:17:38 +01:00
%{_libdir} /python%{python_version} /sqlite3
%dir %{_libdir} /python%{python_version} /lib-dynload
2008-12-19 15:13:49 +01:00
%{_libdir} /python%{python_version} /lib-dynload/_bsddb.so
2006-12-19 00:17:38 +01:00
%{_libdir} /python%{python_version} /lib-dynload/_hashlib.so
2008-09-08 01:36:49 +02:00
%{_libdir} /python%{python_version} /lib-dynload/_sqlite3.so
2006-12-19 00:17:38 +01:00
%{_libdir} /python%{python_version} /lib-dynload/_ssl.so
%{_libdir} /python%{python_version} /lib-dynload/readline.so
2008-03-11 17:57:23 +01:00
2007-03-23 21:32:32 +01:00
%changelog