]> git.pld-linux.org Git - SPECS.git/blob - python-faker.spec
SPECS updated Tue 30 Apr 15:06:09 CEST 2024
[SPECS.git] / python-faker.spec
1 #
2 # Conditional build:
3 %bcond_without  tests   # unit tests
4 %bcond_without  python2 # CPython 2.x module
5 %bcond_without  python3 # CPython 3.x module
6
7 Summary:        Faker - Python package that generates fake data for you
8 Summary(pl.UTF-8):      Faker - pakiet Pythona generujący fałszywe dane
9 Name:           python-faker
10 # keep 3.x here for python2 support
11 Version:        3.0.1
12 Release:        1
13 License:        MIT
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/
19 %if %{with python2}
20 BuildRequires:  python-modules >= 1:2.7
21 BuildRequires:  python-setuptools
22 %if %{with tests}
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
33 %endif
34 %endif
35 %if %{with python3}
36 BuildRequires:  python3-modules >= 1:3.5
37 BuildRequires:  python3-setuptools
38 %if %{with tests}
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
47 %endif
48 %endif
49 BuildRequires:  rpm-pythonprov
50 BuildRequires:  rpmbuild(macros) >= 1.714
51 Requires:       python-modules >= 1:2.7
52 BuildArch:      noarch
53 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
54
55 %description
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.
60
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.
66
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
72
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.
78
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.
84
85 %prep
86 %setup -q -n Faker-%{version}
87
88 %build
89 %if %{with python2}
90 %py_build
91
92 %if %{with tests}
93 PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
94 %{__python} -m pytest tests
95 %endif
96 %endif
97
98 %if %{with python3}
99 %py3_build
100
101 %if %{with tests}
102 PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
103 %{__python3} -m pytest tests
104 %endif
105 %endif
106
107 %install
108 rm -rf $RPM_BUILD_ROOT
109
110 %if %{with python2}
111 %py_install
112
113 %py_postclean
114
115 %{__mv} $RPM_BUILD_ROOT%{_bindir}/faker{,-2}
116 %endif
117
118 %if %{with python3}
119 %py3_install
120
121 %{__mv} $RPM_BUILD_ROOT%{_bindir}/faker{,-3}
122 ln -sf faker-3 $RPM_BUILD_ROOT%{_bindir}/faker
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 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
135 %endif
136
137 %if %{with python3}
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
145 %endif
This page took 0.557145 seconds and 3 git commands to generate.