]> git.pld-linux.org Git - packages/python-llfuse.git/blame - python-llfuse.spec
Release 6 (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
4ed66399 11Release: 6
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
429ee303 29BuildRequires: python3-contextlib2
17a79f18
AM
30BuildRequires: python3-modules
31%endif
32BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
33
34%description
35Python bindings for the low level FUSE API.
36
37%package -n python3-%{module}
38Summary: Python bindings for the low level FUSE API
39Group: Libraries/Python
40
41%description -n python3-%{module}
42Python bindings for the low level FUSE API.
43
44%package apidocs
45Summary: %{module} API documentation
46Summary(pl.UTF-8): Dokumentacja API %{module}
47Group: Documentation
48
49%description apidocs
50API documentation for %{module}.
51
52%description apidocs -l pl.UTF-8
53Dokumentacja API %{module}.
54
55%prep
56%setup -q -n %{module}-%{version}
55c19750 57%ifarch x32
510394b2 58%patch0 -p1
55c19750 59%endif
17a79f18
AM
60
61%build
55c19750
JR
62./setup.py build_cython
63
17a79f18 64%if %{with python2}
3c47d7d9 65%py_build %{?with_tests:test}
17a79f18
AM
66%endif
67
68%if %{with python3}
3c47d7d9 69%py3_build %{?with_tests:test}
17a79f18
AM
70%endif
71
72%if %{with doc}
73cd docs
74%{__make} -j1 html
75rm -rf _build/html/_sources
76%endif
77
78%install
79rm -rf $RPM_BUILD_ROOT
80
81%if %{with python2}
3c47d7d9 82%py_install
17a79f18
AM
83
84%py_postclean
85%endif
86
87%if %{with python3}
3c47d7d9 88%py3_install
17a79f18
AM
89%endif
90
91# in case there are examples provided
92%if %{with python2}
93install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
94cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
e9a88037
JR
95
96%{__sed} -E -i -e '1s,#!\s*/usr/bin/env\s+python3(\s|$),#!%{__python}\1,' \
97 $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}/*.py
17a79f18
AM
98%endif
99%if %{with python3}
100install -d $RPM_BUILD_ROOT%{_examplesdir}/python3-%{module}-%{version}
101cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/python3-%{module}-%{version}
e9a88037
JR
102
103%{__sed} -E -i -e '1s,#!\s*/usr/bin/env\s+python3(\s|$),#!%{__python3}\1,' \
104 $RPM_BUILD_ROOT%{_examplesdir}/python3-%{module}-%{version}/*.py
17a79f18
AM
105%endif
106
107%clean
108rm -rf $RPM_BUILD_ROOT
109
110%if %{with python2}
111%files
112%defattr(644,root,root,755)
429ee303
AM
113%doc Changes.rst
114%attr(755,root,root) %{py_sitedir}/%{module}.so
17a79f18
AM
115%if "%{py_ver}" > "2.4"
116%{py_sitedir}/llfuse-*.egg-info
117%endif
118%{_examplesdir}/%{name}-%{version}
119%endif
120
121%if %{with python3}
122%files -n python3-%{module}
123%defattr(644,root,root,755)
429ee303
AM
124%doc Changes.rst
125%attr(755,root,root) %{py3_sitedir}/%{module}.*.so
17a79f18
AM
126%{py3_sitedir}/%{module}-%{version}-py*.egg-info
127%{_examplesdir}/python3-%{module}-%{version}
128%endif
129
130%if %{with doc}
131%files apidocs
132%defattr(644,root,root,755)
133%doc docs/_build/html/*
134%endif
This page took 0.141854 seconds and 4 git commands to generate.