14
0
forked from pool/python-moban

Accepting request 836540 from devel:languages:python

OBS-URL: https://build.opensuse.org/request/show/836540
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-moban?expand=0&rev=7
This commit is contained in:
2020-09-25 14:34:36 +00:00
committed by Git OBS Bridge
6 changed files with 2412 additions and 20 deletions

3
_multibuild Normal file
View File

@@ -0,0 +1,3 @@
<multibuild>
<package>test</package>
</multibuild>

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:942526e7209622ea7c79676291b49bcf03cb554ec3d8b7aaf7ba0db2dfbb3424
size 1000105

3
moban-0.8.2.tar.gz Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:884fa73c7feaa0b8b5cf8c11ac4f2b557cd06d581fe0845cc4c4634b139c00ea
size 1003121

View File

@@ -1,3 +1,32 @@
-------------------------------------------------------------------
Thu Sep 24 08:38:23 UTC 2020 - pgajdos@suse.com
- version update to 0.8.2
#. Use any functions, any data structure of any python packages as jinja2
filters, tests, globals
#. `#399 <https://github.com/moremoban/moban/issues/399>`_: content processor
should be called only once
#. content processor shall pass on options to content processors
#. moban.plugins.jinja2.tests.files is moved to moban-ansible package
#. moban.plugins.jinja2.filters.github is moved to moban-jinja2-github package
#. `#396 <https://github.com/moremoban/moban/issues/396>`_: custom jinja2
plugins(filters, tests and globals) are not visible if a template is passed
as a string.
#. `#393 <https://github.com/moremoban/moban/issues/393>`_: Rendered content
output to stdout once
#. `#390 <https://github.com/moremoban/moban/issues/390>`_: single render action
will print to stdout by default
- modified patches
% remove_nose.patch (extended, https://github.com/moremoban/moban/pull/404)
- added sources
+ _multibuild
-------------------------------------------------------------------
Fri Sep 18 14:48:12 UTC 2020 - Matej Cepl <mcepl@suse.com>
- Add remove_nose.patch which ports test suite from nose to
pytest (gh#moremoban/moban#364). Still unfinished and work in progress.
-------------------------------------------------------------------
Fri Jun 12 07:54:57 UTC 2020 - Marketa Calabkova <mcalabkova@suse.com>

View File

@@ -16,27 +16,30 @@
#
%define skip_python2 1
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-moban
Version: 0.7.8
# Tests have dependency loop with moban-ansible
%global flavor @BUILD_FLAVOR@%{nil}
%if "%{flavor}" == "test"
%define test 1
%define pkg_suffix -test
%bcond_without test
%else
%define pkg_suffix %{nil}
%bcond_with test
%endif
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%define skip_python2 1
Name: python-moban%{pkg_suffix}
Version: 0.8.2
Release: 0
Summary: Yet another jinja2 CLI for static text generation
License: MIT
Group: Development/Languages/Python
URL: https://github.com/moremoban/moban
Source: https://files.pythonhosted.org/packages/source/m/moban/moban-%{version}.tar.gz
BuildRequires: %{python_module Jinja2 >= 2.7.1}
BuildRequires: %{python_module appdirs >= 1.4.3}
BuildRequires: %{python_module crayons >= 0.1.0}
BuildRequires: %{python_module fs >= 2.4.11}
BuildRequires: %{python_module jinja2-fsloader >= 0.2.0}
BuildRequires: %{python_module jinja2-time}
BuildRequires: %{python_module lml >= 0.0.9}
BuildRequires: %{python_module mock}
BuildRequires: %{python_module nose}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module ruamel.yaml >= 0.15.98}
# https://github.com/moremoban/moban/pull/404
Patch0: remove_nose.patch
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: git-core
@@ -51,9 +54,26 @@ Requires: python-lml >= 0.0.9
Requires: python-ruamel.yaml >= 0.15.98
Requires(post): update-alternatives
Requires(postun): update-alternatives
Suggests: python-ansible
Suggests: python-gitfs2
Suggests: python-pypifs
BuildArch: noarch
# SECTION test requirements
%if %{with test}
BuildRequires: %{python_module Jinja2 >= 2.7.1}
BuildRequires: %{python_module appdirs >= 1.4.3}
BuildRequires: %{python_module crayons >= 0.1.0}
BuildRequires: %{python_module fs >= 2.4.11}
BuildRequires: %{python_module jinja2-fsloader >= 0.2.0}
BuildRequires: %{python_module jinja2-time}
BuildRequires: %{python_module lml >= 0.0.9}
BuildRequires: %{python_module moban-ansible}
BuildRequires: %{python_module mock}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module ruamel.yaml >= 0.15.98}
%endif
# /SECTION
%python_subpackages
%description
@@ -65,38 +85,62 @@ consistent across the documentations of individual libraries.
%prep
%setup -q -n moban-%{version}
# integration tests need network
rm -r tests/integration_tests
%autopatch -p1
%if !%{with test}
%build
%python_build
%endif
%if !%{with test}
%install
%python_install
%python_clone -a %{buildroot}%{_bindir}/moban
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%endif
%if %{with test}
%check
# integration tests need network
rm -r tests/integration_tests
# test_level_9_deprecated needs pypi-mobans-pkg just for templates... too much effort
SKIP_TESTS="test_level_9_deprecated"
# test_level_9 needs pypifs, which is now optional
SKIP_TESTS="$SKIP_TESTS or test_level_9"
# test_level_10_deprecated depends on access to github.com
SKIP_TESTS="$SKIP_TESTS or test_level_10_deprecated"
# test_level_10 needs gitfs, which is optional
SKIP_TESTS="$SKIP_TESTS or test_level_10"
# test_level_11 probably depends on moban-handlebars, which is needed only in tests
SKIP_TESTS="$SKIP_TESTS or test_level_11"
# test_handle_targets_sequence fails on wrong arg count
SKIP_TESTS="$SKIP_TESTS or test_handle_targets_sequence"
# test_overrides_fs_url needs gitfs2, which is optional
SKIP_TESTS="$SKIP_TESTS or test_overrides_fs_url"
# test_level_24 needs httpfs, which is optional
%python_expand nosetests-%{$python_bin_suffix} -e 'test_level_(9|10|11|24)|test_handle_targets_sequence|test_overrides_fs_url'
SKIP_TESTS="$SKIP_TESTS or test_level_24"
# test_repo is probably online, requires git
SKIP_TESTS="$SKIP_TESTS or test_repo"
export SKIP_TESTS
%pytest -k "not ($SKIP_TESTS)"
%endif
%if !%{with test}
%post
%python_install_alternative moban
%endif
%if !%{with test}
%postun
%python_uninstall_alternative moban
%endif
%if !%{with test}
%files %{python_files}
%{python_sitelib}/*
%license LICENSE
%doc README.rst CHANGELOG.rst
%python_alternative %{_bindir}/moban
%endif
%changelog

2316
remove_nose.patch Normal file

File diff suppressed because it is too large Load Diff