14
0
Files
python-mimesis/python-mimesis.spec
Tomáš Chvátal 2d6ae91ab9 Accepting request 790493 from home:pgajdos:python
- version update to 4.0.0
  .. warning:: This release (4.0.0) contains some insignificant but breaking changes in API, please be careful.
  **Added**:
  - Added an alias ``.first_name(*args, **kwargs)`` for the method ``Person().name()``
  - Added an alias ``.sex(*args, **kwargs)`` for the method ``Person().gender()``
  - Added method ``randstr()`` for class ``Random()``
  - Added method ``complexes()`` for the provider ``Numbers()``
  - Added method ``matrix`` for the provider ``Numbers()``
  - Added method ``integer_number()`` for the provider ``Numbers()``
  - Added method ``float_number()`` for the provider ``Numbers()``
  - Added method ``complex_number()`` for the provider ``Numbers()``
  - Added method ``decimal_number()`` for the provider ``Numbers()``
  - Added method ``ip_v4_object()`` and ``ip_v6_object`` for the provider ``Internet()``. Now you can generate IP objects, not just strings.
  - Added new parameter ``port_range`` for method ``ip_v4()``
  - Added new parameter ``separator`` for method ``Cryptographic().mnemonic_phrase()``
  **Fixed**:
  - Fixed issue with invalid email addresses on using custom domains without ``@`` for ``Person().email()``
  **Updated**:
  - Updated names and surnames for locale ``ru``
  - The ``floats()`` function in the ``Numbers`` provider now accepts arguments about the range of the generated float
  numbers and the rounding used. By default, it generates a list of ``n`` float numbers insted of a list of 10^n elements.
  - The argument ``length`` of the function ``integers`` is renamed to ``n``.
  **Removed**:
  - Removed the ``rating()`` method from the ``Numbers`` provider. It can be replaced with ``float_number()``.
  - Removed the ``primes()`` method from the ``Numbers`` provider.
  - Removed the ``digit()`` method from the ``Numbers`` provider. Use ``integer_number()`` instead.
  - Removed the ``between()`` method from the ``Numbers`` provider. Use ``integer_number()`` instead.
  - Removed the ``math_formula()`` method from the ``Science`` provider.
  - Removed ``rounding`` argument from ``floats()``. Now it's ``precision``.

OBS-URL: https://build.opensuse.org/request/show/790493
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-mimesis?expand=0&rev=11
2020-04-01 09:54:25 +00:00

72 lines
2.3 KiB
RPMSpec

#
# spec file for package python-mimesis
#
# Copyright (c) 2020 SUSE LLC
#
# 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 skip_python2 1
Name: python-mimesis
Version: 4.0.0
Release: 0
Summary: Fake data generator
License: MIT
URL: https://github.com/lk-geimfari/mimesis
Source: https://github.com/lk-geimfari/mimesis/archive/v%{version}.tar.gz#/mimesis-%{version}.tar.gz
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Recommends: python-pytz
BuildArch: noarch
# SECTION test requirements
BuildRequires: %{python_module pytest-mock}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module pytz}
# /SECTION
%python_subpackages
%description
Mimesis is a package for Python, which helps generate big volumes of
fake data for a variety of purposes in a variety of languages. The
fake data could be used to populate a testing database, create JSON
and XML files, anonymize data taken from production and etc.
%prep
%setup -q -n mimesis-%{version}
chmod a-x LICENSE README.rst
chmod a-x mimesis/data/*/*.json
%build
%python_build
%install
%python_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
rm %{buildroot}%{_prefix}/LICENSE
%check
sed -i '/--\(flake8\|isort\)/d' setup.cfg
# some tests require a network connection
# test_cpf_with_666_prefix - fails with new mocker behaviour
%pytest -k 'not (test_download_image or test_stock_image or test_cpf_with_666_prefix)'
%files %{python_files}
%doc README.rst
%license LICENSE
%{python_sitelib}/mimesis-%{version}-py*.egg-info
%{python_sitelib}/mimesis/
%changelog