]> git.pld-linux.org Git - packages/python-llfuse.git/blame - python-llfuse.spec
- up to 1.3.4
[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}
429ee303
AM
10Version: 1.3.4
11Release: 1
17a79f18
AM
12License: GPL v2
13Group: Libraries/Python
429ee303
AM
14Source0: https://bitbucket.org/nikratio/python-llfuse/downloads/%{module}-%{version}.tar.bz2
15# Source0-md5: 43a123c46d5438f15cd6bcafa16a0094
16Patch0: build.patch
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
21%if %{with python2}
22BuildRequires: python-devel
23BuildRequires: python-distribute
429ee303 24BuildRequires: python-contextlib2
17a79f18
AM
25%endif
26%if %{with python3}
27BuildRequires: python3-devel
28BuildRequires: python3-distribute
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}
429ee303 57%patch0 -p1
17a79f18
AM
58
59%build
60%if %{with python2}
3c47d7d9 61%py_build %{?with_tests:test}
17a79f18
AM
62%endif
63
64%if %{with python3}
3c47d7d9 65%py3_build %{?with_tests:test}
17a79f18
AM
66%endif
67
68%if %{with doc}
69cd docs
70%{__make} -j1 html
71rm -rf _build/html/_sources
72%endif
73
74%install
75rm -rf $RPM_BUILD_ROOT
76
77%if %{with python2}
3c47d7d9 78%py_install
17a79f18
AM
79
80%py_postclean
81%endif
82
83%if %{with python3}
3c47d7d9 84%py3_install
17a79f18
AM
85%endif
86
87# in case there are examples provided
88%if %{with python2}
89install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
90cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
91%endif
92%if %{with python3}
93install -d $RPM_BUILD_ROOT%{_examplesdir}/python3-%{module}-%{version}
94cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/python3-%{module}-%{version}
95find $RPM_BUILD_ROOT%{_examplesdir}/python3-%{module}-%{version} -name '*.py' \
96 | xargs sed -i '1s|^#!.*python\b|#!%{__python3}|'
97%endif
98
99%clean
100rm -rf $RPM_BUILD_ROOT
101
102%if %{with python2}
103%files
104%defattr(644,root,root,755)
429ee303
AM
105%doc Changes.rst
106%attr(755,root,root) %{py_sitedir}/%{module}.so
17a79f18
AM
107%if "%{py_ver}" > "2.4"
108%{py_sitedir}/llfuse-*.egg-info
109%endif
110%{_examplesdir}/%{name}-%{version}
111%endif
112
113%if %{with python3}
114%files -n python3-%{module}
115%defattr(644,root,root,755)
429ee303
AM
116%doc Changes.rst
117%attr(755,root,root) %{py3_sitedir}/%{module}.*.so
17a79f18
AM
118%{py3_sitedir}/%{module}-%{version}-py*.egg-info
119%{_examplesdir}/python3-%{module}-%{version}
120%endif
121
122%if %{with doc}
123%files apidocs
124%defattr(644,root,root,755)
125%doc docs/_build/html/*
126%endif
This page took 0.08335 seconds and 4 git commands to generate.