|
@@ -1,22 +1,28 @@
|
|
|
+# if you wanna test, add " --define '_run_test 1' " option to rpmbuild command
|
|
|
+%define run_test %{?_run_test:1}%{!?_run_test:0}
|
|
|
%define TclTk 8.4
|
|
|
%define pybasever 3.1
|
|
|
%define python_lib %{_libdir}/python%{pybasever}
|
|
|
Summary: An interpreted, interactive, object-oriented programming language.
|
|
|
Summary(ja): オブジェクト指向 Python3 インタプリタ
|
|
|
Name: python3
|
|
|
-Version: %{pybasever}.2
|
|
|
-Release: 4%{?_dist_release}
|
|
|
+Version: %{pybasever}.3
|
|
|
+Release: 1%{?_dist_release}
|
|
|
License: Modified CNRI Open Source License
|
|
|
Group: Development/Languages
|
|
|
URL: http://www.python.org/download/releases/%{version}
|
|
|
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
|
|
|
-Patch0: python-3.1.2-Setup.dist.patch
|
|
|
-Patch1: python-3.1.2-lib64.patch
|
|
|
+Patch0: python-3.1.3-Setup.dist.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
|
|
|
-Vendor: Project Vine
|
|
|
-Distribution: Vine Linux
|
|
|
-
|
|
|
BuildRequires: gzip tar gcc-c++ pkgconfig sed findutils
|
|
|
BuildRequires: bzip2-devel
|
|
|
BuildRequires: gdbm-devel
|
|
@@ -26,6 +32,7 @@ BuildRequires: openssl-devel
|
|
|
BuildRequires: readline-devel
|
|
|
BuildRequires: sqlite3-devel
|
|
|
BuildRequires: zlib-devel
|
|
|
+BuildRequires: libffi-devel
|
|
|
Requires: bzip2
|
|
|
Requires: gdbm
|
|
|
Requires: ncurses
|
|
@@ -33,6 +40,9 @@ Requires: openssl
|
|
|
Requires: readline
|
|
|
Requires: sqlite3
|
|
|
Requires: zlib
|
|
|
+Packager: owa
|
|
|
+Vendor: Project Vine
|
|
|
+Distribution: Vine Linux
|
|
|
|
|
|
%description
|
|
|
Python is an interpreted, interactive, object-oriented programming
|
|
@@ -108,11 +118,19 @@ for the Python language.
|
|
|
%prep
|
|
|
%setup -q -n Python-%{version}
|
|
|
%patch0 -p1 -b .Setup
|
|
|
+%patch10 -p1 -b .locale
|
|
|
+
|
|
|
%if %{_lib} == lib64
|
|
|
-%patch1 -p1 -b .lib64
|
|
|
+%patch100 -p1 -b .lib64-Makefile
|
|
|
+%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
|
|
|
|
|
|
-# fix library names
|
|
|
+# fix Tcl/Tk versions
|
|
|
pushd Modules
|
|
|
mv Setup.dist Setup.dist.old
|
|
|
cat Setup.dist.old \
|
|
@@ -125,14 +143,48 @@ popd
|
|
|
|
|
|
|
|
|
%build
|
|
|
+topdir=`pwd`
|
|
|
%configure \
|
|
|
--enable-shared \
|
|
|
--enable-ipv6 \
|
|
|
--enable-profiling \
|
|
|
--with-wide-unicode \
|
|
|
+ --with-system-ffi \
|
|
|
+ --with-signal-module \
|
|
|
;
|
|
|
make %{?_smp_mflags}
|
|
|
|
|
|
+## 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}
|
|
|
+
|
|
|
+%if %{run_test}
|
|
|
+#%%check
|
|
|
+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
|
|
|
+
|
|
|
|
|
|
%install
|
|
|
rm -fr $RPM_BUILD_ROOT
|
|
@@ -145,17 +197,13 @@ find $RPM_BUILD_ROOT%{python_lib}/test \
|
|
|
chmod 755 $RPM_BUILD_ROOT%{_libdir}/libpython*.so.*
|
|
|
chmod 755 $RPM_BUILD_ROOT%{python_lib}/lib-dynload/*.so
|
|
|
find $RPM_BUILD_ROOT%{python_lib} -perm -o=x -name '*.py' | xargs chmod -x
|
|
|
-#mv $RPM_BUILD_ROOT%{_mandir}/man1/python.1 $RPM_BUILD_ROOT%{_mandir}/man1/python3.1
|
|
|
+mv $RPM_BUILD_ROOT%{_bindir}/2to3 $RPM_BUILD_ROOT%{_bindir}/2to3.1
|
|
|
|
|
|
-## move files conflict with python2
|
|
|
-mkdir -p $RPM_BUILD_ROOT%{python_lib}/bin
|
|
|
-mv $RPM_BUILD_ROOT%{_bindir}/* $RPM_BUILD_ROOT%{python_lib}/bin
|
|
|
-mv $RPM_BUILD_ROOT%{python_lib}/bin/python%{pybasever}* $RPM_BUILD_ROOT%{_bindir}/
|
|
|
|
|
|
## html document
|
|
|
tar xvzf %SOURCE1
|
|
|
if [ -d Doc/html ] ; then
|
|
|
- rm Doc/html
|
|
|
+ rm -r Doc/html
|
|
|
fi
|
|
|
mv python-%{version}-docs-html Doc/html
|
|
|
|
|
@@ -168,6 +216,8 @@ rm -fr $RPM_BUILD_ROOT
|
|
|
%files
|
|
|
%defattr(-, root, root)
|
|
|
%doc LICENSE README
|
|
|
+%{_bindir}/%{name}
|
|
|
+%{_bindir}/%{name}-config
|
|
|
%{_bindir}/python%{pybasever}
|
|
|
%{_bindir}/python%{pybasever}-config
|
|
|
%{_libdir}/libpython%{pybasever}.so*
|
|
@@ -210,7 +260,9 @@ rm -fr $RPM_BUILD_ROOT
|
|
|
|
|
|
%files tools
|
|
|
%defattr(-,root,root)
|
|
|
-%{python_lib}/bin
|
|
|
+%{_bindir}/2to3.1
|
|
|
+%{_bindir}/idle3
|
|
|
+%{_bindir}/pydoc3
|
|
|
%{python_lib}/idlelib
|
|
|
%{python_lib}/lib2to3
|
|
|
%{python_lib}/site-packages
|
|
@@ -228,6 +280,21 @@ rm -fr $RPM_BUILD_ROOT
|
|
|
|
|
|
|
|
|
%changelog
|
|
|
+* Mon Nov 29 2010 Shu KONNO <owa@bg.wakwak.com> 3.1.3-1
|
|
|
+- updated python to 3.1.3
|
|
|
+- added python-3.1.3-locale.patch
|
|
|
+- dropt python-3.1.2-lib64.patch
|
|
|
+- added python-3.1.3-lib64-*.patchs
|
|
|
+ python-3.1.3-lib64-Makefile.patch
|
|
|
+ python-3.1.3-lib64-setup.patch
|
|
|
+ python-3.1.3-lib64-site.patch
|
|
|
+ python-3.1.3-lib64-install.patch
|
|
|
+ python-3.1.3-lib64-sysconfig.patch
|
|
|
+ python-3.1.3-lib64-getpath.patch
|
|
|
+ python-3.1.3-lib64-test_install.patch
|
|
|
+- added run_test macro to run unit test
|
|
|
+- added BR: libffi
|
|
|
+
|
|
|
* Sun Sep 26 2010 Shu KONNO <owa@bg.wakwak.com> 3.1.2-4
|
|
|
- rebuilt with rpm-4.8.1 for pkg-config
|
|
|
|