3 %bcond_without tests # unit tests
4 %bcond_without python2 # CPython 2.x module
5 %bcond_without python3 # CPython 3.x module
7 Summary: Faker - Python package that generates fake data for you
8 Summary(pl.UTF-8): Faker - pakiet Pythona generujący fałszywe dane
10 # keep 3.x here for python2 support
14 Group: Libraries/Python
15 #Source0Download: https://pypi.org/simple/Faker/
16 Source0: https://files.pythonhosted.org/packages/source/F/Faker/Faker-%{version}.tar.gz
17 # Source0-md5: bcf900b630d836649175d1ac5ddab949
18 URL: https://pypi.org/project/Faker/
20 BuildRequires: python-modules >= 1:2.7
21 BuildRequires: python-setuptools
23 BuildRequires: python-dateutil >= 2.4
24 BuildRequires: python-freezegun
25 BuildRequires: python-ipaddress
26 BuildRequires: python-mock
27 BuildRequires: python-pytest
28 BuildRequires: python-random2
29 BuildRequires: python-six >= 1.10
30 BuildRequires: python-text-unidecode >= 1.3
31 BuildRequires: python-ukpostcodeparser
32 BuildRequires: python-validators
36 BuildRequires: python3-modules >= 1:3.5
37 BuildRequires: python3-setuptools
39 BuildRequires: python3-dateutil >= 2.4
40 BuildRequires: python3-freezegun
41 BuildRequires: python3-pytest
42 BuildRequires: python3-random2
43 BuildRequires: python3-six >= 1.10
44 BuildRequires: python3-text-unidecode >= 1.3
45 BuildRequires: python3-ukpostcodeparser
46 BuildRequires: python3-validators
49 BuildRequires: rpm-pythonprov
50 BuildRequires: rpmbuild(macros) >= 1.714
51 Requires: python-modules >= 1:2.7
53 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
56 Faker is a Python package that generates fake data for you. Whether
57 you need to bootstrap your database, create good-looking XML
58 documents, fill-in your persistence to stress test it, or anonymize
59 data taken from a production service, Faker is for you.
61 %description -l pl.UTF-8
62 Faker to pakiet Pythona generujący fałszywe dane. Jest to przydatne,
63 kiedy potrzebujemy uruchomić bazę danych, stworzyć dobrze wyglądający
64 dokument XML, wypełnić dane do testów albo zanonimozować dane pobrane
65 z usługi produkcyjnej.
67 %package -n python3-faker
68 Summary: Faker - Python package that generates fake data for you
69 Summary(pl.UTF-8): Faker - pakiet Pythona generujący fałszywe dane
70 Group: Libraries/Python
71 Requires: python3-modules >= 1:3.5
73 %description -n python3-faker
74 Faker is a Python package that generates fake data for you. Whether
75 you need to bootstrap your database, create good-looking XML
76 documents, fill-in your persistence to stress test it, or anonymize
77 data taken from a production service, Faker is for you.
79 %description -n python3-faker -l pl.UTF-8
80 Faker to pakiet Pythona generujący fałszywe dane. Jest to przydatne,
81 kiedy potrzebujemy uruchomić bazę danych, stworzyć dobrze wyglądający
82 dokument XML, wypełnić dane do testów albo zanonimozować dane pobrane
83 z usługi produkcyjnej.
86 %setup -q -n Faker-%{version}
93 PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
94 %{__python} -m pytest tests
102 PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
103 %{__python3} -m pytest tests
108 rm -rf $RPM_BUILD_ROOT
115 %{__mv} $RPM_BUILD_ROOT%{_bindir}/faker{,-2}
121 %{__mv} $RPM_BUILD_ROOT%{_bindir}/faker{,-3}
122 ln -sf faker-3 $RPM_BUILD_ROOT%{_bindir}/faker
126 rm -rf $RPM_BUILD_ROOT
130 %defattr(644,root,root,755)
131 %doc CHANGELOG.rst LICENSE.txt README.rst
132 %attr(755,root,root) %{_bindir}/faker-2
133 %{py_sitescriptdir}/faker
134 %{py_sitescriptdir}/Faker-%{version}-py*.egg-info
138 %files -n python3-faker
139 %defattr(644,root,root,755)
140 %doc CHANGELOG.rst LICENSE.txt README.rst
141 %attr(755,root,root) %{_bindir}/faker
142 %attr(755,root,root) %{_bindir}/faker-3
143 %{py3_sitescriptdir}/faker
144 %{py3_sitescriptdir}/Faker-%{version}-py*.egg-info