]> git.pld-linux.org Git - projects/template-specs.git/blame - python.spec
- updated
[projects/template-specs.git] / python.spec
CommitLineData
4cdaa512
ER
1#
2# Conditional build:
3%bcond_without tests # do not perform "make test"
4
b81eefa5 5%define module template
7170a7b1
ER
6Summary: -
7Summary(pl.UTF-8): -
b81eefa5 8Name: python-%{module}
7170a7b1
ER
9Version: _
10Release: 0.1
11License: - (enter GPL/GPL v2/GPL v3/LGPL/BSD/BSD-like/other license name here)
12Group: Development/Languages/Python
13Source0: %{name}-%{version}.tar.gz
14# Source0-md5: -
7170a7b1 15URL: -
dbb3e196 16# remove BR: python-devel for 'noarch' packages.
278010a4 17BuildRequires: python-devel
dbb3e196 18BuildRequires: python-distribute
0a48bf0d 19BuildRequires: rpm-pythonprov
7592d76f
JB
20# if py_postclean is used
21BuildRequires: rpmbuild(macros) >= 1.219
10305643 22#Requires: python-libs
23Requires: python-modules
7170a7b1
ER
24#BuildArch: noarch
25BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
26
27%description
28
e6f4b058 29%description -l pl.UTF-8
30
7170a7b1 31%prep
641675c1 32%setup -q -n %{module}-%{version}
7170a7b1 33
5a020810
ER
34# fix #!/usr/bin/env python -> #!/usr/bin/python:
35%{__sed} -i -e '1s,^#!.*python,#!%{__python},' %{name}.py
36
7170a7b1 37%build
46094905
ER
38# CC/CFLAGS is only for arch packages - remove on noarch packages
39CC="%{__cc}" \
40CFLAGS="%{rpmcflags}" \
7592d76f 41%{__python} setup.py build
7170a7b1
ER
42
43%install
44rm -rf $RPM_BUILD_ROOT
7592d76f 45%{__python} setup.py install \
e7663425 46 --skip-build \
7170a7b1
ER
47 --optimize=2 \
48 --root=$RPM_BUILD_ROOT
49
8424aa58
ER
50install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
51cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
52
9a83d846 53# change %{py_sitedir} to %{py_sitescriptdir} for 'noarch' packages!
e5a26a61
ER
54%py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
55%py_comp $RPM_BUILD_ROOT%{py_sitedir}
56%py_postclean
57
7170a7b1
ER
58%clean
59rm -rf $RPM_BUILD_ROOT
60
7170a7b1
ER
61%files
62%defattr(644,root,root,755)
63%doc AUTHORS CREDITS ChangeLog NEWS README THANKS TODO
9a83d846 64# change %{py_sitedir} to %{py_sitescriptdir} for 'noarch' packages!
e5a26a61
ER
65%{py_sitedir}/*.py[co]
66%attr(755,root,root) %{py_sitedir}/*.so
ef0b62a1 67%if "%{py_ver}" > "2.4"
47501bae 68%{py_sitedir}/TEMPLATE-*.egg-info
ef278603 69%endif
8424aa58 70%{_examplesdir}/%{name}-%{version}
This page took 0.180365 seconds and 4 git commands to generate.