Browse Source

fixed missing of python-docs files

git-svn-id: http://trac.vinelinux.org/repos/projects/specs@644 ec354946-7b23-47d6-9f5a-488ba84defc7
owa 15 years ago
parent
commit
c4cc860c0a
1 changed files with 79 additions and 83 deletions
  1. 79 83
      p/python/python-vl.spec

+ 79 - 83
p/python/python-vl.spec

@@ -1,6 +1,5 @@
 # If you want to run test, add "--define '_run_test 1'" to rpm option
 %define run_test %{?_run_test:1}%{!?_run_test:0}
-%define with_doc %{?_without_doc:0}%{!?_without_doc:1}
 %define unicode	 ucs4
 %define bsddb_ver 4.8
 %define tcl_major 8.4
@@ -13,8 +12,8 @@ Summary: An interpreted, interactive, object-oriented programming language.
 Summary(ja): オブジェクト指向言語 Python インタプリタ
 Name: python
 Version: %{pybasever}.5
-Release: 2%{?_dist_release}
-License: PSF - see LICENSE
+Release: 3%{?_dist_release}
+License: Modified CNRI Open Source License
 Group: Development/Languages
 URL: http://www.python.org/%{pybasever}/
 Source0: http://www.python.org/ftp/python/%{version}/Python-%{version}.tar.bz2
@@ -58,28 +57,19 @@ BuildRequires: xorg-x11-devel mesa-libGL-devel
 BuildRequires: gzip tar /usr/bin/find pkgconfig bzip2-devel
 BuildRequires: nkf
 BuildRequires: sqlite3-devel
-%if %{with_doc}
-BuildRequires: latex2html
-%endif
 BuildRoot: %{_tmppath}/%{name}-%{version}-root
 
 
 %description
 Python is an interpreted, interactive, object-oriented programming
-language often compared to Tcl, Perl, Scheme or Java. Python includes
-modules, classes, exceptions, very high level dynamic data types and
-dynamic typing. Python supports interfaces to many system calls and
-libraries, as well as to various windowing systems (X11, Motif, Tk,
-Mac and MFC).
-
-Programmers can write new built-in modules for Python in C or C++.
-Python can be used as an extension language for applications that need
-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.
+language.  It incorporates modules, exceptions, dynamic typing, very high
+level dynamic data types, and classes. Python combines remarkable power
+with very clear syntax. It has interfaces to many system calls and
+libraries, as well as to various window systems, and is extensible in C or
+C++. It is also usable as an extension language for applications that need
+a programmable interface.  Finally, Python is portable: it runs on many
+brands of UNIX, on PCs under Windows, MS-DOS, and OS/2, and on the
+Mac.
 
 %package devel
 Summary: The libraries and header files needed for Python development.
@@ -108,7 +98,12 @@ Obsoletes: python2-tools
 
 %description tools
 The Python package includes several development tools that are used
-to build python programs.
+to build python programs.  This package contains a selection of those
+tools, including the IDLE Python IDE.
+
+Install python-tools if you want to use these tools to develop
+Python programs.  You will also need to install the python and
+tkinter packages.
 
 %package docs
 Summary: Documentation for the Python programming language.
@@ -117,12 +112,8 @@ Group: Applications/Documentation
 Obsoletes: python2-docs
 
 %description docs
-The python-docs package contains documentation on the Python
-programming language and interpreter.  The documentation is provided
-in ASCII text files and in LaTeX source files.
-
-Install the python-docs package if you'd like to use the documentation
-for the Python language.
+Documentation relating to the Python programming language in HTML and info
+formats.
 
 %package -n tkinter
 Summary: A graphical user interface for the Python scripting language.
@@ -142,26 +133,16 @@ user interface for Python programming.
 
 %prep
 %setup -q -n Python-%{version}
-%patch0 -p1 -b .Setup
+%patch0 -p1 -b .~Setup
 %if %{_lib} == lib64
-%patch1 -p2 -b .lib64
+%patch1 -p2 -b .~lib64
 %endif
-%patch3 -p1 -b .no_gui
-%patch5 -p1 -b .distutilrpm
+%patch3 -p1 -b .~no_gui
+%patch5 -p1 -b .~distutilrpm
 
 ## for bsddb-4.8
 # %patch10 -p1 -b .db48
-%patch11 -p0 -b .db48-v2
-
-
-# remove unneeded files
-rm -vf Lib/test/test_*.py.CVE*
-rm -vf Lib/test/test_*.py.orig
-rm -vf Lib/test/test_*.py.org
-
-# Temporary workaround to avoid confusing find-requires: don't ship the tests
-# as executable files
-chmod 0644 Lib/test/test_*.py
+%patch11 -p0 -b .~db48-v2
 
 # shm module
 cp %{SOURCE6} Modules
@@ -173,14 +154,14 @@ EOF
 
 # Fix library flags
 pushd Modules
-mv Setup.dist Setup.dist.in
-cat Setup.dist.in | \
-	sed "s^-ldb-^-ldb-%{bsddb_ver}^"| \
-	sed "s^-ltcl^-ltcl%{tcl_major}^"| \
-	sed "s^-ltk^-ltk%{tk_major}^" | \
-	sed "s^-ltix^-ltix%{tix_major}^" \
-> Setup.dist
-rm -f Setup.dist.in
+mv Setup.dist Setup.dist.tmp
+cat Setup.dist.tmp \
+	| sed "s^-ldb-^-ldb-%{bsddb_ver}^" \
+	| sed "s^-ltcl^-ltcl%{tcl_major}^" \
+	| sed "s^-ltk^-ltk%{tk_major}^" \
+	| sed "s^-ltix^-ltix%{tix_major}^" \
+	> Setup.dist
+rm -f Setup.dist.tmp
 popd
 
 
@@ -204,31 +185,38 @@ $topdir/python Tools/scripts/pathfix.py -i "/usr/bin/env python%{pybasever}" .
 make OPT="$CFLAGS" %{?_smp_mflags}
 
 
-# Test
 %if %{run_test}
-cp %{SOURCE7} ./
-cp %{SOURCE8} ./
-cp %{SOURCE9} ./
-cp %{SOURCE10} ./
-cp %{SOURCE11} ./
-cp %{SOURCE12} ./
-cp %{SOURCE13} ./
-cp %{SOURCE14} ./
-cp %{SOURCE15} ./
-cp %{SOURCE16} ./
-cp %{SOURCE17} ./
-cp %{SOURCE18} ./
-cp %{SOURCE19} ./
-cp %{SOURCE20} ./
-# This runs the test set twice (once with no compiled files, once with
-# the compiled files left by the previous test run).
-export LD_LIBRARY_PATH=$topdir
-export PYTHONHOME=$topdir
-export PYTHONPATH=$topdir/Lib:$topdir/Lib/test:$topdir/Lib/lib-tk:$topdir/Lib/site-packages:$topdir/Modules:$topdir/build/lib.linux-%{_host_cpu}-%{pybasever}
-
+## Test
+#cp %{SOURCE7} ./
+#cp %{SOURCE8} ./
+#cp %{SOURCE9} ./
+#cp %{SOURCE10} ./
+#cp %{SOURCE11} ./
+#cp %{SOURCE12} ./
+#cp %{SOURCE13} ./
+#cp %{SOURCE14} ./
+#cp %{SOURCE15} ./
+#cp %{SOURCE16} ./
+#cp %{SOURCE17} ./
+#cp %{SOURCE18} ./
+#cp %{SOURCE19} ./
+#cp %{SOURCE20} ./
+# not nesessary?
+
+## This runs the test set twice (once with no compiled files, once with
+## the compiled files left by the previous test run).
 find ./Lib -name '*.py[co]' -print | xargs rm -f
-./python -tt ./Lib/test/regrtest.py -l
-./python -tt ./Lib/test/regrtest.py -l
+LD_LIBRARY_PATH=$topdir:$topdir/Modules:$topdir/build/lib.linux-%{_host_cpu}-%{pybasever}
+PYTHONPATH=$topdir/Lib:$topdir/Lib/test:$topdir/Lib/lib-tk:$topdir/Lib/site-packages
+PYTHONPATH=$PYTHONPATH:$LD_LIBRARY_PATH
+PYTHONHOME=$topdir
+export PYTHONHOME PYTHONPATH LD_LIBRARY_PATH
+./python -tt -E ./Lib/test/regrtest.py -l -w
+./python -tt -E ./Lib/test/regrtest.py -l -w
+## Mon Mar 22 2010: last tested
+## 328 tests OK.
+## 1 test failed: test_pydoc
+## 37 tests skipped:
 %endif
 
 
@@ -241,6 +229,10 @@ for f in distutils/command/install distutils/sysconfig; do
     rm -f Lib/$f.py.lib64
 done
 
+# Temporary workaround to avoid confusing find-requires: don't ship the tests
+# as executable files
+chmod 0644 Lib/test/test_*.py
+
 make DESTDIR=$RPM_BUILD_ROOT install
 
 # Fix the interpreter path in binaries installed by distutils 
@@ -252,13 +244,6 @@ for fixed in $RPM_BUILD_ROOT/usr/bin/pydoc; do
 done
 
 
-## docs
-%if %{with_doc}
-tar xvzf %SOURCE1
-mv python-%{version}-docs-html Doc/html
-%endif
-
-
 ## tools
 mkdir -p $RPM_BUILD_ROOT%{python_lib}/site-packages
 
@@ -311,6 +296,13 @@ chmod 755 $RPM_BUILD_ROOT%{python_lib}/lib-dynload/*.so
 chmod 755 $RPM_BUILD_ROOT%{_libdir}/libpython*.so.*
 find $RPM_BUILD_ROOT%{python_lib} -type f -name '*.py' | xargs chmod -x
 
+## docs
+if [ -d Doc/html ] ; then
+	rm Doc/html
+fi
+tar xvzf %SOURCE1
+mv python-%{version}-docs-html Doc/html
+
 
 %clean
 rm -fr $RPM_BUILD_ROOT
@@ -366,12 +358,10 @@ rm -fr $RPM_BUILD_ROOT
 %{_bindir}/pynche
 %{_bindir}/smtpd.py
 
-%if %{with_doc}
 %files docs
 %defattr(-,root,root,755)
 %doc Misc/HISTORY Misc/NEWS  Misc/README Misc/cheatsheet Misc/developers.txt
-%doc Doc/build/html
-%endif
+%doc Doc/html
 
 %files -n tkinter
 %defattr(-,root,root,755)
@@ -380,6 +370,12 @@ rm -fr $RPM_BUILD_ROOT
 
 
 %changelog
+* Mon Mar 22 2010 Shu KONNO <owa@bg.wakwak.com> 2.6.5-3
+- fixed missing of python-docs files
+- dropt '--with doc' option
+- dropt BR: latex2html
+- replaced descriptions (from Misc/RPM/python-2.6.spec in tar-ball)
+
 * Sun Mar 21 2010 Shu KONNO <owa@bg.wakwak.com> 2.6.5-2
 - replaced Patch0: python-2.6.?-Setup.dist.patch
 - replaced Patch1: python-2.6.?-lib64.patch