|
@@ -1,36 +1,31 @@
|
|
# if you wanna test, add " --define '_run_test 1' " option to rpmbuild command
|
|
# if you wanna test, add " --define '_run_test 1' " option to rpmbuild command
|
|
%define run_test %{?_run_test:1}%{!?_run_test:0}
|
|
%define run_test %{?_run_test:1}%{!?_run_test:0}
|
|
-%define TclTk 8.4
|
|
+%define libvers 3.2
|
|
-%define pybasever 3.1
|
|
+%define binsuffix 3.2
|
|
-%define python_lib %{_libdir}/python%{pybasever}
|
|
+%define python_lib %{_libdir}/python%{libvers}
|
|
|
|
+%define config_htmldir /var/www/html/python
|
|
Summary: An interpreted, interactive, object-oriented programming language.
|
|
Summary: An interpreted, interactive, object-oriented programming language.
|
|
Summary(ja): オブジェクト指向 Python3 インタプリタ
|
|
Summary(ja): オブジェクト指向 Python3 インタプリタ
|
|
Name: python3
|
|
Name: python3
|
|
-Version: %{pybasever}.3
|
|
+Version: 3.2
|
|
-Release: 2%{?_dist_release}
|
|
+Release: 1%{?_dist_release}
|
|
-License: Modified CNRI Open Source License
|
|
+License: PSF
|
|
Group: Development/Languages
|
|
Group: Development/Languages
|
|
URL: http://www.python.org/download/releases/%{version}
|
|
URL: http://www.python.org/download/releases/%{version}
|
|
Source0: http://www.python.org/ftp/python/%{version}/Python-%{version}.tar.bz2
|
|
Source0: http://www.python.org/ftp/python/%{version}/Python-%{version}.tar.bz2
|
|
Source1: http://docs.python.org/py3k/archives/python-%{version}-docs-html.tar.bz2
|
|
Source1: http://docs.python.org/py3k/archives/python-%{version}-docs-html.tar.bz2
|
|
-Patch0: python-3.1.3-Setup.dist.patch
|
|
+Patch1: python-3.2b2-lib64.patch
|
|
-Patch10: python-3.1.3-locale.patch
|
|
|
|
-Patch100: python-3.1.3-lib64-Makefile.patch
|
|
|
|
-Patch101: python-3.1.3-lib64-setup.patch
|
|
|
|
-Patch102: python-3.1.3-lib64-site.patch
|
|
|
|
-Patch103: python-3.1.3-lib64-install.patch
|
|
|
|
-Patch104: python-3.1.3-lib64-sysconfig.patch
|
|
|
|
-Patch105: python-3.1.3-lib64-getpath.patch
|
|
|
|
-Patch106: python-3.1.3-lib64-test_install.patch
|
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-root
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-root
|
|
|
|
+BuildRequires: expat-devel
|
|
|
|
+BuildRequires: db4-devel
|
|
|
|
+BuildRequires: gdbm-devel
|
|
|
|
+BuildRequires: sqlite3-devel
|
|
BuildRequires: gzip tar gcc-c++ pkgconfig sed findutils
|
|
BuildRequires: gzip tar gcc-c++ pkgconfig sed findutils
|
|
BuildRequires: bzip2-devel
|
|
BuildRequires: bzip2-devel
|
|
-BuildRequires: gdbm-devel
|
|
|
|
BuildRequires: glibc-devel
|
|
BuildRequires: glibc-devel
|
|
BuildRequires: ncurses-devel
|
|
BuildRequires: ncurses-devel
|
|
BuildRequires: openssl-devel
|
|
BuildRequires: openssl-devel
|
|
BuildRequires: readline-devel
|
|
BuildRequires: readline-devel
|
|
-BuildRequires: sqlite3-devel
|
|
|
|
BuildRequires: zlib-devel
|
|
BuildRequires: zlib-devel
|
|
BuildRequires: libffi-devel
|
|
BuildRequires: libffi-devel
|
|
Requires: bzip2
|
|
Requires: bzip2
|
|
@@ -46,20 +41,14 @@ Distribution: Vine Linux
|
|
|
|
|
|
%description
|
|
%description
|
|
Python is an interpreted, interactive, object-oriented programming
|
|
Python is an interpreted, interactive, object-oriented programming
|
|
-language often compared to Tcl, Perl, Scheme or Java. Python includes
|
|
+language. It incorporates modules, exceptions, dynamic typing, very high
|
|
-modules, classes, exceptions, very high level dynamic data types and
|
|
+level dynamic data types, and classes. Python combines remarkable power
|
|
-dynamic typing. Python supports interfaces to many system calls and
|
|
+with very clear syntax. It has interfaces to many system calls and
|
|
-libraries, as well as to various windowing systems (X11, Motif, Tk,
|
|
+libraries, as well as to various window systems, and is extensible in C or
|
|
-Mac and MFC).
|
|
+C++. It is also usable as an extension language for applications that need
|
|
-
|
|
+a programmable interface. Finally, Python is portable: it runs on many
|
|
-Programmers can write new built-in modules for Python in C or C++.
|
|
+brands of UNIX, on PCs under Windows, MS-DOS, and OS/2, and on the
|
|
-Python can be used as an extension language for applications that need
|
|
+Mac.
|
|
-a programmable interface. This package contains most of the standard
|
|
|
|
-Python modules, as well as modules for interfacing to the Tix widget
|
|
|
|
-set for Tk and RPM.
|
|
|
|
-
|
|
|
|
-Note that documentation for Python is provided in the python-docs
|
|
|
|
-package.
|
|
|
|
|
|
|
|
%package devel
|
|
%package devel
|
|
Summary: The libraries and header files needed for Python development.
|
|
Summary: The libraries and header files needed for Python development.
|
|
@@ -117,95 +106,132 @@ for the Python language.
|
|
|
|
|
|
%prep
|
|
%prep
|
|
%setup -q -n Python-%{version}
|
|
%setup -q -n Python-%{version}
|
|
-%patch0 -p1 -b .Setup
|
|
|
|
-%patch10 -p1 -b .locale
|
|
|
|
-
|
|
|
|
%if %{_lib} == lib64
|
|
%if %{_lib} == lib64
|
|
-%patch100 -p1 -b .lib64-Makefile
|
|
+%patch1 -p1 -b .lib64
|
|
-%patch101 -p1 -b .lib64-setup
|
|
|
|
-%patch102 -p1 -b .lib64-site
|
|
|
|
-%patch103 -p1 -b .lib64-install
|
|
|
|
-%patch104 -p1 -b .lib64-sysconfig
|
|
|
|
-%patch105 -p1 -b .lib64-getpath
|
|
|
|
-%patch106 -p1 -b .test_install
|
|
|
|
%endif
|
|
%endif
|
|
|
|
|
|
-# fix Tcl/Tk versions
|
|
|
|
-pushd Modules
|
|
|
|
-mv Setup.dist Setup.dist.old
|
|
|
|
-cat Setup.dist.old \
|
|
|
|
- | sed "s^-ltcl^-ltcl%{TclTk}^" \
|
|
|
|
- | sed "s^-ltk^-ltk%{TclTk}^" \
|
|
|
|
- | sed "s^-ltix^-ltix%{TclTk}^" \
|
|
|
|
- > Setup.dist
|
|
|
|
-rm -f Setup.dist.old
|
|
|
|
-popd
|
|
|
|
-
|
|
|
|
|
|
|
|
%build
|
|
%build
|
|
-topdir=`pwd`
|
|
+./configure \
|
|
-%configure \
|
|
+ --prefix=%{_prefix} \
|
|
|
|
+ --libdir=%{_libdir} \
|
|
--enable-shared \
|
|
--enable-shared \
|
|
- --enable-ipv6 \
|
|
|
|
--enable-profiling \
|
|
--enable-profiling \
|
|
|
|
+ --enable-ipv6 \
|
|
|
|
+ --with-fpectl \
|
|
--with-wide-unicode \
|
|
--with-wide-unicode \
|
|
- --with-system-ffi \
|
|
+ --with-doc-strings \
|
|
|
|
+ --with-pymalloc \
|
|
--with-signal-module \
|
|
--with-signal-module \
|
|
- ;
|
|
+ --with-system-ffi \
|
|
-make %{?_smp_mflags}
|
|
+ --with-threads \
|
|
|
|
+ --with-valgrind \
|
|
|
|
+%ifarch x86_64
|
|
|
|
+ --with-universal-archs=64-bit \
|
|
|
|
+%endif
|
|
|
|
+ CXX=g++;
|
|
|
|
|
|
-## rebuild with new python
|
|
|
|
-export LD_LIBRARY_PATH=$topdir
|
|
|
|
-export PATH="$topdir:$PATH"
|
|
|
|
-ln -s $topdir/python $topdir/python%{pybasever}
|
|
|
|
-#$topdir/python Tools/scripts/pathfix.py -i "/usr/bin/env python%{pybasever}" .
|
|
|
|
make %{?_smp_mflags}
|
|
make %{?_smp_mflags}
|
|
|
|
|
|
%if %{run_test}
|
|
%if %{run_test}
|
|
-#%%check
|
|
+make test
|
|
-find ./Lib -name '*.py[co]' -print | xargs rm -f
|
|
|
|
-LD_LIBRARY_PATH=$topdir:$topdir/Modules:$topdir/build/lib.linux-%{_host_cpu}-%{pybasever}
|
|
|
|
-PYTHONHOME=$topdir
|
|
|
|
-PYTHONPATH=$topdir/Lib:$topdir/Lib/test:$topdir/Lib/lib-tk:$topdir/Lib/site-packages
|
|
|
|
-PYTHONPATH=$PYTHONPATH:$LD_LIBRARY_PATH
|
|
|
|
-export PYTHONHOME PYTHONPATH LD_LIBRARY_PATH
|
|
|
|
-SKIPLIST="-x test_cmd_line"
|
|
|
|
-./python -tt -E ./Lib/test/regrtest.py -l -w $SKIPLIST 2>&1 | tee make.check1.log
|
|
|
|
-./python -tt -E ./Lib/test/regrtest.py -l -w $SKIPLIST 2>&1 | tee make.check2.log
|
|
|
|
-#-------------------------------##
|
|
|
|
-# Mon Nov 29 2010 ...last tested
|
|
|
|
-# 314 tests OK.
|
|
|
|
-# 4 tests failed:
|
|
|
|
-# test_cmd_line: "Lib/test/test_cmd_line.py", line 190, in test_large_PYTHONPATH
|
|
|
|
-# test_httpservers: Lib/test/test_httpservers.py", line 399 in tearDown
|
|
|
|
-# test_pydoc: Lib/test/test_pydoc.py", line 299, in test_badimport
|
|
|
|
-# test_warnings: Lib/test/test_warnings.py", line 707, in test_issue_8766
|
|
|
|
-# 22 tests skipped:
|
|
|
|
-# 2 skips unexpected on linux2:
|
|
|
|
-#-------------------------------##
|
|
|
|
%endif
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%install
|
|
%install
|
|
-rm -fr $RPM_BUILD_ROOT
|
|
+[ -d "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
|
|
-make DESTDIR=$RPM_BUILD_ROOT BINDIR=%{_bindir} install
|
|
+echo '[install_scripts]' >setup.cfg
|
|
-
|
|
+echo 'install_dir='"${RPM_BUILD_ROOT}%{_bindir}" >> setup.cfg
|
|
-## Clean up the testsuite - we don't need compiled files for it
|
|
+
|
|
-find $RPM_BUILD_ROOT%{python_lib}/test \
|
|
+mkdir -p $RPM_BUILD_ROOT%{python_lib}/lib-dynload
|
|
- -name "*.pyc" -o -name "*.pyo" | xargs rm -f
|
|
+make DESTDIR=$RPM_BUILD_ROOT LIBDIR=%{_libdir} install
|
|
-
|
|
+
|
|
-chmod 755 $RPM_BUILD_ROOT%{_libdir}/libpython*.so.*
|
|
+# if --with-wide-unicode at configure
|
|
-chmod 755 $RPM_BUILD_ROOT%{python_lib}/lib-dynload/*.so
|
|
+ln -s python%{libvers}u $RPM_BUILD_ROOT%{_includedir}/python%{libvers}
|
|
-find $RPM_BUILD_ROOT%{python_lib} -perm -o=x -name '*.py' | xargs chmod -x
|
|
+
|
|
-mv $RPM_BUILD_ROOT%{_bindir}/2to3 $RPM_BUILD_ROOT%{_bindir}/2to3.1
|
|
+# replace path in pydoc
|
|
-
|
|
+if [ ! -z "%{binsuffix}" ]
|
|
|
|
+then
|
|
|
|
+ (
|
|
|
|
+ cd $RPM_BUILD_ROOT%{_bindir}
|
|
|
|
+ mv pydoc%{libvers} pydoc.old
|
|
|
|
+ sed 's|#!.*|#!%{_bindir}/env python'%{libvers}'|' \
|
|
|
|
+ pydoc.old > pydoc%{libvers}
|
|
|
|
+ chmod 755 pydoc%{libvers}
|
|
|
|
+ rm -f pydoc.old
|
|
|
|
+ )
|
|
|
|
+fi
|
|
|
|
|
|
-## html document
|
|
+# Tools
|
|
-tar xvzf %SOURCE1
|
|
+echo '#!%{_bindir}/env python%{binsuffix}' > ${RPM_BUILD_ROOT}%{_bindir}/idle%{binsuffix}
|
|
-if [ -d Doc/html ] ; then
|
|
+echo 'import os, sys' >> ${RPM_BUILD_ROOT}%{_bindir}/idle%{binsuffix}
|
|
- rm -r Doc/html
|
|
+echo 'os.execvp("%{_bindir}/python%{binsuffix}", ["%{_bindir}/python%{binsuffix}", "%{python_lib}/idlelib/idle.py"] + sys.argv[1:])' >> ${RPM_BUILD_ROOT}%{_bindir}/idle%{binsuffix}
|
|
|
|
+echo 'print "Failed to exec Idle"' >> ${RPM_BUILD_ROOT}%{_bindir}/idle%{binsuffix}
|
|
|
|
+echo 'sys.exit(1)' >> ${RPM_BUILD_ROOT}%{_bindir}/idle%{binsuffix}
|
|
|
|
+chmod 755 $RPM_BUILD_ROOT%{_bindir}/idle%{binsuffix}
|
|
|
|
+cp -a Tools $RPM_BUILD_ROOT%{python_lib}
|
|
|
|
+
|
|
|
|
+# make file lists
|
|
|
|
+rm -f mainpkg.files
|
|
|
|
+find "$RPM_BUILD_ROOT"%{python_lib} -type f |
|
|
|
|
+ sed "s|^${RPM_BUILD_ROOT}|/|" |
|
|
|
|
+ grep -v -e '/python%{libvers}/config$' -e '_tkinter.so$' >> mainpkg.files
|
|
|
|
+
|
|
|
|
+rm -f $RPM_BUILD_ROOT%{_prefix}/bin/2to3
|
|
|
|
+find "$RPM_BUILD_ROOT""%{_prefix}"/bin -type f -o -type l |
|
|
|
|
+ sed "s|^${RPM_BUILD_ROOT}|/|" |
|
|
|
|
+ grep -v -e '/bin/2to3%{binsuffix}$' |
|
|
|
|
+ grep -v -e '/bin/pydoc%{binsuffix}$' |
|
|
|
|
+ grep -v -e '/bin/smtpd.py%{binsuffix}$' |
|
|
|
|
+ grep -v -e '/bin/idle%{binsuffix}$' >> mainpkg.files
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+rm -f tools.files
|
|
|
|
+find "$RPM_BUILD_ROOT"%{python_lib}/idlelib \
|
|
|
|
+ "$RPM_BUILD_ROOT"%{python_lib}/Tools -type f |
|
|
|
|
+ sed "s|^${RPM_BUILD_ROOT}|/|" > tools.files
|
|
|
|
+echo %{_bindir}/2to3-%{binsuffix} >> tools.files
|
|
|
|
+echo %{_bindir}/pydoc%{binsuffix} >> tools.files
|
|
|
|
+##echo %{_bindir}/smtpd.py%{binsuffix} >> tools.files
|
|
|
|
+echo %{_bindir}/idle%{binsuffix} >> tools.files
|
|
|
|
+
|
|
|
|
+# docs
|
|
|
|
+mkdir -p "$RPM_BUILD_ROOT"%{config_htmldir}
|
|
|
|
+(
|
|
|
|
+ cd "$RPM_BUILD_ROOT"%{config_htmldir}
|
|
|
|
+ bunzip2 < %{SOURCE1} | tar x
|
|
|
|
+)
|
|
|
|
+
|
|
|
|
+# fix the #! line in installed files
|
|
|
|
+find "$RPM_BUILD_ROOT" -type f -print0 |
|
|
|
|
+ xargs -0 grep -l /usr/local/bin/python | while read file
|
|
|
|
+do
|
|
|
|
+ FIXFILE="$file"
|
|
|
|
+ sed 's|^#!.*python|#!%{_bindir}/env python'"%{binsuffix}"'|' \
|
|
|
|
+ "$FIXFILE" >/tmp/fix-python-path.$$
|
|
|
|
+ cat /tmp/fix-python-path.$$ > "$FIXFILE"
|
|
|
|
+ rm -f /tmp/fix-python-path.$$
|
|
|
|
+done
|
|
|
|
+
|
|
|
|
+# check to see if there are any straggling #! lines
|
|
|
|
+find "$RPM_BUILD_ROOT" -type f | xargs egrep -n '^#! */usr/local/bin/python' \
|
|
|
|
+ | grep ':1:#!' >/tmp/python-rpm-files.$$ || true
|
|
|
|
+if [ -s /tmp/python-rpm-files.$$ ]
|
|
|
|
+then
|
|
|
|
+ echo '*****************************************************'
|
|
|
|
+ cat /tmp/python-rpm-files.$$
|
|
|
|
+ cat <<@EOF
|
|
|
|
+ *****************************************************
|
|
|
|
+ There are still files referencing /usr/local/bin/python in the
|
|
|
|
+ install directory. They are listed above. Please fix the .spec
|
|
|
|
+ file and try again. If you are an end-user, you probably want
|
|
|
|
+ to report this to jafo-rpms@tummy.com as well.
|
|
|
|
+ *****************************************************
|
|
|
|
+@EOF
|
|
|
|
+ rm -f /tmp/python-rpm-files.$$
|
|
|
|
+ exit 1
|
|
fi
|
|
fi
|
|
-mv python-%{version}-docs-html Doc/html
|
|
+rm -f /tmp/python-rpm-files.$$
|
|
|
|
|
|
|
|
|
|
%post -p /sbin/ldconfig
|
|
%post -p /sbin/ldconfig
|
|
@@ -213,73 +239,42 @@ mv python-%{version}-docs-html Doc/html
|
|
%clean
|
|
%clean
|
|
rm -fr $RPM_BUILD_ROOT
|
|
rm -fr $RPM_BUILD_ROOT
|
|
|
|
|
|
-%files
|
|
+%files -f mainpkg.files
|
|
%defattr(-, root, root)
|
|
%defattr(-, root, root)
|
|
-%doc LICENSE README
|
|
+%doc LICENSE
|
|
-%{_bindir}/%{name}
|
|
+%doc Misc/ACKS Misc/HISTORY Misc/NEWS Misc/Porting Misc/README
|
|
-%{_bindir}/%{name}-config
|
|
+%attr(755,root,root) %dir %{python_lib}/
|
|
-%{_bindir}/python%{pybasever}
|
|
+%{_libdir}/libpython*
|
|
-%{_bindir}/python%{pybasever}-config
|
|
+%{_mandir}/man1/python%{libvers}.1*
|
|
-%{_libdir}/libpython%{pybasever}.so*
|
|
|
|
-%{_libdir}/pkgconfig/python-%{pybasever}.pc
|
|
|
|
-%{_libdir}/pkgconfig/python3.pc
|
|
|
|
-%{_mandir}/man1/*
|
|
|
|
-%dir %{python_lib}
|
|
|
|
-%dir %{python_lib}/site-packages
|
|
|
|
-%{python_lib}/LICENSE.txt
|
|
|
|
-%{python_lib}/*.py*
|
|
|
|
-%{python_lib}/*.doc
|
|
|
|
-%{python_lib}/ctypes
|
|
|
|
-%{python_lib}/curses
|
|
|
|
-%{python_lib}/distutils
|
|
|
|
-%{python_lib}/dbm
|
|
|
|
-%{python_lib}/email
|
|
|
|
-%{python_lib}/encodings
|
|
|
|
-%{python_lib}/html
|
|
|
|
-%{python_lib}/http
|
|
|
|
-%{python_lib}/importlib
|
|
|
|
-%{python_lib}/json
|
|
|
|
-%{python_lib}/logging
|
|
|
|
-%{python_lib}/multiprocessing
|
|
|
|
-%{python_lib}/plat-linux2
|
|
|
|
-%{python_lib}/pydoc_data
|
|
|
|
-%{python_lib}/sqlite3
|
|
|
|
-%{python_lib}/urllib
|
|
|
|
-%{python_lib}/wsgiref
|
|
|
|
-%{python_lib}/wsgiref.egg-info
|
|
|
|
-%{python_lib}/xml
|
|
|
|
-%{python_lib}/xmlrpc
|
|
|
|
-%{python_lib}/lib-dynload
|
|
|
|
-%exclude %{python_lib}/lib-dynload/_tkinter.so
|
|
|
|
|
|
|
|
%files devel
|
|
%files devel
|
|
%defattr(-,root,root)
|
|
%defattr(-,root,root)
|
|
-%{_includedir}/python%{pybasever}
|
|
+%dir %{_includedir}/python%{libvers}u
|
|
-%{python_lib}/config
|
|
+%{_includedir}/python%{libvers}u/*.h
|
|
-%{python_lib}/test
|
|
+%{_includedir}/python%{libvers}
|
|
|
|
+%{_libdir}/pkgconfig/*.pc
|
|
|
|
|
|
-%files tools
|
|
+%files -f tools.files tools
|
|
%defattr(-,root,root)
|
|
%defattr(-,root,root)
|
|
-%{_bindir}/2to3.1
|
|
|
|
-%{_bindir}/idle3
|
|
|
|
-%{_bindir}/pydoc3
|
|
|
|
-%{python_lib}/idlelib
|
|
|
|
-%{python_lib}/lib2to3
|
|
|
|
-%{python_lib}/site-packages
|
|
|
|
|
|
|
|
%files tkinter
|
|
%files tkinter
|
|
%defattr(-,root,root)
|
|
%defattr(-,root,root)
|
|
%{python_lib}/tkinter
|
|
%{python_lib}/tkinter
|
|
-%{python_lib}/lib-dynload/_tkinter.so
|
|
+%{python_lib}/lib-dynload/_tkinter.*.so*
|
|
|
|
|
|
%files docs
|
|
%files docs
|
|
%defattr(-,root,root)
|
|
%defattr(-,root,root)
|
|
-%doc Misc/ACKS Misc/HISTORY Misc/NEWS Misc/README
|
|
+%{config_htmldir}/*
|
|
-%doc Misc/cheatsheet Misc/Porting
|
|
|
|
-%doc Doc/html
|
|
|
|
|
|
|
|
|
|
|
|
%changelog
|
|
%changelog
|
|
|
|
+* Sat Apr 16 2011 Shu KONNO <owa@bg.wakwak.com> 3.2-1
|
|
|
|
+- updated python to 3.2
|
|
|
|
+- updated python-*-docs-html to 3.2
|
|
|
|
+- dropt all patchs
|
|
|
|
+- added python-3.2b2-lib64.patch
|
|
|
|
+- referred to the review Python-3.2/Misc/RPM/python-3.2.spec
|
|
|
|
+
|
|
* Fri Jan 14 2011 Shu KONNO <owa@bg.wakwak.com> 3.1.3-2
|
|
* Fri Jan 14 2011 Shu KONNO <owa@bg.wakwak.com> 3.1.3-2
|
|
- rebuilt with openssl-1.0.0c
|
|
- rebuilt with openssl-1.0.0c
|
|
|
|
|