X-Git-Url: http://git.pld-linux.org/?a=blobdiff_plain;f=python.spec;h=abf5a57aa94b25a5588abff5cd77002543a39130;hb=1265a20;hp=f8dac6ac3f425a4950de90ef696968d320e99ad0;hpb=d9fe451a9d8761a4bacb329f1ded208298d4611f;p=packages%2Fpython.git diff --git a/python.spec b/python.spec index f8dac6a..ac2582f 100644 --- a/python.spec +++ b/python.spec @@ -1,7 +1,6 @@ # # TODO -# - test_distutils fails for unknown reason: (does it still do with new lib64 patch?) -# AssertionError: '/tmp/tmpaomC0l/installation/share/python' != '/tmp/tmpaomC0l/installation/lib/python' +# - test_pydoc fails because of PYTHONPATH override # - change searchpath order so /usr/lib* is before /usr/share # - kill lib-tk from searchpath # - kill BR: file requirement from lib64 patch @@ -13,24 +12,26 @@ %bcond_without tkinter # disables tkinter module building %bcond_without tests # disables Python testing %bcond_with verbose_tests # runs tests in verbose mode -%bcond_with openssl097 +%bcond_with openssl097 # build for openssl < 0.9.8 # # tests which will not work on 64-bit platforms %define no64bit_tests test_audioop test_rgbimg test_imageop # tests which may fail because of builder environment limitations (no /proc or /dev/pts) %define nobuilder_tests test_resource test_openpty test_socket test_nis test_posix test_locale test_pty test_urllib2 -# tests which fail because of some unknown/unresolved reason (this list should be empty) -%define broken_tests test_anydbm test_bsddb test_re test_shelve test_whichdb test_zipimport test_distutils +# tests which fail because of some unknown/unresolved reason (this list should be ideally just %{nil}) +%define broken_tests test_doctest test_pydoc test_distutils test_gdb %define beta %{nil} -%define py_ver 2.6 +%define py_ver 2.7 %define py_prefix %{_prefix} %define py_libdir %{py_prefix}/%{_lib}/python%{py_ver} %define py_incdir %{_includedir}/python%{py_ver} %define py_sitedir %{py_libdir}/site-packages +%define py_sitescriptdir %{_datadir}/python%{py_ver}/site-packages %define py_dyndir %{py_libdir}/lib-dynload +%define dver %{version} Summary: Very high level scripting language with X interface Summary(es.UTF-8): Lenguaje script de alto nivel con interfaz X Summary(fr.UTF-8): Langage de script de très haut niveau avec interface X @@ -40,23 +41,31 @@ Summary(ru.UTF-8): Язык программирования очень высо Summary(tr.UTF-8): X arayüzlü, yüksek düzeyli, kabuk yorumlayıcı dili Summary(uk.UTF-8): Мова програмування дуже високого рівня з X-інтерфейсом Name: python -Version: %{py_ver}.5 -%define dver %{version} -Release: 2 +Version: %{py_ver}.15 +Release: 4 Epoch: 1 License: PSF -Group: Applications -Source0: http://www.python.org/ftp/python/%{version}/Python-%{version}%{beta}.tar.bz2 -# Source0-md5: 6bef0417e71a1a1737ccf5750420fdb3 -Source1: http://www.python.org/ftp/python/doc/%{dver}/%{name}-%{dver}-docs-html.tar.bz2 -# Source1-md5: 4becde65eb92d8d24b503a44f6d01c62 -Patch1: %{name}-%{name}path.patch -Patch2: %{name}-no_ndbm.patch -Patch3: %{name}-ac_fixes.patch -Patch4: %{name}-noarch_to_datadir.patch -Patch5: %{name}-lib64.patch -URL: http://www.python.org/ -BuildRequires: autoconf +Group: Development/Languages/Python +Source0: https://www.python.org/ftp/python/%{version}/Python-%{version}%{beta}.tar.xz +# Source0-md5: a80ae3cc478460b922242f43a1b4094d +Source1: https://www.python.org/ftp/python/doc/%{dver}/%{name}-%{dver}-docs-html.tar.bz2 +# Source1-md5: e82bf965f5c6da914fb060640310e080 +Source2: pyconfig.h.in +Patch0: %{name}-db.patch +Patch1: %{name}-pythonpath.patch +Patch2: %{name}-ac_fixes.patch +Patch3: %{name}-multilib.patch +Patch4: %{name}-verbose.patch +Patch5: %{name}-distro.patch +Patch6: %{name}-DNStests.patch +Patch7: %{name}-install_prefix.patch +Patch8: %{name}-bdist_rpm.patch +# https://bugs.python.org/issue10496 +Patch9: https://bugs.python.org/file21896/nonexistent_user.patch +# Patch9-md5: db706fbe6de467c6e4c97c675eddf29a +URL: https://www.python.org/ +BuildRequires: autoconf >= 2.65 +BuildRequires: automake BuildRequires: bluez-libs-devel BuildRequires: bzip2-devel BuildRequires: db-devel >= 4 @@ -67,6 +76,7 @@ BuildRequires: gdbm-devel >= 1.8.3 BuildRequires: gmp-devel >= 4.0 BuildRequires: libstdc++-devel BuildRequires: ncurses-ext-devel >= 5.2 +BuildRequires: pkgconfig %if %{with openssl097} BuildRequires: openssl-devel < 0.9.8 %else @@ -77,10 +87,11 @@ BuildRequires: rpm-pythonprov BuildRequires: sed >= 4.0 BuildRequires: sqlite3-devel >= 3.3.5 %{?with_info:BuildRequires: tetex-makeindex} -%{?with_tkinter:BuildRequires: tix-devel >= 1:8.1.4-4} +#%{?with_tkinter:BuildRequires: tix-devel >= 1:8.1.4-4} %{?with_tkinter:BuildRequires: tk-devel >= 8.4.3} BuildRequires: zlib-devel Requires: %{name}-libs = %{epoch}:%{version}-%{release} +Suggests: python-pip Obsoletes: python2 Conflicts: bzr < 1.8 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) @@ -88,7 +99,7 @@ BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) %if %{with verbose_tests} %define test_flags -v -l -x %else -%define test_flags -l -x +%define test_flags -w -l -x %endif %ifarch alpha ia64 ppc64 ppc64 %{x8664} @@ -225,8 +236,11 @@ Summary: Python modules Summary(pl.UTF-8): Moduły języka Python Group: Libraries/Python Requires: %{name}-libs = %{epoch}:%{version}-%{release} +Provides: python-argparse = 1.1 Provides: python-cElementTree Provides: python-elementtree +Provides: pythonegg(argparse) = 1.1 +Obsoletes: python-argparse < 1.1.99 Obsoletes: python-cElementTree Obsoletes: python-ctypes Obsoletes: python-curses @@ -240,6 +254,7 @@ Obsoletes: python-ssl Obsoletes: python-xml Obsoletes: python-xmlrpc <= 1.0.1 Obsoletes: python-zlib +%requires_ge_to openssl openssl-devel %description modules Python officially distributed modules. @@ -276,7 +291,7 @@ Interaktywne korzystanie z dokumentacji modułów języka Python. %package -n idle Summary: IDE for Python language Summary(pl.UTF-8): IDE dla języka Python -Group: Applications +Group: Applications/Editors Requires: %{name}-tkinter = %{epoch}:%{version}-%{release} Obsoletes: python-idle @@ -298,6 +313,7 @@ Summary(tr.UTF-8): Python ile geliştirme yapmak için gerekli dosyalar Summary(uk.UTF-8): Бібліотеки та хедери для програмування на мові Python Group: Development/Languages/Python Requires: %{name}-libs = %{epoch}:%{version}-%{release} +Requires: %{name}-modules = %{epoch}:%{version}-%{release} Obsoletes: python2-devel %description devel @@ -378,7 +394,7 @@ debugger. %package 2to3 Summary: Automated Python 2 to 3 code translation -Summary(pl.UTF-8): Automatyczne tłumaczenie kody Pythona 2 do 3 +Summary(pl.UTF-8): Automatyczne tłumaczenie kodu Pythona 2 na 3 Group: Development/Languages/Python %description 2to3 @@ -390,6 +406,16 @@ generic library, so it is possible to write your own fixers for 2to3. lib2to3 could also be adapted to custom applications in which Python code needs to be edited automatically. +%description 2to3 -l pl.UTF-8 +2to3 to program w Pythonie czytający od źródłowy w Pythonie 2.x i +aplikujący serię poprawek przekształcających go w poprawny kod w +Pythonie 3.x. Biblioteka standardowa zawiera duży zbiór poprawek +obsługujących większość kodu. Biblioteka wspierająca 2to3 (lib2to3) +jest jednak elastyczną i ogólną biblioteką, więc można pisać własne +poprawki dla 2to3. lib2to3 można także zaadaptować na potrzeby +własnych zastosowań, w których kod w Pythonie musi być modyfikowany +automatycznie. + %package static Summary: Static python library Summary(pl.UTF-8): Statyczna biblioteka Pythona @@ -530,33 +556,66 @@ Przykładowe programy w Pythonie. Przykłady te są dla Pythona 2.3.4, nie %{version}. +%package test +Summary: Python test modules +Summary(pl.UTF-8): Moduły testowe Pythona +Group: Development/Languages/Python +Requires: %{name}-modules = %{epoch}:%{version}-%{release} +Suggests: %{name}-devel-src = %{epoch}:%{version}-%{release} + +%description test +Python test modules. + +Unit tests for Python, some may be reused for testing other Python +software. + +%description test -l pl.UTF-8 +Moduły testowe Pythona. + +Niektóre z nich mogą być używane do testowania oprogramowania +napisanego w Pythonie. + %prep %setup -q -n Python-%{version}%{beta} +%patch0 -p1 %patch1 -p1 %patch2 -p1 %patch3 -p1 -%patch5 -p1 %patch4 -p1 +%patch5 -p1 +%patch6 -p1 +%patch7 -p1 +%patch8 -p1 +%patch9 -p1 tar xjf %{SOURCE1} +sed -i -e 's#db_setup_debug = False#db_setup_debug = True#g' setup.py + +# remove if Lib/plat-linux3 exists +[ -d Lib/plat-linux3 ] && exit 1 +cp -a Lib/plat-linux2 Lib/plat-linux3 + %build -sed -i -e 's#-ltermcap#-ltinfo#g' configure* +%{__aclocal} %{__autoconf} -CPPFLAGS="-I/usr/include/ncursesw %{rpmcppflags}"; export CPPFLAGS %configure \ + CC="%{__cc}" \ + OPT="%{rpmcflags}" \ + CPPFLAGS="%{rpmcppflags}" \ + LDFLAGS="%{rpmldflags}" \ + ac_cv_posix_semaphores_enabled=yes \ + ac_cv_broken_sem_getvalue=no \ + %{?with_debug:--with-pydebug} \ --with-threads \ - --with-cxx-main="%{__cxx}" \ + --with-system-ffi \ --enable-ipv6 \ --enable-unicode=ucs4 \ --enable-shared \ - LINKCC='$(PURIFY) $(CXX)' \ - LDSHARED='$(CC) $(CFLAGS) -shared' \ - BLDSHARED='$(CC) $(CFLAGS) -shared' \ - LDFLAGS="%{rpmcflags} %{rpmldflags}" + --with-dbmliborder=gdbm:bdb \ + --without-ensurepip -%{__make} \ - OPT="%{rpmcflags}" 2>&1 | awk ' +%{__make} 2>&1 | awk ' BEGIN { fail = 0; logmsg = ""; } { if ($0 ~ /\*\*\* WARNING:/) { @@ -567,19 +626,19 @@ BEGIN { fail = 0; logmsg = ""; } } END { if (fail) { print "\nPROBLEMS FOUND:"; print logmsg; exit(1); } }' -LC_ALL=C -export LC_ALL %if %{with tests} -binlibdir="`pwd`/`echo build/lib.*`" -%{__make} test \ +LC_ALL=C.UTF-8 \ +WITHIN_PYTHON_RPM_BUILD=1 %{__make} -j1 test \ TESTOPTS="%{test_flags} %{test_list}" \ - TESTPYTHON="LD_LIBRARY_PATH=`pwd` PYTHONHOME=`pwd` PYTHONPATH=`pwd`/Lib:$binlibdir ./python -tt" + TESTPYTHON="LD_LIBRARY_PATH=`pwd` PYTHONHOME=`pwd` PYTHONPATH=`pwd`/Lib:`pwd`/Lib/lib-tk:`pwd`/build/lib.linux-`uname -m`-%{py_ver} ./python -tt" %endif %install rm -rf $RPM_BUILD_ROOT install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir}} \ $RPM_BUILD_ROOT{%{py_sitedir},%{_mandir}/man1} \ + $RPM_BUILD_ROOT%{_prefix}/local/%{_lib}/python%{py_ver}/site-packages \ + $RPM_BUILD_ROOT%{py_sitescriptdir} \ $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} \ $RPM_BUILD_ROOT%{_infodir} \ $RPM_BUILD_ROOT%{_docdir} \ @@ -593,10 +652,10 @@ ln -sf python-doc-%{version} $RPM_BUILD_ROOT%{_docdir}/python-doc %if %{with info} %{__make} -C Doc/info -install Doc/info/python*info* $RPM_BUILD_ROOT%{_infodir} +cp -p Doc/info/python*info* $RPM_BUILD_ROOT%{_infodir} %endif -install Makefile.pre.in $RPM_BUILD_ROOT%{py_libdir}/config +cp -p Makefile.pre.in $RPM_BUILD_ROOT%{py_libdir}/config mv $RPM_BUILD_ROOT{%{py_libdir}/config,%{_libdir}}/libpython%{py_ver}.a ln -sf libpython%{py_ver}.a $RPM_BUILD_ROOT%{_libdir}/libpython.a @@ -623,33 +682,36 @@ sed 's/=/ /' \ for script in smtpd webbrowser; do echo alias $script.py=\"python -m ${script}\" done > $RPM_BUILD_ROOT/etc/shrc.d/python-modules.sh +%{__rm} $RPM_BUILD_ROOT%{_bindir}/smtpd.py sed 's/=/ /' \ < $RPM_BUILD_ROOT/etc/shrc.d/python-modules.sh \ > $RPM_BUILD_ROOT/etc/shrc.d/python-modules.csh # just to cut the noise, as they are not packaged (now) -# first tests -rm -r $RPM_BUILD_ROOT%{py_scriptdir}/test -rm -r $RPM_BUILD_ROOT%{py_scriptdir}/bsddb/test -rm -r $RPM_BUILD_ROOT%{py_scriptdir}/ctypes/test -rm -r $RPM_BUILD_ROOT%{py_scriptdir}/distutils/tests -rm -r $RPM_BUILD_ROOT%{py_scriptdir}/email/test -rm -r $RPM_BUILD_ROOT%{py_scriptdir}/sqlite3/test -rm -r $RPM_BUILD_ROOT%{py_scriptdir}/json/tests -rm -r $RPM_BUILD_ROOT%{py_scriptdir}/lib2to3/tests - -# other files -rm -r $RPM_BUILD_ROOT%{py_scriptdir}/plat-*/regen -find $RPM_BUILD_ROOT%{py_scriptdir} -name \*.egg-info -exec rm {} \; -find $RPM_BUILD_ROOT%{py_scriptdir} -name \*.bat -exec rm {} \; -find $RPM_BUILD_ROOT%{py_scriptdir} -name \*.txt -exec rm {} \; -find $RPM_BUILD_ROOT%{py_scriptdir} -name README\* -exec rm {} \; +%{__rm} $RPM_BUILD_ROOT%{py_libdir}/ctypes/macholib/fetch_macholib +%{__rm} $RPM_BUILD_ROOT%{py_libdir}/distutils/command/command_template +%{__rm} $RPM_BUILD_ROOT%{py_libdir}/distutils/command/wininst-*.exe +%{__rm} -r $RPM_BUILD_ROOT%{py_libdir}/idlelib/idle_test +%{__rm} $RPM_BUILD_ROOT%{py_libdir}/idlelib/ChangeLog +%{__rm} $RPM_BUILD_ROOT%{py_libdir}/idlelib/help.html +%{__rm} $RPM_BUILD_ROOT%{py_libdir}/idlelib/idle.pyw +%{__rm} -r $RPM_BUILD_ROOT%{py_libdir}/plat-*/regen +# packaged as %doc +%{__rm} $RPM_BUILD_ROOT%{py_libdir}/pdb.doc + +find $RPM_BUILD_ROOT%{py_libdir} -name \*.bat -exec rm {} \; +find $RPM_BUILD_ROOT%{py_libdir} -name \*.txt -exec rm {} \; +find $RPM_BUILD_ROOT%{py_libdir} -name README\* -exec rm {} \; + +%{__mv} $RPM_BUILD_ROOT%{py_incdir}/pyconfig.h $RPM_BUILD_ROOT%{py_libdir}/config/pyconfig.h +sed -e's#@PREFIX@#%{_prefix}#g;s#@PY_VER@#%{py_ver}#g' %{SOURCE2} > $RPM_BUILD_ROOT%{py_incdir}/pyconfig.h %clean rm -rf $RPM_BUILD_ROOT %post libs -p /sbin/ldconfig + %postun libs -p /sbin/ldconfig %post doc-info -p /sbin/postshell @@ -661,31 +723,42 @@ rm -rf $RPM_BUILD_ROOT %files %defattr(644,root,root,755) %attr(755,root,root) %{_bindir}/python +%attr(755,root,root) %{_bindir}/python2 %attr(755,root,root) %{_bindir}/python%{py_ver} %{_mandir}/man1/python.1* +%{_mandir}/man1/python2.1* %files modules %defattr(644,root,root,755) -/etc/shrc.d/python-modules* -%exclude %{py_scriptdir}/UserDict.py[co] -%exclude %{py_scriptdir}/codecs.py[co] -%exclude %{py_scriptdir}/copy_reg.py[co] -%exclude %{py_scriptdir}/locale.py[co] -%exclude %{py_scriptdir}/posixpath.py[co] -%exclude %{py_scriptdir}/pdb.py[co] -%exclude %{py_scriptdir}/profile.py[co] -%exclude %{py_scriptdir}/pstats.py[co] -%exclude %{py_scriptdir}/pydoc.py[co] -%exclude %{py_scriptdir}/site.py[co] -%exclude %{py_scriptdir}/stat.py[co] -%exclude %{py_scriptdir}/timeit.py[co] -%exclude %{py_scriptdir}/os.py[co] -%exclude %{py_scriptdir}/encodings/*.py[co] -%exclude %{py_scriptdir}/types.py[co] - -%{py_scriptdir}/*.py[co] - -%{py_dyndir}/*.egg-info +%doc Lib/pdb.doc +%config(noreplace) %verify(not md5 mtime size) /etc/shrc.d/python-modules* +%exclude %{py_libdir}/_abcoll.py[co] +%exclude %{py_libdir}/abc.py[co] +%exclude %{py_libdir}/UserDict.py[co] +%exclude %{py_libdir}/codecs.py[co] +%exclude %{py_libdir}/copy_reg.py[co] +%exclude %{py_libdir}/genericpath.py[co] +%exclude %{py_libdir}/linecache.py[co] +%exclude %{py_libdir}/locale.py[co] +%exclude %{py_libdir}/posixpath.py[co] +%exclude %{py_libdir}/profile.py[co] +%exclude %{py_libdir}/pstats.py[co] +%exclude %{py_libdir}/pydoc.py[co] +%exclude %{py_libdir}/re.py[co] +%exclude %{py_libdir}/site.py[co] +%exclude %{py_libdir}/sre_*.py[co] +%exclude %{py_libdir}/stat.py[co] +%exclude %{py_libdir}/sysconfig.py[co] +%exclude %{py_libdir}/timeit.py[co] +%exclude %{py_libdir}/os.py[co] +%exclude %{py_libdir}/_weakrefset.py[co] +%exclude %{py_libdir}/encodings/*.py[co] +%exclude %{py_libdir}/types.py[co] +%exclude %{py_libdir}/warnings.py[co] + +%{py_libdir}/*.py[co] + +%{py_dyndir}/Python-%{version}-py%{py_ver}.egg-info # # list .so modules to be sure that all of them are built @@ -694,18 +767,17 @@ rm -rf $RPM_BUILD_ROOT # three modules below do not work on 64-bit architectures # see Python README file for explanation %ifnarch alpha ia64 ppc64 sparc64 %{x8664} -%attr(755,root,root) %{py_dyndir}/audioop.so %attr(755,root,root) %{py_dyndir}/imageop.so # sizeof(long) != sizeof(int), so dl module will not be built on 64-bit # platforms %attr(755,root,root) %{py_dyndir}/dl.so %endif +%attr(755,root,root) %{py_dyndir}/audioop.so %attr(755,root,root) %{py_dyndir}/array.so %attr(755,root,root) %{py_dyndir}/binascii.so %attr(755,root,root) %{py_dyndir}/_bisect.so %attr(755,root,root) %{py_dyndir}/_bsddb.so -%attr(755,root,root) %{py_dyndir}/_bytesio.so %attr(755,root,root) %{py_dyndir}/bz2.so %attr(755,root,root) %{py_dyndir}/cmath.so %attr(755,root,root) %{py_dyndir}/_codecs_cn.so @@ -725,9 +797,9 @@ rm -rf $RPM_BUILD_ROOT %attr(755,root,root) %{py_dyndir}/datetime.so %attr(755,root,root) %{py_dyndir}/_elementtree.so %attr(755,root,root) %{py_dyndir}/_functools.so -%attr(755,root,root) %{py_dyndir}/_fileio.so %attr(755,root,root) %{py_dyndir}/_hashlib.so %attr(755,root,root) %{py_dyndir}/_heapq.so +%attr(755,root,root) %{py_dyndir}/_io.so %attr(755,root,root) %{py_dyndir}/_json.so %attr(755,root,root) %{py_dyndir}/_locale.so %attr(755,root,root) %{py_dyndir}/_lsprof.so @@ -738,7 +810,6 @@ rm -rf $RPM_BUILD_ROOT %attr(755,root,root) %{py_dyndir}/_socket.so %attr(755,root,root) %{py_dyndir}/_ssl.so %attr(755,root,root) %{py_dyndir}/_testcapi.so -%attr(755,root,root) %{py_dyndir}/_weakref.so %ifnarch sparc64 %attr(755,root,root) %{py_dyndir}/dbm.so %endif @@ -766,120 +837,158 @@ rm -rf $RPM_BUILD_ROOT %attr(755,root,root) %{py_dyndir}/unicodedata.so %attr(755,root,root) %{py_dyndir}/zlib.so -%dir %{py_scriptdir}/plat-* -%{py_scriptdir}/plat-*/*.py[co] +%dir %{py_libdir}/plat-* +%{py_libdir}/plat-*/*.py[co] + +%dir %{py_libdir}/bsddb +%{py_libdir}/bsddb/*.py[co] -%dir %{py_scriptdir}/bsddb -%{py_scriptdir}/bsddb/*.py[co] +%dir %{py_libdir}/compiler +%{py_libdir}/compiler/*.py[co] -%dir %{py_scriptdir}/compiler -%{py_scriptdir}/compiler/*.py[co] +%dir %{py_libdir}/ctypes +%dir %{py_libdir}/ctypes/macholib +%{py_libdir}/ctypes/*.py[co] +%{py_libdir}/ctypes/macholib/*.py[co] -%dir %{py_scriptdir}/ctypes -%dir %{py_scriptdir}/ctypes/macholib -%{py_scriptdir}/ctypes/*.py[co] -%{py_scriptdir}/ctypes/macholib/*.py[co] +%dir %{py_libdir}/curses +%{py_libdir}/curses/*.py[co] -%dir %{py_scriptdir}/curses -%{py_scriptdir}/curses/*.py[co] +%dir %{py_libdir}/distutils +%dir %{py_libdir}/distutils/command +%{py_libdir}/distutils/*.py[co] +%{py_libdir}/distutils/command/*.py[co] -%dir %{py_scriptdir}/distutils -%dir %{py_scriptdir}/distutils/command -%{py_scriptdir}/distutils/*.py[co] -%{py_scriptdir}/distutils/command/*.py[co] +%dir %{py_libdir}/email +%dir %{py_libdir}/email/mime +%{py_libdir}/email/*.py[co] +%{py_libdir}/email/mime/*.py[co] -%dir %{py_scriptdir}/email -%dir %{py_scriptdir}/email/mime -%{py_scriptdir}/email/*.py[co] -%{py_scriptdir}/email/mime/*.py[co] +%dir %{py_libdir}/ensurepip +%{py_libdir}/ensurepip/*.py[co] +%{py_libdir}/ensurepip/_bundled -%dir %{py_scriptdir}/json -%{py_scriptdir}/json/*.py[co] +%dir %{py_libdir}/idlelib -%dir %{py_scriptdir}/logging -%{py_scriptdir}/logging/*.py[co] +%dir %{py_libdir}/importlib +%{py_libdir}/importlib/*.py[co] -%dir %{py_scriptdir}/multiprocessing -%dir %{py_scriptdir}/multiprocessing/dummy -%{py_scriptdir}/multiprocessing/*.py[co] -%{py_scriptdir}/multiprocessing/dummy/*.py[co] +%dir %{py_libdir}/json +%{py_libdir}/json/*.py[co] -%dir %{py_scriptdir}/wsgiref -%{py_scriptdir}/wsgiref/*.py[co] +%dir %{py_libdir}/logging +%{py_libdir}/logging/*.py[co] -%dir %{py_scriptdir}/xml -%dir %{py_scriptdir}/xml/dom -%dir %{py_scriptdir}/xml/etree -%dir %{py_scriptdir}/xml/parsers -%dir %{py_scriptdir}/xml/sax -%{py_scriptdir}/xml/*.py[co] -%{py_scriptdir}/xml/dom/*.py[co] -%{py_scriptdir}/xml/etree/*.py[co] -%{py_scriptdir}/xml/parsers/*.py[co] -%{py_scriptdir}/xml/sax/*.py[co] +%dir %{py_libdir}/multiprocessing +%dir %{py_libdir}/multiprocessing/dummy +%{py_libdir}/multiprocessing/*.py[co] +%{py_libdir}/multiprocessing/dummy/*.py[co] + +%dir %{py_libdir}/unittest +%{py_libdir}/unittest/*.py[co] +%dir %{py_libdir}/unittest/test +%{py_libdir}/unittest/test/*.py[co] + +%dir %{py_libdir}/wsgiref +%{py_libdir}/wsgiref/*.py[co] +%{py_libdir}/wsgiref.egg-info + +%dir %{py_libdir}/xml +%dir %{py_libdir}/xml/dom +%dir %{py_libdir}/xml/etree +%dir %{py_libdir}/xml/parsers +%dir %{py_libdir}/xml/sax +%{py_libdir}/xml/*.py[co] +%{py_libdir}/xml/dom/*.py[co] +%{py_libdir}/xml/etree/*.py[co] +%{py_libdir}/xml/parsers/*.py[co] +%{py_libdir}/xml/sax/*.py[co] %files modules-sqlite %defattr(644,root,root,755) %attr(755,root,root) %{py_dyndir}/_sqlite3.so -%dir %{py_scriptdir}/sqlite3 -%{py_scriptdir}/sqlite3/*.py[co] +%dir %{py_libdir}/sqlite3 +%{py_libdir}/sqlite3/*.py[co] %files libs %defattr(644,root,root,755) -%attr(755,root,root) %{_libdir}/libpython*.so.* +%attr(755,root,root) %{_libdir}/libpython%{py_ver}.so.* %dir %{py_dyndir} -%dir %{py_scriptdir} %dir %{py_libdir} +%dir %{_datadir}/python%{py_ver} %dir %{py_sitescriptdir} %dir %{py_sitedir} +# for locally installed packages +%dir %{_prefix}/local/%{_lib}/python%{py_ver}/site-packages + # shared modules required by python library %attr(755,root,root) %{py_dyndir}/_struct.so # modules required by python library -%{py_scriptdir}/UserDict.py[co] -%{py_scriptdir}/codecs.py[co] -%{py_scriptdir}/copy_reg.py[co] -%{py_scriptdir}/locale.py[co] -%{py_scriptdir}/posixpath.py[co] -%{py_scriptdir}/site.py[co] -%{py_scriptdir}/stat.py[co] -%{py_scriptdir}/os.py[co] +%{py_libdir}/_abcoll.py[co] +%{py_libdir}/abc.py[co] +%{py_libdir}/UserDict.py[co] +%{py_libdir}/codecs.py[co] +%{py_libdir}/copy_reg.py[co] +%{py_libdir}/genericpath.py[co] +%{py_libdir}/linecache.py[co] +%{py_libdir}/locale.py[co] +%{py_libdir}/posixpath.py[co] +%{py_libdir}/re.py[co] +%{py_libdir}/site.py[co] +%{py_libdir}/sre_*.py[co] +%{py_libdir}/stat.py[co] +%{py_libdir}/sysconfig.py[co] +%{py_libdir}/os.py[co] +%{py_libdir}/_weakrefset.py[co] # needed by the dynamic sys.lib patch -%{py_scriptdir}/types.py[co] +%{py_libdir}/types.py[co] +%{py_libdir}/warnings.py[co] # encodings required by python library -%dir %{py_scriptdir}/encodings -%{py_scriptdir}/encodings/*.py[co] +%dir %{py_libdir}/encodings +%{py_libdir}/encodings/*.py[co] + +# required by sysconfig.py +%dir %{py_libdir}/config +%{py_libdir}/config/Makefile +%{py_libdir}/config/pyconfig.h +%dir %{py_incdir} +%{py_incdir}/pyconfig.h %files -n pydoc %defattr(644,root,root,755) %attr(755,root,root) %{_bindir}/pydoc -%{py_scriptdir}/pydoc.py[co] +%{py_libdir}/pydoc.py[co] +%dir %{py_libdir}/pydoc_data +%{py_libdir}/pydoc_data/*.py[co] %files -n idle %defattr(644,root,root,755) %attr(755,root,root) %{_bindir}/idle -%dir %{py_scriptdir}/idlelib -%dir %{py_scriptdir}/idlelib/Icons -%{py_scriptdir}/idlelib/*.py[co] -%{py_scriptdir}/idlelib/Icons/* -%{py_scriptdir}/idlelib/*.def +%dir %{py_libdir}/idlelib/Icons +%{py_libdir}/idlelib/*.py[co] +%{py_libdir}/idlelib/Icons/* +%{py_libdir}/idlelib/*.def %files devel %defattr(644,root,root,755) %doc Misc/{ACKS,NEWS,README,README.valgrind,valgrind-python.supp} %attr(755,root,root) %{_bindir}/python-config +%attr(755,root,root) %{_bindir}/python2-config %attr(755,root,root) %{_bindir}/python%{py_ver}-config -%attr(755,root,root) %{_libdir}/lib*.so -%dir %{py_incdir} +%attr(755,root,root) %{_libdir}/libpython%{py_ver}.so +%attr(755,root,root) %{_libdir}/libpython.so %{py_incdir}/*.h +%exclude %{py_incdir}/pyconfig.h +%{_pkgconfigdir}/python.pc +%{_pkgconfigdir}/python2.pc +%{_pkgconfigdir}/python-%{py_ver}.pc -%dir %{py_libdir}/config %attr(755,root,root) %{py_libdir}/config/makesetup %attr(755,root,root) %{py_libdir}/config/install-sh -%{py_libdir}/config/Makefile %{py_libdir}/config/Makefile.pre.in %{py_libdir}/config/Setup %{py_libdir}/config/Setup.config @@ -890,67 +999,81 @@ rm -rf $RPM_BUILD_ROOT %files devel-src %defattr(644,root,root,755) -%attr(-,root,root) %{py_scriptdir}/*.py -%{py_scriptdir}/plat-*/*.py -%{py_scriptdir}/bsddb/*.py -%{py_scriptdir}/ctypes/*.py -%{py_scriptdir}/ctypes/macholib/*.py -%{py_scriptdir}/compiler/*.py -%{py_scriptdir}/curses/*.py -%{py_scriptdir}/distutils/*.py -%{py_scriptdir}/distutils/command/*.py -%{py_scriptdir}/email/*.py -%{py_scriptdir}/email/mime/*.py -%{py_scriptdir}/hotshot/*.py -%{py_scriptdir}/json/*.py -%{py_scriptdir}/lib2to3/*.py -%{py_scriptdir}/lib2to3/fixes/*.py -%{py_scriptdir}/lib2to3/pgen2/*.py -%{py_scriptdir}/logging/*.py -%{py_scriptdir}/multiprocessing/*.py -%{py_scriptdir}/multiprocessing/dummy/*.py -%{py_scriptdir}/sqlite3/*.py -%{py_scriptdir}/wsgiref/*.py -%{py_scriptdir}/xml/*.py -%{py_scriptdir}/xml/dom/*.py -%{py_scriptdir}/xml/etree/*.py -%{py_scriptdir}/xml/parsers/*.py -%{py_scriptdir}/xml/sax/*.py -%{py_scriptdir}/encodings/*.py -%{py_scriptdir}/idlelib/*.py +%attr(-,root,root) %{py_libdir}/*.py +%{py_libdir}/plat-*/*.py +%{py_libdir}/bsddb/*.py +%{py_libdir}/ctypes/*.py +%{py_libdir}/ctypes/macholib/*.py +%{py_libdir}/compiler/*.py +%{py_libdir}/curses/*.py +%{py_libdir}/distutils/*.py +%{py_libdir}/distutils/command/*.py +%{py_libdir}/email/*.py +%{py_libdir}/email/mime/*.py +%{py_libdir}/encodings/*.py +%{py_libdir}/hotshot/*.py +%{py_libdir}/ensurepip/*.py +%{py_libdir}/idlelib/*.py +%{py_libdir}/importlib/*.py +%{py_libdir}/json/*.py +%{py_libdir}/lib2to3/*.py +%{py_libdir}/lib2to3/fixes/*.py +%{py_libdir}/lib2to3/pgen2/*.py +%{py_libdir}/logging/*.py +%{py_libdir}/multiprocessing/*.py +%{py_libdir}/multiprocessing/dummy/*.py +%{py_libdir}/pydoc_data/*.py +%{py_libdir}/sqlite3/*.py +%{py_libdir}/unittest/*.py +%{py_libdir}/unittest/test/*.py +%{py_libdir}/wsgiref/*.py +%{py_libdir}/xml/*.py +%{py_libdir}/xml/dom/*.py +%{py_libdir}/xml/etree/*.py +%{py_libdir}/xml/parsers/*.py +%{py_libdir}/xml/sax/*.py %files devel-tools %defattr(644,root,root,755) -%doc Lib/pdb.doc -/etc/shrc.d/python-devel* +%config(noreplace) %verify(not md5 mtime size) /etc/shrc.d/python-devel* %attr(755,root,root) %{py_dyndir}/_hotshot.so -%dir %{py_scriptdir}/hotshot -%{py_scriptdir}/hotshot/*.py[co] -%{py_scriptdir}/pdb.py[co] -%{py_scriptdir}/profile.py[co] -%{py_scriptdir}/pstats.py[co] -%{py_scriptdir}/timeit.py[co] +%dir %{py_libdir}/hotshot +%{py_libdir}/hotshot/*.py[co] +%{py_libdir}/profile.py[co] +%{py_libdir}/pstats.py[co] +%{py_libdir}/timeit.py[co] %files 2to3 %defattr(644,root,root,755) %attr(755,root,root) %{_bindir}/2to3 -%dir %{py_scriptdir}/lib2to3 -%dir %{py_scriptdir}/lib2to3/fixes -%dir %{py_scriptdir}/lib2to3/pgen2 -%{py_scriptdir}/lib2to3/*.py[co] -%{py_scriptdir}/lib2to3/*.pickle -%{py_scriptdir}/lib2to3/fixes/*.py[co] -%{py_scriptdir}/lib2to3/pgen2/*.py[co] +%dir %{py_libdir}/lib2to3 +%dir %{py_libdir}/lib2to3/fixes +%dir %{py_libdir}/lib2to3/pgen2 +%{py_libdir}/lib2to3/*.py[co] +%{py_libdir}/lib2to3/*.pickle +%{py_libdir}/lib2to3/fixes/*.py[co] +%{py_libdir}/lib2to3/pgen2/*.py[co] %files static %defattr(644,root,root,755) -%{_libdir}/lib*.a +%{_libdir}/libpython%{py_ver}.a +%{_libdir}/libpython.a %files examples %defattr(644,root,root,755) %{_examplesdir}/%{name}-%{version} +%files test +%defattr(644,root,root,755) +%{py_libdir}/test +%{py_libdir}/bsddb/test +%{py_libdir}/ctypes/test +%{py_libdir}/distutils/tests +%{py_libdir}/email/test +%{py_libdir}/sqlite3/test +%{py_libdir}/json/tests +%{py_libdir}/lib2to3/tests %files doc %defattr(644,root,root,755) @@ -966,6 +1089,6 @@ rm -rf $RPM_BUILD_ROOT %if %{with tkinter} %files tkinter %defattr(644,root,root,755) -%{py_scriptdir}/lib-tk +%{py_libdir}/lib-tk %attr(755,root,root) %{py_dyndir}/_tkinter.so %endif