source: projects/specs/trunk/p/python3/python3-vl.spec @ 9249

Revision 9249, 10.2 KB checked in by Takemikaduchi, 9 years ago (diff)

python3-{pyatspi,pycairo,pygobject},gedit,accerciser,eog-plugins: rebuild with python3
others: new upstream release

RevLine 
[2238]1# if you wanna test, add " --define '_run_test 1' " option to rpmbuild command
2%define run_test %{?_run_test:1}%{!?_run_test:0}
[9249]3%define libvers 3.4
4%define binsuffix 3.4
[3491]5%define python_lib %{_libdir}/python%{libvers}
6%define config_htmldir /var/www/html/python
[1216]7Summary: An interpreted, interactive, object-oriented programming language.
[1222]8Summary(ja): オブジェクト指向 Python3 インタプリタ
[1216]9Name: python3
[9249]10Version: 3.4.2
11Release: 1%{?_dist_release}
[3491]12License: PSF
[1216]13Group: Development/Languages
14URL: http://www.python.org/download/releases/%{version}
[7938]15Source0: http://www.python.org/ftp/python/%{version}/Python-%{version}.tar.xz
[1216]16Source1: http://docs.python.org/py3k/archives/python-%{version}-docs-html.tar.bz2
[9249]17Patch1: python-3.4.2-lib64.patch
[1216]18BuildRoot: %{_tmppath}/%{name}-%{version}-root
[3491]19BuildRequires: expat-devel
20BuildRequires: db4-devel
21BuildRequires: gdbm-devel
22BuildRequires: sqlite3-devel
[1221]23BuildRequires: gzip tar gcc-c++ pkgconfig sed findutils
24BuildRequires: bzip2-devel
25BuildRequires: glibc-devel
26BuildRequires: ncurses-devel
27BuildRequires: openssl-devel
28BuildRequires: readline-devel
29BuildRequires: zlib-devel
[2238]30BuildRequires: libffi-devel
[6985]31BuildRequires: valgrind-devel
[1221]32Requires: bzip2
33Requires: gdbm
34Requires: ncurses
35Requires: openssl
36Requires: readline
37Requires: sqlite3
38Requires: zlib
[7938]39
[8011]40Packager: owa, Takemikaduchi
[2238]41Vendor: Project Vine
42Distribution: Vine Linux
[1221]43
[1216]44%description
45Python is an interpreted, interactive, object-oriented programming
[3491]46language.  It incorporates modules, exceptions, dynamic typing, very high
47level dynamic data types, and classes. Python combines remarkable power
48with very clear syntax. It has interfaces to many system calls and
49libraries, as well as to various window systems, and is extensible in C or
50C++. It is also usable as an extension language for applications that need
51a programmable interface.  Finally, Python is portable: it runs on many
52brands of UNIX, on PCs under Windows, MS-DOS, and OS/2, and on the
53Mac.
[1216]54
55%package devel
56Summary: The libraries and header files needed for Python development.
57Group: Development/Libraries
[7938]58Requires: %{name} = %{version}-%{release}
[1216]59
60%description devel
61The Python programming language's interpreter can be extended with
62dynamically loaded extensions and can be embedded in other programs.
63This package contains the header files and libraries needed to do
64these types of tasks.
65
66Install python-devel if you want to develop Python extensions.  The
67python package will also need to be installed.  You'll probably also
68want to install the python-docs package, which contains Python
69documentation.
70
71%package tkinter
72Summary: A graphical user interface for the Python scripting language.
73Group: Development/Languages
[7938]74Requires: %{name} = %{version}-%{release}
[1221]75Requires: tcl, tk, tix
76Requires: libX11, libxcb, libXau, libXdmcp
77BuildRequires: tcl, tk, tix
78BuildRequires: libX11-devel, libxcb-devel, libXau-devel, libXdmcp-devel
[1216]79
80%description tkinter
81The Tkinter (Tk interface) program is an graphical user interface for
82the Python scripting language.
83
84You should install the tkinter package if you'd like to use a graphical
85user interface for Python programming.
86
87%package tools
88Summary: A collection of development tools included with Python.
89Group: Development/Tools
[7938]90Requires: %{name} = %{version}-%{release}
[1216]91Requires: %{name}-tkinter = %{version}
92
93%description tools
94The Python package includes several development tools that are used
95to build python programs.
96
97%package docs
98Summary: Documentation for the Python programming language.
99Group: Documentation
100
101%description docs
102The python-docs package contains documentation on the Python
103programming language and interpreter.  The documentation is provided
104in ASCII text files and in LaTeX source files.
105
106Install the python-docs package if you'd like to use the documentation
107for the Python language.
108
109
110%prep
111%setup -q -n Python-%{version}
112%if %{_lib} == lib64
[3491]113%patch1 -p1 -b .lib64
[1216]114%endif
115
116
117%build
[3491]118./configure \
119        --prefix=%{_prefix} \
120        --libdir=%{_libdir} \
[1216]121        --enable-shared \
[3491]122        --enable-ipv6 \
123        --with-fpectl \
[1216]124        --with-wide-unicode \
[3491]125        --with-doc-strings \
126        --with-pymalloc \
[2238]127        --with-signal-module \
[3491]128        --with-system-ffi \
129        --with-threads \
130        --with-valgrind \
[9249]131        --without-ensurepip \
[3491]132%ifarch x86_64
133        --with-universal-archs=64-bit \
134%endif
135        CXX=g++;
[1216]136
[2238]137make %{?_smp_mflags}
[1216]138
[2238]139%if %{run_test}
[3491]140make test
[2238]141%endif
142
143
[1216]144%install
[3491]145[ -d "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
146echo '[install_scripts]' >setup.cfg
147echo 'install_dir='"${RPM_BUILD_ROOT}%{_bindir}" >> setup.cfg
[1216]148
[3491]149mkdir -p $RPM_BUILD_ROOT%{python_lib}/lib-dynload
150make DESTDIR=$RPM_BUILD_ROOT LIBDIR=%{_libdir} install
[1216]151
[3491]152# if --with-wide-unicode at configure
[9249]153ln -s python%{libvers}m $RPM_BUILD_ROOT%{_includedir}/python%{libvers}
[1216]154
[3491]155# replace path in pydoc
156if [ ! -z "%{binsuffix}" ]
157then
158   (
159      cd $RPM_BUILD_ROOT%{_bindir}
160      mv pydoc%{libvers} pydoc.old
161      sed 's|#!.*|#!%{_bindir}/env python'%{libvers}'|' \
162            pydoc.old > pydoc%{libvers}
163      chmod 755 pydoc%{libvers}
164      rm -f pydoc.old
165   )
166fi
[1216]167
[3491]168#  Tools
169echo '#!%{_bindir}/env python%{binsuffix}' > ${RPM_BUILD_ROOT}%{_bindir}/idle%{binsuffix}
170echo 'import os, sys' >> ${RPM_BUILD_ROOT}%{_bindir}/idle%{binsuffix}
171echo 'os.execvp("%{_bindir}/python%{binsuffix}", ["%{_bindir}/python%{binsuffix}", "%{python_lib}/idlelib/idle.py"] + sys.argv[1:])' >> ${RPM_BUILD_ROOT}%{_bindir}/idle%{binsuffix}
172echo 'print "Failed to exec Idle"' >> ${RPM_BUILD_ROOT}%{_bindir}/idle%{binsuffix}
173echo 'sys.exit(1)' >> ${RPM_BUILD_ROOT}%{_bindir}/idle%{binsuffix}
174chmod 755 $RPM_BUILD_ROOT%{_bindir}/idle%{binsuffix}
175cp -a Tools $RPM_BUILD_ROOT%{python_lib}
176
177# make file lists
178rm -f mainpkg.files
179find "$RPM_BUILD_ROOT"%{python_lib} -type f |
180        sed "s|^${RPM_BUILD_ROOT}|/|" |
181        grep -v -e '/python%{libvers}/config$' -e '_tkinter.so$' >> mainpkg.files
182
183rm -f $RPM_BUILD_ROOT%{_prefix}/bin/2to3
184find "$RPM_BUILD_ROOT""%{_prefix}"/bin -type f -o -type l |
185        sed "s|^${RPM_BUILD_ROOT}|/|" |
186        grep -v -e '/bin/2to3%{binsuffix}$' |
187        grep -v -e '/bin/pydoc%{binsuffix}$' |
188        grep -v -e '/bin/smtpd.py%{binsuffix}$' |
189        grep -v -e '/bin/idle%{binsuffix}$' >> mainpkg.files
190
191
192rm -f tools.files
193find "$RPM_BUILD_ROOT"%{python_lib}/idlelib \
194      "$RPM_BUILD_ROOT"%{python_lib}/Tools -type f |
195      sed "s|^${RPM_BUILD_ROOT}|/|" > tools.files
196echo %{_bindir}/2to3-%{binsuffix} >> tools.files
197echo %{_bindir}/pydoc%{binsuffix} >> tools.files
198##echo %{_bindir}/smtpd.py%{binsuffix} >> tools.files
199echo %{_bindir}/idle%{binsuffix} >> tools.files
200
201# docs
202mkdir -p "$RPM_BUILD_ROOT"%{config_htmldir}
203(
204   cd "$RPM_BUILD_ROOT"%{config_htmldir}
205   bunzip2 < %{SOURCE1} | tar x
206)
207
208#  fix the #! line in installed files
209find "$RPM_BUILD_ROOT" -type f -print0 |
210      xargs -0 grep -l /usr/local/bin/python | while read file
211do
212   FIXFILE="$file"
213   sed 's|^#!.*python|#!%{_bindir}/env python'"%{binsuffix}"'|' \
214         "$FIXFILE" >/tmp/fix-python-path.$$
215   cat /tmp/fix-python-path.$$ > "$FIXFILE"
216   rm -f /tmp/fix-python-path.$$
217done
218
219#  check to see if there are any straggling #! lines
220find "$RPM_BUILD_ROOT" -type f | xargs egrep -n '^#! */usr/local/bin/python' \
221      | grep ':1:#!' >/tmp/python-rpm-files.$$ || true
222if [ -s /tmp/python-rpm-files.$$ ]
223then
224   echo '*****************************************************'
225   cat /tmp/python-rpm-files.$$
226   cat <<@EOF
227   *****************************************************
228     There are still files referencing /usr/local/bin/python in the
229     install directory.  They are listed above.  Please fix the .spec
230     file and try again.  If you are an end-user, you probably want
231     to report this to jafo-rpms@tummy.com as well.
232   *****************************************************
233@EOF
234   rm -f /tmp/python-rpm-files.$$
235   exit 1
[1216]236fi
[3491]237rm -f /tmp/python-rpm-files.$$
[1216]238
239
240%post -p /sbin/ldconfig
241%postun -p /sbin/ldconfig
242%clean
243rm -fr $RPM_BUILD_ROOT
244
[3491]245%files -f mainpkg.files
[1216]246%defattr(-, root, root)
[3491]247%doc LICENSE
248%doc Misc/ACKS Misc/HISTORY Misc/NEWS Misc/Porting Misc/README
249%attr(755,root,root) %dir %{python_lib}/
250%{_libdir}/libpython*
251%{_mandir}/man1/python%{libvers}.1*
[7938]252%{_mandir}/man1/%{name}.1*
[1216]253
254%files devel
255%defattr(-,root,root)
[6985]256%dir %{_includedir}/python%{libvers}m
257%{_includedir}/python%{libvers}m/*.h
[3491]258%{_includedir}/python%{libvers}
259%{_libdir}/pkgconfig/*.pc
[1216]260
[3491]261%files -f tools.files tools
[1216]262%defattr(-,root,root)
263
264%files tkinter
265%defattr(-,root,root)
266%{python_lib}/tkinter
[3491]267%{python_lib}/lib-dynload/_tkinter.*.so*
[1216]268
269%files docs
270%defattr(-,root,root)
[3491]271%{config_htmldir}/*
[1216]272
273
274%changelog
[9249]275* Sun Jan 11 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.4.2-1
276- new upstream release
277- update Patch1 (python-3.4.2-lib64.patch)
278
[8940]279* Sun Sep 07 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.3.3-3
280- remove configure option "--enable-profiling"
281
[8758]282* Sun Jul 06 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.3.3-2
283- rebuild with libffi-3.0.13
284
[8011]285* Sun Nov 24 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.3.3-1
286- new upstream release
287
[7938]288* Sat Oct 26 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.3.2-1
289- updated python to 3.3.2
290
[7297]291* Sun Jan  6 2013 IWAI, Masaharu <iwai@alib.jp> 3.3.0-2
292- build with Tcl/Tk 8.5.7-1
293
[6985]294* Wed Oct 24 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.3.0-1
295- updated python to 3.3.0
296- update Patch1 (python-3.3.0-lib64.patch)
297- add BuildRequires: valgrind-devel
298
[3491]299* Sat Apr 16 2011 Shu KONNO <owa@bg.wakwak.com> 3.2-1
300- updated python to 3.2
301- updated python-*-docs-html to 3.2
302- dropt all patchs
303- added python-3.2b2-lib64.patch
304- referred to the review Python-3.2/Misc/RPM/python-3.2.spec
305
[2500]306* Fri Jan 14 2011 Shu KONNO <owa@bg.wakwak.com> 3.1.3-2
307- rebuilt with openssl-1.0.0c
308
[2238]309* Mon Nov 29 2010 Shu KONNO <owa@bg.wakwak.com> 3.1.3-1
310- updated python to 3.1.3
311- added python-3.1.3-locale.patch
312- dropt python-3.1.2-lib64.patch
313- added python-3.1.3-lib64-*.patchs
314  python-3.1.3-lib64-Makefile.patch
315  python-3.1.3-lib64-setup.patch
316  python-3.1.3-lib64-site.patch
317  python-3.1.3-lib64-install.patch
318  python-3.1.3-lib64-sysconfig.patch
319  python-3.1.3-lib64-getpath.patch
320  python-3.1.3-lib64-test_install.patch
321- added run_test macro to run unit test
322- added BR: libffi
323
[1902]324* Sun Sep 26 2010 Shu KONNO <owa@bg.wakwak.com> 3.1.2-4
325- rebuilt with rpm-4.8.1 for pkg-config
326
[1222]327* Sun Jun 20 2010 Shu KONNO <owa@bg.wakwak.com> 3.1.2-3
328- spec in utf-8
329
[1221]330* Sun Jun 20 2010 Shu KONNO <owa@bg.wakwak.com> 3.1.2-2
331- added missings in BuildRequires, Requires
332
[1216]333* Fri Jun 18 2010 Shu KONNO <owa@bg.wakwak.com> 3.1.2-1
334- initial build for VineSeed
335
Note: See TracBrowser for help on using the repository browser.