]> git.pld-linux.org Git - packages/python-llfuse.git/blame - python-llfuse.spec
- python 3.6
[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
7%define module llfuse
8Summary: Python bindings for the low level FUSE API
9Name: python-%{module}
10Version: 0.40
04c17168 11Release: 6
17a79f18
AM
12License: GPL v2
13Group: Libraries/Python
14Source0: https://python-llfuse.googlecode.com/files/llfuse-%{version}.tar.bz2
15# Source0-md5: bd8d07ddb6061ab03816e636efa37b5b
16URL: https://code.google.com/p/python-llfuse/
97c8ab9e 17BuildRequires: rpmbuild(macros) >= 1.710
17a79f18
AM
18BuildRequires: libfuse-devel >= 2.8.0
19BuildRequires: rpm-pythonprov
20%if %{with python2}
21BuildRequires: python-devel
22BuildRequires: python-distribute
23%endif
24%if %{with python3}
25BuildRequires: python3-devel
26BuildRequires: python3-distribute
27BuildRequires: python3-modules
28%endif
29BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
30
31%description
32Python bindings for the low level FUSE API.
33
34%package -n python3-%{module}
35Summary: Python bindings for the low level FUSE API
36Group: Libraries/Python
37
38%description -n python3-%{module}
39Python bindings for the low level FUSE API.
40
41%package apidocs
42Summary: %{module} API documentation
43Summary(pl.UTF-8): Dokumentacja API %{module}
44Group: Documentation
45
46%description apidocs
47API documentation for %{module}.
48
49%description apidocs -l pl.UTF-8
50Dokumentacja API %{module}.
51
52%prep
53%setup -q -n %{module}-%{version}
54
55%build
56%if %{with python2}
3c47d7d9 57%py_build %{?with_tests:test}
17a79f18
AM
58%endif
59
60%if %{with python3}
3c47d7d9 61%py3_build %{?with_tests:test}
17a79f18
AM
62%endif
63
64%if %{with doc}
65cd docs
66%{__make} -j1 html
67rm -rf _build/html/_sources
68%endif
69
70%install
71rm -rf $RPM_BUILD_ROOT
72
73%if %{with python2}
3c47d7d9 74%py_install
17a79f18
AM
75
76%py_postclean
77%endif
78
79%if %{with python3}
3c47d7d9 80%py3_install
17a79f18
AM
81%endif
82
83# in case there are examples provided
84%if %{with python2}
85install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
86cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
87%endif
88%if %{with python3}
89install -d $RPM_BUILD_ROOT%{_examplesdir}/python3-%{module}-%{version}
90cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/python3-%{module}-%{version}
91find $RPM_BUILD_ROOT%{_examplesdir}/python3-%{module}-%{version} -name '*.py' \
92 | xargs sed -i '1s|^#!.*python\b|#!%{__python3}|'
93%endif
94
95%clean
96rm -rf $RPM_BUILD_ROOT
97
98%if %{with python2}
99%files
100%defattr(644,root,root,755)
101%doc Changes.txt
102%dir %{py_sitedir}/llfuse
103%{py_sitedir}/llfuse/*.py[co]
104%attr(755,root,root) %{py_sitedir}/llfuse/*.so
105%if "%{py_ver}" > "2.4"
106%{py_sitedir}/llfuse-*.egg-info
107%endif
108%{_examplesdir}/%{name}-%{version}
109%endif
110
111%if %{with python3}
112%files -n python3-%{module}
113%defattr(644,root,root,755)
114%doc Changes.txt
115%dir %{py3_sitedir}/%{module}
116%{py3_sitedir}/%{module}/*.py*
117%{py3_sitedir}/%{module}/__pycache__
118%attr(755,root,root) %{py3_sitedir}/%{module}/capi*.so
119%{py3_sitedir}/%{module}-%{version}-py*.egg-info
120%{_examplesdir}/python3-%{module}-%{version}
121%endif
122
123%if %{with doc}
124%files apidocs
125%defattr(644,root,root,755)
126%doc docs/_build/html/*
127%endif
This page took 0.152096 seconds and 4 git commands to generate.