xpra icon
Bug tracker and wiki

This bug tracker and wiki are being discontinued
please use https://github.com/Xpra-org/xpra instead.


Ticket #849: python-palib.spec

File python-palib.spec, 1.6 KB (added by Antoine Martin, 6 years ago)

specfile

Line 
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
15Name:           python-palib
16Version:        1.0
17Release:        1%{?dist}
18Summary:        Python bindings for pulseaudio
19License:        GPLv3+
20URL:            https://code.google.com/p/pypactl/source/browse/trunk
21Source0:        palib-%{version}.tar.xz
22BuildArch:      noarch
23
24%description
25Python bindings for pulseaudio
26
27%if 0%{?with_python3}
28%package -n python3-palib
29Summary:        Python3 bindings for pulseaudio
30
31%description -n python3-palib
32Python3 bindings for pulseaudio
33%endif
34
35%prep
36%setup -qn palib-%{version}
37
38%if 0%{?with_python3}
39rm -rf %{py3dir}
40cp -a . %{py3dir}
41%endif
42
43%build
44CFLAGS="%{optflags}" %{__python2} setup.py build
45
46%if 0%{?with_python3}
47pushd %{py3dir}
48CFLAGS="%{optflags}" %{__python3} setup.py build
49popd
50%endif
51
52%install
53%if 0%{?with_python3}
54pushd %{py3dir}
55%{__python3} setup.py install --root %{buildroot}
56popd
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