]> git.pld-linux.org Git - packages/python-fs.git/blob - python-fs.spec
- release 2 (by relup.sh)
[packages/python-fs.git] / python-fs.spec
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 Summary:        Filesystem abstraction layer for Python 2
8 Summary(pl.UTF-8):      Warstwa abstrakcji systemu plików dla Pythona 2
9 Name:           python-fs
10 Version:        2.0.2
11 Release:        2
12 License:        BSD
13 Group:          Libraries/Python
14 #Source0Download: https://pypi.python.org/simple/fs/
15 Source0:        https://files.pythonhosted.org/packages/source/f/fs/fs-%{version}.tar.gz
16 # Source0-md5:  419760a993e45a585e5db939e731d435
17 Patch0:         %{name}-py3-requires.patch
18 URL:            https://pypi.python.org/pypi/fs/
19 %if %{with tests} && %(locale -a | grep -q '^C\.UTF-8$'; echo $?)
20 BuildRequires:  glibc-localedb-all
21 %endif
22 %if %{with python2}
23 BuildRequires:  python-modules >= 1:2.7
24 BuildRequires:  python-setuptools
25 %if %{with tests}
26 BuildRequires:  python-appdirs >= 1.4.0
27 BuildRequires:  python-enum34 >= 1.1.6
28 BuildRequires:  python-mock
29 BuildRequires:  python-pyftpdlib
30 BuildRequires:  python-pytz
31 BuildRequires:  python-scandir >= 1.5
32 BuildRequires:  python-six >= 1.10.0
33 %endif
34 %endif
35 %if %{with python3}
36 BuildRequires:  python3-modules >= 1:3.3
37 BuildRequires:  python3-setuptools
38 %if %{with tests}
39 BuildRequires:  python3-appdirs >= 1.4.0
40 %if "%{py3_ver}" < "3.4"
41 BuildRequires:  python3-enum34 >= 1.1.6
42 %endif
43 #BuildRequires: python3-mock
44 BuildRequires:  python3-pyftpdlib
45 BuildRequires:  python3-pytz
46 %if "%{py3_ver}" < "3.5"
47 BuildRequires:  python3-scandir >= 1.5
48 %endif
49 BuildRequires:  python3-six >= 1.10.0
50 %endif
51 %endif
52 BuildRequires:  rpm-pythonprov
53 BuildRequires:  rpmbuild(macros) >= 1.714
54 Requires:       python-modules >= 1:2.7
55 BuildArch:      noarch
56 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
57
58 %description
59 A filesystem abstraction library, successor to PyFilesystem.
60
61 %description -l pl.UTF-8
62 Biblioteka abstrakcji systemu plików, następca PyFilesystem.
63
64 %package -n python3-fs
65 Summary:        Filesystem abstraction layer for Python 3
66 Summary(pl.UTF-8):      Warstwa abstrakcji systemu plików dla Pythona 3
67 Group:          Libraries/Python
68 Requires:       python3-modules >= 1:3.3
69
70 %description -n python3-fs
71 A filesystem abstraction library, successor to PyFilesystem.
72
73 %description -n python3-fs -l pl.UTF-8
74 Biblioteka abstrakcji systemu plików, następca PyFilesystem.
75
76 %prep
77 %setup -q -n fs-%{version}
78 %patch0 -p1
79
80 %build
81 # for tests
82 export PYTHONPATH=$(pwd) LC_ALL=C.UTF-8
83
84 %if %{with python2}
85 %py_build %{?with_tests:test}
86 %endif
87
88 %if %{with python3}
89 %py3_build %{?with_tests:test}
90 %endif
91
92 %install
93 rm -rf $RPM_BUILD_ROOT
94
95 %if %{with python2}
96 %py_install
97
98 %py_postclean
99 %endif
100
101 %if %{with python3}
102 %py3_install
103 %endif
104
105 %clean
106 rm -rf $RPM_BUILD_ROOT
107
108 %if %{with python2}
109 %files
110 %defattr(644,root,root,755)
111 %doc README.txt
112 %{py_sitescriptdir}/fs
113 %{py_sitescriptdir}/fs-%{version}-py*.egg-info
114 %endif
115
116 %if %{with python3}
117 %files -n python3-fs
118 %defattr(644,root,root,755)
119 %doc README.txt
120 %{py3_sitescriptdir}/fs
121 %{py3_sitescriptdir}/fs-%{version}-py*.egg-info
122 %endif
This page took 0.209049 seconds and 3 git commands to generate.