Subversion Repositories configs

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
136 - 1
# sitelib for noarch packages, sitearch for others (remove the unneeded one)
2
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
3
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
4
 
5
Name:
6
Version:
7
Release:        1%{?dist}
8
Summary:
9
 
10
Group:          Development/Languages
11
License:
12
URL:
13
Source0:
14
 
15
BuildArch:
16
BuildRequires:  python-devel
17
 
18
%description
19
 
20
 
21
%prep
22
%setup -q
23
 
24
 
25
%build
26
# Remove CFLAGS=... for noarch packages (unneeded)
27
CFLAGS="$RPM_OPT_FLAGS" %{__python} setup.py build
28
 
29
 
30
%install
31
rm -rf $RPM_BUILD_ROOT
32
%{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
33
 
34
 
35
%clean
36
rm -rf $RPM_BUILD_ROOT
37
 
38
 
39
%files
40
%defattr(-,root,root,-)
41
%doc
42
# For noarch packages: sitelib
43
%{python_sitelib}/*
44
# For arch-specific packages: sitearch
45
%{python_sitearch}/*
46
 
47
 
48
%changelog