python3-vl.spec 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215
  1. %define TclTk 8.4
  2. %define pybasever 3.1
  3. %define python_lib %{_libdir}/python%{pybasever}
  4. Summary: An interpreted, interactive, object-oriented programming language.
  5. Summary(ja): オブジェクト指向 Python3 インタプリタ
  6. Name: python3
  7. Version: %{pybasever}.2
  8. Release: 1%{?_dist_release}
  9. License: Modified CNRI Open Source License
  10. Group: Development/Languages
  11. URL: http://www.python.org/download/releases/%{version}
  12. Source0: http://www.python.org/ftp/python/%{version}/Python-%{version}.tar.bz2
  13. Source1: http://docs.python.org/py3k/archives/python-%{version}-docs-html.tar.bz2
  14. Patch0: python-3.1.2-Setup.dist.patch
  15. Patch1: python-3.1.2-lib64.patch
  16. BuildRoot: %{_tmppath}/%{name}-%{version}-root
  17. Vendor: Project Vine
  18. Distribution: Vine Linux
  19. #Packager: ..., owa
  20. %description
  21. Python is an interpreted, interactive, object-oriented programming
  22. language often compared to Tcl, Perl, Scheme or Java. Python includes
  23. modules, classes, exceptions, very high level dynamic data types and
  24. dynamic typing. Python supports interfaces to many system calls and
  25. libraries, as well as to various windowing systems (X11, Motif, Tk,
  26. Mac and MFC).
  27. Programmers can write new built-in modules for Python in C or C++.
  28. Python can be used as an extension language for applications that need
  29. a programmable interface. This package contains most of the standard
  30. Python modules, as well as modules for interfacing to the Tix widget
  31. set for Tk and RPM.
  32. Note that documentation for Python is provided in the python-docs
  33. package.
  34. %package devel
  35. Summary: The libraries and header files needed for Python development.
  36. Group: Development/Libraries
  37. %description devel
  38. The Python programming language's interpreter can be extended with
  39. dynamically loaded extensions and can be embedded in other programs.
  40. This package contains the header files and libraries needed to do
  41. these types of tasks.
  42. Install python-devel if you want to develop Python extensions. The
  43. python package will also need to be installed. You'll probably also
  44. want to install the python-docs package, which contains Python
  45. documentation.
  46. %package tkinter
  47. Summary: A graphical user interface for the Python scripting language.
  48. Group: Development/Languages
  49. BuildRequires: tcl, tk
  50. Requires: %{name} = %{version}
  51. Requires: tix
  52. %description tkinter
  53. The Tkinter (Tk interface) program is an graphical user interface for
  54. the Python scripting language.
  55. You should install the tkinter package if you'd like to use a graphical
  56. user interface for Python programming.
  57. %package tools
  58. Summary: A collection of development tools included with Python.
  59. Group: Development/Tools
  60. Requires: %{name} = %{version}
  61. Requires: %{name}-tkinter = %{version}
  62. %description tools
  63. The Python package includes several development tools that are used
  64. to build python programs.
  65. %package docs
  66. Summary: Documentation for the Python programming language.
  67. Group: Documentation
  68. %description docs
  69. The python-docs package contains documentation on the Python
  70. programming language and interpreter. The documentation is provided
  71. in ASCII text files and in LaTeX source files.
  72. Install the python-docs package if you'd like to use the documentation
  73. for the Python language.
  74. %prep
  75. %setup -q -n Python-%{version}
  76. %patch0 -p1 -b .Setup
  77. %if %{_lib} == lib64
  78. %patch1 -p1 -b .lib64
  79. %endif
  80. # fix library names
  81. pushd Modules
  82. mv Setup.dist Setup.dist.old
  83. cat Setup.dist.old \
  84. | sed "s^-ltcl^-ltcl%{TclTk}^" \
  85. | sed "s^-ltk^-ltk%{TclTk}^" \
  86. | sed "s^-ltix^-ltix%{TclTk}^" \
  87. > Setup.dist
  88. rm -f Setup.dist.old
  89. popd
  90. %build
  91. %configure \
  92. --enable-shared \
  93. --enable-ipv6 \
  94. --enable-profiling \
  95. --with-wide-unicode \
  96. ;
  97. make %{?_smp_mflags}
  98. %install
  99. rm -fr $RPM_BUILD_ROOT
  100. make DESTDIR=$RPM_BUILD_ROOT BINDIR=%{_bindir} install
  101. ## Clean up the testsuite - we don't need compiled files for it
  102. find $RPM_BUILD_ROOT%{python_lib}/test \
  103. -name "*.pyc" -o -name "*.pyo" | xargs rm -f
  104. chmod 755 $RPM_BUILD_ROOT%{_libdir}/libpython*.so.*
  105. chmod 755 $RPM_BUILD_ROOT%{python_lib}/lib-dynload/*.so
  106. find $RPM_BUILD_ROOT%{python_lib} -perm -o=x -name '*.py' | xargs chmod -x
  107. #mv $RPM_BUILD_ROOT%{_mandir}/man1/python.1 $RPM_BUILD_ROOT%{_mandir}/man1/python3.1
  108. ## move files conflict with python2
  109. mkdir -p $RPM_BUILD_ROOT%{python_lib}/bin
  110. mv $RPM_BUILD_ROOT%{_bindir}/* $RPM_BUILD_ROOT%{python_lib}/bin
  111. mv $RPM_BUILD_ROOT%{python_lib}/bin/python%{pybasever}* $RPM_BUILD_ROOT%{_bindir}/
  112. ## html document
  113. tar xvzf %SOURCE1
  114. if [ -d Doc/html ] ; then
  115. rm Doc/html
  116. fi
  117. mv python-%{version}-docs-html Doc/html
  118. %post -p /sbin/ldconfig
  119. %postun -p /sbin/ldconfig
  120. %clean
  121. rm -fr $RPM_BUILD_ROOT
  122. %files
  123. %defattr(-, root, root)
  124. %doc LICENSE README
  125. %{_bindir}/python%{pybasever}
  126. %{_bindir}/python%{pybasever}-config
  127. %{_libdir}/libpython%{pybasever}.so*
  128. %{_libdir}/pkgconfig/python-%{pybasever}.pc
  129. %{_libdir}/pkgconfig/python3.pc
  130. %{_mandir}/man1/*
  131. %dir %{python_lib}
  132. %dir %{python_lib}/site-packages
  133. %{python_lib}/LICENSE.txt
  134. %{python_lib}/*.py*
  135. %{python_lib}/*.doc
  136. %{python_lib}/ctypes
  137. %{python_lib}/curses
  138. %{python_lib}/distutils
  139. %{python_lib}/dbm
  140. %{python_lib}/email
  141. %{python_lib}/encodings
  142. %{python_lib}/html
  143. %{python_lib}/http
  144. %{python_lib}/importlib
  145. %{python_lib}/json
  146. %{python_lib}/logging
  147. %{python_lib}/multiprocessing
  148. %{python_lib}/plat-linux2
  149. %{python_lib}/pydoc_data
  150. %{python_lib}/sqlite3
  151. %{python_lib}/urllib
  152. %{python_lib}/wsgiref
  153. %{python_lib}/wsgiref.egg-info
  154. %{python_lib}/xml
  155. %{python_lib}/xmlrpc
  156. %{python_lib}/lib-dynload
  157. %exclude %{python_lib}/lib-dynload/_tkinter.so
  158. %files devel
  159. %defattr(-,root,root)
  160. %{_includedir}/python%{pybasever}
  161. %{python_lib}/config
  162. %{python_lib}/test
  163. %files tools
  164. %defattr(-,root,root)
  165. %{python_lib}/bin
  166. %{python_lib}/idlelib
  167. %{python_lib}/lib2to3
  168. %{python_lib}/site-packages
  169. %files tkinter
  170. %defattr(-,root,root)
  171. %{python_lib}/tkinter
  172. %{python_lib}/lib-dynload/_tkinter.so
  173. %files docs
  174. %defattr(-,root,root)
  175. %doc Misc/ACKS Misc/HISTORY Misc/NEWS Misc/README
  176. %doc Misc/cheatsheet Misc/Porting
  177. %doc Doc/html
  178. %changelog
  179. * Fri Jun 18 2010 Shu KONNO <owa@bg.wakwak.com> 3.1.2-1
  180. - initial build for VineSeed