SHA256
1
0
forked from pool/python-Faker
python-Faker/python-Faker.spec
Tomáš Chvátal d2f2a927d7 - Update to 1.0.10:
* Many changes to list see CHANGELOG.rst
- Run tests

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-Faker?expand=0&rev=16
2019-02-14 15:10:38 +00:00

93 lines
3.0 KiB
RPMSpec

#
# spec file for package python-Faker
#
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
#
# 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.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%define oldpython python
Name: python-Faker
Version: 1.0.2
Release: 0
Summary: Faker is a Python package that generates fake data
License: MIT
Group: Development/Languages/Python
URL: https://github.com/joke2k/faker
Source: https://files.pythonhosted.org/packages/source/F/Faker/Faker-%{version}.tar.gz
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}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module six >= 1.10}
BuildRequires: %{python_module text-unidecode >= 1.2}
BuildRequires: fdupes
BuildRequires: python-ipaddress
BuildRequires: python-rpm-macros
Requires: python-python-dateutil >= 2.4
Requires: python-six >= 1.10
Requires: python-text-unidecode >= 1.2
Requires(post): update-alternatives
Requires(postun): update-alternatives
BuildArch: noarch
BuildRequires: %{python_module pytest-runner}
%ifpython2
Requires: python-ipaddress
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
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.
%prep
%setup -q -n Faker-%{version}
# do not hardcode pytest version
sed -i -e 's:"pytest>=3.8.0,<3.9":"pytest>=3.8.0":g' setup.py
%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}
%license LICENSE.txt
%doc CHANGELOG.rst README.rst
%python_alternative %{_bindir}/faker
%{python_sitelib}/*
%changelog