2017-09-06 19:29:51 +02:00
|
|
|
#
|
|
|
|
# spec file for package python-Faker
|
|
|
|
#
|
2019-02-14 16:10:38 +01:00
|
|
|
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
|
2017-09-06 19:29:51 +02:00
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
2018-12-04 14:26:44 +01:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2017-09-06 19:29:51 +02:00
|
|
|
#
|
|
|
|
|
|
|
|
|
|
|
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
|
|
|
%define oldpython python
|
|
|
|
Name: python-Faker
|
2019-05-23 11:19:27 +02:00
|
|
|
Version: 1.0.7
|
2017-09-06 19:29:51 +02:00
|
|
|
Release: 0
|
2019-03-17 16:32:11 +01:00
|
|
|
Summary: Python package that generates fake data
|
2017-09-06 19:29:51 +02:00
|
|
|
License: MIT
|
|
|
|
Group: Development/Languages/Python
|
2018-12-04 18:13:13 +01:00
|
|
|
URL: https://github.com/joke2k/faker
|
2017-09-06 19:29:51 +02:00
|
|
|
Source: https://files.pythonhosted.org/packages/source/F/Faker/Faker-%{version}.tar.gz
|
2019-02-14 16:10:38 +01:00
|
|
|
BuildRequires: %{python_module UkPostcodeParser >= 1.1.1}
|
|
|
|
BuildRequires: %{python_module email_validator >= 1.0.2}
|
2019-03-14 15:34:55 +01:00
|
|
|
BuildRequires: %{python_module freezegun >= 0.3.11}
|
2019-02-14 16:10:38 +01:00
|
|
|
BuildRequires: %{python_module mock}
|
|
|
|
BuildRequires: %{python_module more-itertools}
|
|
|
|
BuildRequires: %{python_module pytest >= 3.8.0}
|
2019-07-19 22:33:26 +02:00
|
|
|
BuildRequires: %{python_module pytest-runner}
|
2019-02-14 16:10:38 +01:00
|
|
|
BuildRequires: %{python_module python-dateutil >= 2.4}
|
2019-03-14 15:34:55 +01:00
|
|
|
BuildRequires: %{python_module random2 >= 1.0.1}
|
2017-09-06 19:29:51 +02:00
|
|
|
BuildRequires: %{python_module setuptools}
|
2019-02-14 16:10:38 +01:00
|
|
|
BuildRequires: %{python_module six >= 1.10}
|
|
|
|
BuildRequires: %{python_module text-unidecode >= 1.2}
|
2018-12-04 18:13:13 +01:00
|
|
|
BuildRequires: fdupes
|
2017-09-06 19:29:51 +02:00
|
|
|
BuildRequires: python-rpm-macros
|
2019-07-19 22:33:26 +02:00
|
|
|
BuildRequires: python2-ipaddress
|
2018-12-04 18:13:13 +01:00
|
|
|
Requires: python-python-dateutil >= 2.4
|
2019-04-26 10:27:49 +02:00
|
|
|
Requires: python-setuptools
|
2019-02-14 16:10:38 +01:00
|
|
|
Requires: python-six >= 1.10
|
|
|
|
Requires: python-text-unidecode >= 1.2
|
2018-12-04 18:13:13 +01:00
|
|
|
Requires(post): update-alternatives
|
|
|
|
Requires(postun): update-alternatives
|
|
|
|
BuildArch: noarch
|
2017-09-06 19:29:51 +02:00
|
|
|
%ifpython2
|
2019-07-19 22:33:26 +02:00
|
|
|
Requires: python2-ipaddress
|
2017-09-06 19:29:51 +02:00
|
|
|
Obsoletes: %{oldpython}-fake-factory < %{version}
|
|
|
|
Provides: %{oldpython}-fake-factory = %{version}
|
|
|
|
%endif
|
|
|
|
%ifpython3
|
|
|
|
Obsoletes: python3-fake-factory < %{version}
|
|
|
|
Provides: python3-fake-factory = %{version}
|
|
|
|
%endif
|
|
|
|
%python_subpackages
|
|
|
|
|
|
|
|
%description
|
2017-09-11 17:41:19 +02:00
|
|
|
Faker is a Python package that generates fake data. It helps with
|
|
|
|
database bootstrapping, creating XML documents, persistence stress
|
|
|
|
testing, and data anonymization from production services.
|
2017-09-06 19:29:51 +02:00
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q -n Faker-%{version}
|
2019-03-10 12:05:14 +01:00
|
|
|
# Remove pre-existing bytecode files in the sdist
|
|
|
|
find . -name '*.py[co]' -delete
|
2019-03-14 15:34:55 +01:00
|
|
|
# do not hardcode versions
|
2019-02-14 16:10:38 +01:00
|
|
|
sed -i -e 's:"pytest>=3.8.0,<3.9":"pytest>=3.8.0":g' setup.py
|
2019-03-14 15:34:55 +01:00
|
|
|
sed -i -e 's:==:>=:g' setup.py
|
2017-09-06 19:29:51 +02:00
|
|
|
|
|
|
|
%build
|
|
|
|
%python_build
|
|
|
|
|
|
|
|
%install
|
|
|
|
%python_install
|
|
|
|
%python_clone -a %{buildroot}%{_bindir}/faker
|
|
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
|
|
|
|
|
|
|
%post
|
|
|
|
%python_install_alternative faker
|
|
|
|
|
|
|
|
%postun
|
|
|
|
%python_uninstall_alternative faker
|
|
|
|
|
|
|
|
%check
|
2019-03-14 15:34:55 +01:00
|
|
|
%pytest
|
2017-09-06 19:29:51 +02:00
|
|
|
|
|
|
|
%files %{python_files}
|
2018-12-04 18:13:13 +01:00
|
|
|
%license LICENSE.txt
|
|
|
|
%doc CHANGELOG.rst README.rst
|
2017-09-06 19:29:51 +02:00
|
|
|
%python_alternative %{_bindir}/faker
|
|
|
|
%{python_sitelib}/*
|
|
|
|
|
|
|
|
%changelog
|