2012-06-11 15:12:57 +02:00
|
|
|
#
|
|
|
|
# spec file for package python-factory_boy
|
|
|
|
#
|
2020-03-16 11:32:08 +01:00
|
|
|
# Copyright (c) 2020 SUSE LLC
|
2012-06-11 15:12:57 +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-10-18 12:23:18 +02:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2012-06-11 15:12:57 +02:00
|
|
|
#
|
|
|
|
|
2012-11-23 12:08:12 +01:00
|
|
|
|
2017-10-06 15:58:25 +02:00
|
|
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
2020-03-16 11:32:08 +01:00
|
|
|
%bcond_without python2
|
2012-06-11 15:12:57 +02:00
|
|
|
Name: python-factory_boy
|
2019-06-07 14:07:43 +02:00
|
|
|
Version: 2.12.0
|
2012-06-11 15:12:57 +02:00
|
|
|
Release: 0
|
|
|
|
Summary: A test fixtures replacement
|
2012-11-23 12:08:12 +01:00
|
|
|
License: MIT
|
2020-03-16 11:32:08 +01:00
|
|
|
URL: https://github.com/rbarrois/factory_boy
|
2017-10-06 15:58:25 +02:00
|
|
|
Source: https://github.com/FactoryBoy/factory_boy/archive/%{version}.tar.gz
|
2018-10-18 12:23:18 +02:00
|
|
|
BuildRequires: %{python_module Django}
|
2017-10-06 15:58:25 +02:00
|
|
|
BuildRequires: %{python_module Faker >= 0.7.0}
|
2018-10-18 12:23:18 +02:00
|
|
|
BuildRequires: %{python_module Pillow}
|
2017-10-06 15:58:25 +02:00
|
|
|
BuildRequires: %{python_module flake8}
|
|
|
|
BuildRequires: %{python_module mock}
|
2019-06-07 14:07:43 +02:00
|
|
|
BuildRequires: %{python_module setuptools >= 0.8}
|
2019-11-18 01:58:49 +01:00
|
|
|
BuildRequires: %{pythons}
|
2018-10-18 12:23:18 +02:00
|
|
|
BuildRequires: fdupes
|
2017-10-06 15:58:25 +02:00
|
|
|
BuildRequires: python-rpm-macros
|
|
|
|
Requires: python-Faker >= 0.7.0
|
2012-06-11 15:12:57 +02:00
|
|
|
BuildArch: noarch
|
2020-03-16 11:32:08 +01:00
|
|
|
%if %{with python2}
|
|
|
|
BuildRequires: python-ipaddress
|
|
|
|
%endif
|
2017-10-06 15:58:25 +02:00
|
|
|
%python_subpackages
|
2012-06-11 15:12:57 +02:00
|
|
|
|
|
|
|
%description
|
|
|
|
A test fixtures replacement based on thoughtbot's factory_girl for Ruby.
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q -n factory_boy-%{version}
|
2018-10-18 12:23:18 +02:00
|
|
|
# needs running mongo
|
|
|
|
rm tests/test_mongoengine.py
|
|
|
|
sed -i -e '/test_mongoengine/d' tests/__init__.py
|
|
|
|
# sqlalchemy hickups a lot
|
|
|
|
rm tests/test_alchemy.py
|
|
|
|
sed -i -e '/test_alchemy/d' tests/__init__.py
|
2012-06-11 15:12:57 +02:00
|
|
|
|
|
|
|
%build
|
2017-10-06 15:58:25 +02:00
|
|
|
%python_build
|
2012-06-11 15:12:57 +02:00
|
|
|
|
|
|
|
%install
|
2017-10-06 15:58:25 +02:00
|
|
|
%python_install
|
2018-10-18 12:23:18 +02:00
|
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
2012-06-11 15:12:57 +02:00
|
|
|
|
2012-11-23 12:08:12 +01:00
|
|
|
%check
|
2017-10-06 15:58:25 +02:00
|
|
|
%python_exec setup.py test
|
2012-11-23 12:08:12 +01:00
|
|
|
|
2017-10-06 15:58:25 +02:00
|
|
|
%files %{python_files}
|
2018-10-18 12:23:18 +02:00
|
|
|
%license LICENSE
|
|
|
|
%doc README.rst
|
2012-06-11 15:12:57 +02:00
|
|
|
%{python_sitelib}/*
|
|
|
|
|
|
|
|
%changelog
|