Browse Source

新規です python3

git-svn-id: http://trac.vinelinux.org/repos/projects/specs@1216 ec354946-7b23-47d6-9f5a-488ba84defc7
owa 15 years ago
parent
commit
61aaf35593
1 changed files with 215 additions and 0 deletions
  1. 215 0
      p/python3/python3-vl.spec

+ 215 - 0
p/python3/python3-vl.spec

@@ -0,0 +1,215 @@
+%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: 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
+BuildRoot: %{_tmppath}/%{name}-%{version}-root
+Vendor: Project Vine
+Distribution: Vine Linux
+#Packager: ..., owa
+
+%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.
+
+%package devel
+Summary: The libraries and header files needed for Python development.
+Group: Development/Libraries
+
+%description devel
+The Python programming language's interpreter can be extended with
+dynamically loaded extensions and can be embedded in other programs.
+This package contains the header files and libraries needed to do
+these types of tasks.
+
+Install python-devel if you want to develop Python extensions.  The
+python package will also need to be installed.  You'll probably also
+want to install the python-docs package, which contains Python
+documentation.
+
+%package tkinter
+Summary: A graphical user interface for the Python scripting language.
+Group: Development/Languages
+BuildRequires: tcl, tk
+Requires: %{name} = %{version}
+Requires: tix
+
+%description tkinter
+The Tkinter (Tk interface) program is an graphical user interface for
+the Python scripting language.
+
+You should install the tkinter package if you'd like to use a graphical
+user interface for Python programming.
+
+%package tools
+Summary: A collection of development tools included with Python.
+Group: Development/Tools
+Requires: %{name} = %{version}
+Requires: %{name}-tkinter = %{version}
+
+%description tools
+The Python package includes several development tools that are used
+to build python programs.
+
+%package docs
+Summary: Documentation for the Python programming language.
+Group: Documentation
+
+%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.
+
+
+%prep
+%setup -q -n Python-%{version}
+%patch0 -p1 -b .Setup
+%if %{_lib} == lib64
+%patch1 -p1 -b .lib64
+%endif
+
+# fix library names
+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
+%configure \
+	--enable-shared \
+	--enable-ipv6 \
+	--enable-profiling \
+	--with-wide-unicode \
+	;
+make %{?_smp_mflags}
+
+
+%install
+rm -fr $RPM_BUILD_ROOT
+make DESTDIR=$RPM_BUILD_ROOT BINDIR=%{_bindir} install
+
+## Clean up the testsuite - we don't need compiled files for it
+find $RPM_BUILD_ROOT%{python_lib}/test \
+    -name "*.pyc" -o -name "*.pyo" | xargs rm -f
+
+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
+
+## 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
+fi
+mv python-%{version}-docs-html Doc/html
+
+
+%post -p /sbin/ldconfig
+%postun -p /sbin/ldconfig
+%clean
+rm -fr $RPM_BUILD_ROOT
+
+%files
+%defattr(-, root, root)
+%doc LICENSE README
+%{_bindir}/python%{pybasever}
+%{_bindir}/python%{pybasever}-config
+%{_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
+%defattr(-,root,root)
+%{_includedir}/python%{pybasever}
+%{python_lib}/config
+%{python_lib}/test
+
+%files tools
+%defattr(-,root,root)
+%{python_lib}/bin
+%{python_lib}/idlelib
+%{python_lib}/lib2to3
+%{python_lib}/site-packages
+
+%files tkinter
+%defattr(-,root,root)
+%{python_lib}/tkinter
+%{python_lib}/lib-dynload/_tkinter.so
+
+%files docs
+%defattr(-,root,root)
+%doc Misc/ACKS Misc/HISTORY Misc/NEWS Misc/README
+%doc Misc/cheatsheet Misc/Porting
+%doc Doc/html
+
+
+%changelog
+* Fri Jun 18 2010 Shu KONNO <owa@bg.wakwak.com> 3.1.2-1
+- initial build for VineSeed
+