]> git.pld-linux.org Git - packages/python-fuse.git/blob - python-fuse.spec
- fixed dirs ownership, updated dependencies; release 2
[packages/python-fuse.git] / python-fuse.spec
1 #
2 # Conditional build:
3 %bcond_without  python2 # CPython 2.x module
4 %bcond_without  python3 # CPython 3.x module
5 #
6 %define         module  fuse
7 Summary:        Python interface to FUSE (Filesystem in USErspace)
8 Summary(pl.UTF-8):      Pythonowy interfejs do FUSE (systemu plików w przestrzeni użytkownika)
9 Name:           python-%{module}
10 Version:        1.0.7
11 Release:        2
12 License:        LGPL v2.1
13 Group:          Development/Languages/Python
14 # TODO: use named tarballs
15 #Source0:       https://github.com/libfuse/python-fuse/archive/v%{version}/%{name}-%{version}.tar.gz
16 Source0:        https://github.com/libfuse/python-fuse/archive/refs/tags/v%{version}.tar.gz
17 # Source0-md5:  e463d5fb1ff20df2478cba670eaf56da
18 URL:            https://github.com/libfuse/python-fuse
19 BuildRequires:  libfuse-devel >= 2.1
20 BuildRequires:  pkgconfig
21 %if %{with python2}
22 BuildRequires:  python-devel >= 1:2.7
23 BuildRequires:  python-setuptools
24 %endif
25 %if %{with python3}
26 BuildRequires:  python3-devel >= 1:3.5
27 BuildRequires:  python3-setuptools
28 %endif
29 BuildRequires:  rpm-pythonprov
30 BuildRequires:  rpmbuild(macros) >= 1.714
31 Requires:       python-modules >= 1:2.7
32 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
33
34 %description
35 Python interface to FUSE (Filesystem in USErspace).
36
37 %description -l pl.UTF-8
38 Pythonowy interfejs do FUSE (Filesystem in USErspace - systemu plików
39 w przestrzeni użytkownika).
40
41 %package -n python3-%{module}
42 Summary:        Python interface to FUSE (Filesystem in USErspace)
43 Summary(pl.UTF-8):      Pythonowy interfejs do FUSE (systemu plików w przestrzeni użytkownika)
44 Group:          Libraries/Python
45 Requires:       python3-modules >= 1:3.5
46
47 %description -n python3-%{module}
48 Python interface to FUSE (Filesystem in USErspace).
49
50 %description -n python3-%{module} -l pl.UTF-8
51 Pythonowy interfejs do FUSE (Filesystem in USErspace - systemu plików
52 w przestrzeni użytkownika).
53
54 %prep
55 %setup -q
56
57 %build
58 %if %{with python2}
59 %py_build
60 %endif
61
62 %if %{with python3}
63 %py3_build
64 %endif
65
66 %install
67 rm -rf $RPM_BUILD_ROOT
68
69 %if %{with python2}
70 %py_install
71
72 %py_postclean
73 %endif
74
75 %if %{with python3}
76 %py3_install
77 %endif
78
79 %if %{with python2}
80 install -d $RPM_BUILD_ROOT%{_examplesdir}/python-%{module}-%{version}
81 cp -a example/* $RPM_BUILD_ROOT%{_examplesdir}/python-%{module}-%{version}
82 find $RPM_BUILD_ROOT%{_examplesdir}/python-%{module}-%{version} -name '*.py' \
83         | xargs sed -i '1s|^#!.*python\b|#!%{__python}|'
84 %endif
85
86 %if %{with python3}
87 install -d $RPM_BUILD_ROOT%{_examplesdir}/python3-%{module}-%{version}
88 cp -a example/* $RPM_BUILD_ROOT%{_examplesdir}/python3-%{module}-%{version}
89 find $RPM_BUILD_ROOT%{_examplesdir}/python3-%{module}-%{version} -name '*.py' \
90         | xargs sed -i '1s|^#!.*python\b|#!%{__python3}|'
91 %endif
92
93 %clean
94 rm -rf $RPM_BUILD_ROOT
95
96 %files
97 %defattr(644,root,root,755)
98 %doc AUTHORS FAQ README*
99 %{py_sitedir}/fuse.py[co]
100 %dir %{py_sitedir}/fuseparts
101 %{py_sitedir}/fuseparts/*.py[co]
102 %attr(755,root,root) %{py_sitedir}/fuseparts/*.so
103 %{py_sitedir}/fuse_python-%{version}-py*.egg-info
104 %{_examplesdir}/%{name}-%{version}
105
106 %if %{with python3}
107 %files -n python3-%{module}
108 %defattr(644,root,root,755)
109 %doc AUTHORS FAQ README*
110 %{py3_sitedir}/fuse.py
111 %{py3_sitedir}/__pycache__/fuse.cpython-*.py[co]
112 %dir %{py3_sitedir}/fuseparts
113 %{py3_sitedir}/fuseparts/*.py
114 %attr(755,root,root) %{py3_sitedir}/fuseparts/*.so
115 %{py3_sitedir}/fuseparts/__pycache__
116 %{py3_sitedir}/fuse_python-%{version}-py*.egg-info
117 %{_examplesdir}/python3-%{module}-%{version}
118 %endif
This page took 0.053005 seconds and 4 git commands to generate.