]> git.pld-linux.org Git - packages/python-fs.git/blob - python-fs.spec
cd8f08ba21e9f640ce68f09df79bb0050c98634f
[packages/python-fs.git] / python-fs.spec
1 #
2 # Conditional build:
3 %bcond_with     tests   # unit tests (some failing)
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.4.14
11 Release:        1
12 License:        MIT
13 Group:          Libraries/Python
14 #Source0Download: https://pypi.org/simple/fs/
15 Source0:        https://files.pythonhosted.org/packages/source/f/fs/fs-%{version}.tar.gz
16 # Source0-md5:  e749e2453ed77e376e9146aa3d6f2efa
17 Patch0:         %{name}-py3-requires.patch
18 URL:            https://pypi.org/project/fs/
19 %if %{with tests} && %(locale -a | grep -q '^C\.utf8$'; echo $?)
20 BuildRequires:  glibc-localedb-all
21 %endif
22 %if %{with python2}
23 BuildRequires:  python-modules >= 1:2.7
24 BuildRequires:  python-setuptools >= 1:38.3.0
25 %if %{with tests}
26 BuildRequires:  python-appdirs >= 1.4.3
27 BuildRequires:  python-backports.os >= 0.1
28 BuildRequires:  python-enum34 >= 1.1.6
29 BuildRequires:  python-mock >= 3.0
30 BuildRequires:  python-parameterized >= 0.8
31 BuildRequires:  python-psutil >= 5.0
32 BuildRequires:  python-pyftpdlib >= 1.5
33 BuildRequires:  python-pysendfile >= 2.0
34 BuildRequires:  python-pytest >= 4.6
35 BuildRequires:  python-pytest-randomly >= 1.2
36 BuildRequires:  python-pytz
37 BuildRequires:  python-scandir >= 1.5
38 BuildRequires:  python-six >= 1.10.0
39 BuildRequires:  python-typing >= 3.6
40 %endif
41 %endif
42 %if %{with python3}
43 BuildRequires:  python3-modules >= 1:3.4
44 BuildRequires:  python3-setuptools >= 1:38.3.0
45 %if %{with tests}
46 BuildRequires:  python3-appdirs >= 1.4.3
47 BuildRequires:  python3-parameterized >= 0.8
48 BuildRequires:  python3-psutil >= 5.0
49 BuildRequires:  python3-pyftpdlib >= 1.5
50 BuildRequires:  python3-pytest >= 4.6
51 BuildRequires:  python3-pytest-randomly >= 1.2
52 BuildRequires:  python3-pytz
53 %if "%{py3_ver}" < "3.5"
54 BuildRequires:  python3-scandir >= 1.5
55 %endif
56 BuildRequires:  python3-six >= 1.10.0
57 %if "%{py3_ver}" < "3.6"
58 BuildRequires:  python3-typing >= 3.6
59 %endif
60 %endif
61 %endif
62 BuildRequires:  rpm-pythonprov
63 BuildRequires:  rpmbuild(macros) >= 1.714
64 Requires:       python-modules >= 1:2.7
65 BuildArch:      noarch
66 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
67
68 %description
69 A filesystem abstraction library, successor to PyFilesystem.
70
71 %description -l pl.UTF-8
72 Biblioteka abstrakcji systemu plików, następca PyFilesystem.
73
74 %package -n python3-fs
75 Summary:        Filesystem abstraction layer for Python 3
76 Summary(pl.UTF-8):      Warstwa abstrakcji systemu plików dla Pythona 3
77 Group:          Libraries/Python
78 Requires:       python3-modules >= 1:3.4
79
80 %description -n python3-fs
81 A filesystem abstraction library, successor to PyFilesystem.
82
83 %description -n python3-fs -l pl.UTF-8
84 Biblioteka abstrakcji systemu plików, następca PyFilesystem.
85
86 %prep
87 %setup -q -n fs-%{version}
88 %patch0 -p1
89
90 # relies on pyftpdlib tests
91 %{__rm} tests/test_ftpfs.py
92
93 %build
94 %if %{with python2}
95 %py_build
96
97 %if %{with tests}
98 LC_ALL=C.UTF-8 PYTHONPATH=$(pwd) \
99 %{__python} -m unittest discover -s tests
100 %endif
101 %endif
102
103 %if %{with python3}
104 %py3_build
105
106 %if %{with tests}
107 LC_ALL=C.UTF-8 PYTHONPATH=$(pwd) \
108 %{__python3} -m unittest discover -s tests
109 %endif
110 %endif
111
112 %install
113 rm -rf $RPM_BUILD_ROOT
114
115 %if %{with python2}
116 %py_install
117
118 %py_postclean
119 %endif
120
121 %if %{with python3}
122 %py3_install
123 %endif
124
125 %clean
126 rm -rf $RPM_BUILD_ROOT
127
128 %if %{with python2}
129 %files
130 %defattr(644,root,root,755)
131 %doc LICENSE README.md
132 %{py_sitescriptdir}/fs
133 %{py_sitescriptdir}/fs-%{version}-py*.egg-info
134 %endif
135
136 %if %{with python3}
137 %files -n python3-fs
138 %defattr(644,root,root,755)
139 %doc LICENSE README.md
140 %{py3_sitescriptdir}/fs
141 %{py3_sitescriptdir}/fs-%{version}-py*.egg-info
142 %endif
This page took 0.116617 seconds and 2 git commands to generate.