]> git.pld-linux.org Git - packages/python-llfuse.git/blame - python-llfuse.spec
- release 2 (by relup.sh)
[packages/python-llfuse.git] / python-llfuse.spec
CommitLineData
17a79f18
AM
1#
2# Conditional build:
3%bcond_without tests # do not perform "make test"
4%bcond_without python2 # CPython 2.x module
5%bcond_without python3 # CPython 3.x module
6
8cc64e1f 7%define module llfuse
17a79f18
AM
8Summary: Python bindings for the low level FUSE API
9Name: python-%{module}
510394b2 10Version: 1.3.6
8879005f 11Release: 2
17a79f18
AM
12License: GPL v2
13Group: Libraries/Python
510394b2
AM
14Source0: https://pypi.debian.net/llfuse/%{module}-%{version}.tar.bz2
15# Source0-md5: 4996674fa327c6c93174c1f71961ac6c
16Patch0: x32.patch
429ee303 17URL: https://github.com/python-llfuse/python-llfuse
97c8ab9e 18BuildRequires: rpmbuild(macros) >= 1.710
17a79f18
AM
19BuildRequires: libfuse-devel >= 2.8.0
20BuildRequires: rpm-pythonprov
55c19750 21BuildRequires: python-Cython
17a79f18
AM
22%if %{with python2}
23BuildRequires: python-devel
24BuildRequires: python-distribute
429ee303 25BuildRequires: python-contextlib2
17a79f18
AM
26%endif
27%if %{with python3}
28BuildRequires: python3-devel
29BuildRequires: python3-distribute
429ee303 30BuildRequires: python3-contextlib2
17a79f18
AM
31BuildRequires: python3-modules
32%endif
33BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
34
35%description
36Python bindings for the low level FUSE API.
37
38%package -n python3-%{module}
39Summary: Python bindings for the low level FUSE API
40Group: Libraries/Python
41
42%description -n python3-%{module}
43Python bindings for the low level FUSE API.
44
45%package apidocs
46Summary: %{module} API documentation
47Summary(pl.UTF-8): Dokumentacja API %{module}
48Group: Documentation
49
50%description apidocs
51API documentation for %{module}.
52
53%description apidocs -l pl.UTF-8
54Dokumentacja API %{module}.
55
56%prep
57%setup -q -n %{module}-%{version}
55c19750 58%ifarch x32
510394b2 59%patch0 -p1
55c19750 60%endif
17a79f18
AM
61
62%build
55c19750
JR
63./setup.py build_cython
64
17a79f18 65%if %{with python2}
3c47d7d9 66%py_build %{?with_tests:test}
17a79f18
AM
67%endif
68
69%if %{with python3}
3c47d7d9 70%py3_build %{?with_tests:test}
17a79f18
AM
71%endif
72
73%if %{with doc}
74cd docs
75%{__make} -j1 html
76rm -rf _build/html/_sources
77%endif
78
79%install
80rm -rf $RPM_BUILD_ROOT
81
82%if %{with python2}
3c47d7d9 83%py_install
17a79f18
AM
84
85%py_postclean
86%endif
87
88%if %{with python3}
3c47d7d9 89%py3_install
17a79f18
AM
90%endif
91
92# in case there are examples provided
93%if %{with python2}
94install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
95cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
e9a88037
JR
96
97%{__sed} -E -i -e '1s,#!\s*/usr/bin/env\s+python3(\s|$),#!%{__python}\1,' \
98 $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}/*.py
17a79f18
AM
99%endif
100%if %{with python3}
101install -d $RPM_BUILD_ROOT%{_examplesdir}/python3-%{module}-%{version}
102cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/python3-%{module}-%{version}
e9a88037
JR
103
104%{__sed} -E -i -e '1s,#!\s*/usr/bin/env\s+python3(\s|$),#!%{__python3}\1,' \
105 $RPM_BUILD_ROOT%{_examplesdir}/python3-%{module}-%{version}/*.py
17a79f18
AM
106%endif
107
108%clean
109rm -rf $RPM_BUILD_ROOT
110
111%if %{with python2}
112%files
113%defattr(644,root,root,755)
429ee303
AM
114%doc Changes.rst
115%attr(755,root,root) %{py_sitedir}/%{module}.so
17a79f18
AM
116%if "%{py_ver}" > "2.4"
117%{py_sitedir}/llfuse-*.egg-info
118%endif
119%{_examplesdir}/%{name}-%{version}
120%endif
121
122%if %{with python3}
123%files -n python3-%{module}
124%defattr(644,root,root,755)
429ee303
AM
125%doc Changes.rst
126%attr(755,root,root) %{py3_sitedir}/%{module}.*.so
17a79f18
AM
127%{py3_sitedir}/%{module}-%{version}-py*.egg-info
128%{_examplesdir}/python3-%{module}-%{version}
129%endif
130
131%if %{with doc}
132%files apidocs
133%defattr(644,root,root,755)
134%doc docs/_build/html/*
135%endif
This page took 0.111495 seconds and 4 git commands to generate.