1 | # Remove private provides from .so files in the python_sitearch directory |
---|
2 | %global __provides_exclude_from ^%{python_sitearch}/.*\\.so$ |
---|
3 | |
---|
4 | %if 0%{?rhel} && 0%{?rhel} <= 6 |
---|
5 | %{!?__python2: %global __python2 /usr/bin/python2} |
---|
6 | %{!?python2_sitelib: %global python2_sitelib %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")} |
---|
7 | %endif |
---|
8 | |
---|
9 | #this spec file is for both Fedora and CentOS |
---|
10 | #only Fedora has Python3 at present: |
---|
11 | %if 0%{?fedora} |
---|
12 | %define with_python3 1 |
---|
13 | %endif |
---|
14 | |
---|
15 | Name: python-palib |
---|
16 | Version: 1.0 |
---|
17 | Release: 1%{?dist} |
---|
18 | Summary: Python bindings for pulseaudio |
---|
19 | License: GPLv3+ |
---|
20 | URL: https://code.google.com/p/pypactl/source/browse/trunk |
---|
21 | Source0: palib-%{version}.tar.xz |
---|
22 | BuildArch: noarch |
---|
23 | |
---|
24 | %description |
---|
25 | Python bindings for pulseaudio |
---|
26 | |
---|
27 | %if 0%{?with_python3} |
---|
28 | %package -n python3-palib |
---|
29 | Summary: Python3 bindings for pulseaudio |
---|
30 | |
---|
31 | %description -n python3-palib |
---|
32 | Python3 bindings for pulseaudio |
---|
33 | %endif |
---|
34 | |
---|
35 | %prep |
---|
36 | %setup -qn palib-%{version} |
---|
37 | |
---|
38 | %if 0%{?with_python3} |
---|
39 | rm -rf %{py3dir} |
---|
40 | cp -a . %{py3dir} |
---|
41 | %endif |
---|
42 | |
---|
43 | %build |
---|
44 | CFLAGS="%{optflags}" %{__python2} setup.py build |
---|
45 | |
---|
46 | %if 0%{?with_python3} |
---|
47 | pushd %{py3dir} |
---|
48 | CFLAGS="%{optflags}" %{__python3} setup.py build |
---|
49 | popd |
---|
50 | %endif |
---|
51 | |
---|
52 | %install |
---|
53 | %if 0%{?with_python3} |
---|
54 | pushd %{py3dir} |
---|
55 | %{__python3} setup.py install --root %{buildroot} |
---|
56 | popd |
---|
57 | %endif |
---|
58 | |
---|
59 | %{__python2} setup.py install --root %{buildroot} |
---|
60 | |
---|
61 | %files |
---|
62 | %{python2_sitelib}/palib* |
---|
63 | |
---|
64 | %if 0%{?with_python3} |
---|
65 | %files -n python3-palib |
---|
66 | %{python3_sitelib}/palib* |
---|
67 | %endif |
---|
68 | |
---|
69 | %changelog |
---|
70 | * Thu May 28 2015 Antoine Martin <antoine@devloop.org.uk> 1.0-1 |
---|
71 | - Initial package |
---|