python3-vl.spec 6.5 KB

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