]> git.pld-linux.org Git - projects/template-specs.git/blob - python.spec
- preamble fix
[projects/template-specs.git] / python.spec
1 %define         module  template
2 Summary:        -
3 Summary(pl.UTF-8):      -
4 Name:           python-%{module}
5 Version:        _
6 Release:        0.1
7 License:        - (enter GPL/GPL v2/GPL v3/LGPL/BSD/BSD-like/other license name here)
8 Group:          Development/Languages/Python
9 Source0:        %{name}-%{version}.tar.gz
10 # Source0-md5:  -
11 URL:            -
12 # remove BR: python-devel for 'noarch' packages.
13 BuildRequires:  python-devel
14 BuildRequires:  python-distribute
15 BuildRequires:  rpm-pythonprov
16 # if py_postclean is used
17 BuildRequires:  rpmbuild(macros) >= 1.219
18 #Requires:              python-libs
19 Requires:               python-modules
20 #BuildArch:     noarch
21 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
22
23 %description
24
25 %description -l pl.UTF-8
26
27 %prep
28 %setup -q -n %{module}-%{version}
29
30 # fix #!/usr/bin/env python -> #!/usr/bin/python:
31 %{__sed} -i -e '1s,^#!.*python,#!%{__python},' %{name}.py
32
33 %build
34 # CC/CFLAGS is only for arch packages - remove on noarch packages
35 CC="%{__cc}" \
36 CFLAGS="%{rpmcflags}" \
37 %{__python} setup.py build
38
39 %install
40 rm -rf $RPM_BUILD_ROOT
41 %{__python} setup.py install \
42         --optimize=2 \
43         --root=$RPM_BUILD_ROOT
44
45 # change %{py_sitedir} to %{py_sitescriptdir} for 'noarch' packages!
46 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
47 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
48 %py_postclean
49
50 %clean
51 rm -rf $RPM_BUILD_ROOT
52
53 %files
54 %defattr(644,root,root,755)
55 %doc AUTHORS CREDITS ChangeLog NEWS README THANKS TODO
56 # change %{py_sitedir} to %{py_sitescriptdir} for 'noarch' packages!
57 %{py_sitedir}/*.py[co]
58 %attr(755,root,root) %{py_sitedir}/*.so
59 %if "%{py_ver}" > "2.4"
60 %{py_sitedir}/TEMPLATE-*.egg-info
61 %endif
This page took 0.051077 seconds and 3 git commands to generate.