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-02-14 16:10:38 +01:00
|
|
|
Version: 1.0.2
|
2017-09-06 19:29:51 +02:00
|
|
|
Release: 0
|
2017-09-11 17:41:19 +02:00
|
|
|
Summary: Faker is a 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-03-12 10:24:25 +01:00
|
|
|
Patch0: faker-32bit.patch
|
2019-02-14 16:10:38 +01:00
|
|
|
BuildRequires: %{python_module UkPostcodeParser >= 1.1.1}
|
|
|
|
BuildRequires: %{python_module email_validator >= 1.0.2}
|
|
|
|
BuildRequires: %{python_module mock}
|
|
|
|
BuildRequires: %{python_module more-itertools}
|
|
|
|
BuildRequires: %{python_module pytest >= 3.8.0}
|
|
|
|
BuildRequires: %{python_module python-dateutil >= 2.4}
|
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
|
2019-02-14 16:10:38 +01:00
|
|
|
BuildRequires: python-ipaddress
|
2017-09-06 19:29:51 +02:00
|
|
|
BuildRequires: python-rpm-macros
|
2018-12-04 18:13:13 +01:00
|
|
|
Requires: python-python-dateutil >= 2.4
|
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
|
2019-02-14 16:10:38 +01:00
|
|
|
BuildRequires: %{python_module pytest-runner}
|
2017-09-06 19:29:51 +02:00
|
|
|
%ifpython2
|
2019-02-14 16:10:38 +01:00
|
|
|
Requires: python-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-02-14 16:10:38 +01:00
|
|
|
# do not hardcode pytest version
|
|
|
|
sed -i -e 's:"pytest>=3.8.0,<3.9":"pytest>=3.8.0":g' setup.py
|
2019-03-12 10:24:25 +01:00
|
|
|
%patch0 -p1
|
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
|
|
|
|
%python_exec setup.py test
|
|
|
|
|
|
|
|
%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
|