forked from pool/python-moban-ansible
		
	Accepting request 836545 from home:pgajdos:python
OBS-URL: https://build.opensuse.org/request/show/836545 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-moban-ansible?expand=0&rev=1
This commit is contained in:
		
							
								
								
									
										23
									
								
								.gitattributes
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										23
									
								
								.gitattributes
									
									
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,23 @@
 | 
				
			|||||||
 | 
					## Default LFS
 | 
				
			||||||
 | 
					*.7z filter=lfs diff=lfs merge=lfs -text
 | 
				
			||||||
 | 
					*.bsp filter=lfs diff=lfs merge=lfs -text
 | 
				
			||||||
 | 
					*.bz2 filter=lfs diff=lfs merge=lfs -text
 | 
				
			||||||
 | 
					*.gem filter=lfs diff=lfs merge=lfs -text
 | 
				
			||||||
 | 
					*.gz filter=lfs diff=lfs merge=lfs -text
 | 
				
			||||||
 | 
					*.jar filter=lfs diff=lfs merge=lfs -text
 | 
				
			||||||
 | 
					*.lz filter=lfs diff=lfs merge=lfs -text
 | 
				
			||||||
 | 
					*.lzma filter=lfs diff=lfs merge=lfs -text
 | 
				
			||||||
 | 
					*.obscpio filter=lfs diff=lfs merge=lfs -text
 | 
				
			||||||
 | 
					*.oxt filter=lfs diff=lfs merge=lfs -text
 | 
				
			||||||
 | 
					*.pdf filter=lfs diff=lfs merge=lfs -text
 | 
				
			||||||
 | 
					*.png filter=lfs diff=lfs merge=lfs -text
 | 
				
			||||||
 | 
					*.rpm filter=lfs diff=lfs merge=lfs -text
 | 
				
			||||||
 | 
					*.tbz filter=lfs diff=lfs merge=lfs -text
 | 
				
			||||||
 | 
					*.tbz2 filter=lfs diff=lfs merge=lfs -text
 | 
				
			||||||
 | 
					*.tgz filter=lfs diff=lfs merge=lfs -text
 | 
				
			||||||
 | 
					*.ttf filter=lfs diff=lfs merge=lfs -text
 | 
				
			||||||
 | 
					*.txz filter=lfs diff=lfs merge=lfs -text
 | 
				
			||||||
 | 
					*.whl filter=lfs diff=lfs merge=lfs -text
 | 
				
			||||||
 | 
					*.xz filter=lfs diff=lfs merge=lfs -text
 | 
				
			||||||
 | 
					*.zip filter=lfs diff=lfs merge=lfs -text
 | 
				
			||||||
 | 
					*.zst filter=lfs diff=lfs merge=lfs -text
 | 
				
			||||||
							
								
								
									
										1
									
								
								.gitignore
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								.gitignore
									
									
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1 @@
 | 
				
			|||||||
 | 
					.osc
 | 
				
			||||||
							
								
								
									
										3
									
								
								_multibuild
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								_multibuild
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,3 @@
 | 
				
			|||||||
 | 
					<multibuild>
 | 
				
			||||||
 | 
					  <package>test</package>
 | 
				
			||||||
 | 
					</multibuild>
 | 
				
			||||||
							
								
								
									
										3
									
								
								moban-ansible-0.0.2.tar.gz
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								moban-ansible-0.0.2.tar.gz
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,3 @@
 | 
				
			|||||||
 | 
					version https://git-lfs.github.com/spec/v1
 | 
				
			||||||
 | 
					oid sha256:2a9ba853915365096ae6ae17fd737e41fad3923e2d420599bcadfa67c6a6a5fe
 | 
				
			||||||
 | 
					size 10032
 | 
				
			||||||
							
								
								
									
										113
									
								
								python-moban-ansible-remove-nose.patch
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										113
									
								
								python-moban-ansible-remove-nose.patch
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,113 @@
 | 
				
			|||||||
 | 
					Index: moban-ansible-0.0.2/setup.py
 | 
				
			||||||
 | 
					===================================================================
 | 
				
			||||||
 | 
					--- moban-ansible-0.0.2.orig/setup.py	2020-09-05 01:50:13.000000000 +0200
 | 
				
			||||||
 | 
					+++ moban-ansible-0.0.2/setup.py	2020-09-24 10:18:17.514736263 +0200
 | 
				
			||||||
 | 
					@@ -193,7 +193,7 @@ if __name__ == "__main__":
 | 
				
			||||||
 | 
					         license=LICENSE,
 | 
				
			||||||
 | 
					         keywords=KEYWORDS,
 | 
				
			||||||
 | 
					         extras_require=EXTRAS_REQUIRE,
 | 
				
			||||||
 | 
					-        tests_require=["nose"],
 | 
				
			||||||
 | 
					+        tests_require=["pytest"],
 | 
				
			||||||
 | 
					         install_requires=INSTALL_REQUIRES,
 | 
				
			||||||
 | 
					         packages=PACKAGES,
 | 
				
			||||||
 | 
					         include_package_data=True,
 | 
				
			||||||
 | 
					Index: moban-ansible-0.0.2/tests/requirements.txt
 | 
				
			||||||
 | 
					===================================================================
 | 
				
			||||||
 | 
					--- moban-ansible-0.0.2.orig/tests/requirements.txt	2020-09-05 01:50:13.000000000 +0200
 | 
				
			||||||
 | 
					+++ moban-ansible-0.0.2/tests/requirements.txt	2020-09-24 10:18:03.614651213 +0200
 | 
				
			||||||
 | 
					@@ -1,4 +1,4 @@
 | 
				
			||||||
 | 
					-nose
 | 
				
			||||||
 | 
					+pytest
 | 
				
			||||||
 | 
					 mock;python_version<"3"
 | 
				
			||||||
 | 
					 codecov
 | 
				
			||||||
 | 
					 coverage
 | 
				
			||||||
 | 
					Index: moban-ansible-0.0.2/tests/test_files.py
 | 
				
			||||||
 | 
					===================================================================
 | 
				
			||||||
 | 
					--- moban-ansible-0.0.2.orig/tests/test_files.py	2020-09-05 01:50:13.000000000 +0200
 | 
				
			||||||
 | 
					+++ moban-ansible-0.0.2/tests/test_files.py	2020-09-24 13:48:31.163963695 +0200
 | 
				
			||||||
 | 
					@@ -2,8 +2,6 @@ import sys
 | 
				
			||||||
 | 
					 from io import StringIO
 | 
				
			||||||
 | 
					 from unittest.mock import patch
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					-from nose.tools import eq_
 | 
				
			||||||
 | 
					-
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					 def test_stdout():
 | 
				
			||||||
 | 
					     test_args = ["moban", "-t", "{{'tests' is directory}}"]
 | 
				
			||||||
 | 
					@@ -12,4 +10,4 @@ def test_stdout():
 | 
				
			||||||
 | 
					             from moban.main import main
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					             main()
 | 
				
			||||||
 | 
					-            eq_(fake_stdout.getvalue(), "True\n")
 | 
				
			||||||
 | 
					+            assert fake_stdout.getvalue() == "True\n"
 | 
				
			||||||
 | 
					Index: moban-ansible-0.0.2/tests/test_line_in_file.py
 | 
				
			||||||
 | 
					===================================================================
 | 
				
			||||||
 | 
					--- moban-ansible-0.0.2.orig/tests/test_line_in_file.py	2020-09-05 01:50:13.000000000 +0200
 | 
				
			||||||
 | 
					+++ moban-ansible-0.0.2/tests/test_line_in_file.py	2020-09-24 13:49:03.328160551 +0200
 | 
				
			||||||
 | 
					@@ -1,5 +1,3 @@
 | 
				
			||||||
 | 
					-from nose.tools import eq_
 | 
				
			||||||
 | 
					-
 | 
				
			||||||
 | 
					 from moban_ansible.engines.line_in_file import line_in_file
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					@@ -11,7 +9,7 @@ def test_append_a_line():
 | 
				
			||||||
 | 
					     new_content = line_in_file(content, options)
 | 
				
			||||||
 | 
					     expected = "\n".join([content.decode(), options["line"]])
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					-    eq_(new_content, expected.encode())
 | 
				
			||||||
 | 
					+    assert new_content == expected.encode()
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					 def test_absent():
 | 
				
			||||||
 | 
					@@ -23,7 +21,7 @@ def test_absent():
 | 
				
			||||||
 | 
					     new_content = line_in_file(content, options)
 | 
				
			||||||
 | 
					     expected = "127.0.0.1 localhost"
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					-    eq_(new_content, expected.encode())
 | 
				
			||||||
 | 
					+    assert new_content == expected.encode()
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					 def test_present():
 | 
				
			||||||
 | 
					@@ -35,4 +33,4 @@ def test_present():
 | 
				
			||||||
 | 
					     new_content = line_in_file(content, options)
 | 
				
			||||||
 | 
					     expected = ["127.0.0.1 localhost", present_line]
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					-    eq_(new_content, "\n".join(expected).encode())
 | 
				
			||||||
 | 
					+    assert new_content == "\n".join(expected).encode()
 | 
				
			||||||
 | 
					Index: moban-ansible-0.0.2/tests/utils.py
 | 
				
			||||||
 | 
					===================================================================
 | 
				
			||||||
 | 
					--- moban-ansible-0.0.2.orig/tests/utils.py	2020-09-05 01:50:13.000000000 +0200
 | 
				
			||||||
 | 
					+++ moban-ansible-0.0.2/tests/utils.py	2020-09-24 13:49:33.744346702 +0200
 | 
				
			||||||
 | 
					@@ -3,7 +3,7 @@ import sys
 | 
				
			||||||
 | 
					 from textwrap import dedent
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					 from mock import patch
 | 
				
			||||||
 | 
					-from nose.tools import eq_
 | 
				
			||||||
 | 
					+import unittest
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					 from moban.main import main
 | 
				
			||||||
 | 
					 from fs.opener.parse import parse_fs_url
 | 
				
			||||||
 | 
					@@ -13,12 +13,12 @@ from moban.externals import file_system
 | 
				
			||||||
 | 
					 def verify_content(file_name, expected):
 | 
				
			||||||
 | 
					     with open(file_name, "r") as f:
 | 
				
			||||||
 | 
					         content = f.read()
 | 
				
			||||||
 | 
					-        eq_(content, expected)
 | 
				
			||||||
 | 
					+        assert content == expected
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					 def verify_content_with_fs(file_name, expected):
 | 
				
			||||||
 | 
					     content = file_system.read_unicode(file_name)
 | 
				
			||||||
 | 
					-    eq_(content, expected)
 | 
				
			||||||
 | 
					+    assert content == expected
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					 def run_moban(args, folder, criterias):
 | 
				
			||||||
 | 
					@@ -39,7 +39,7 @@ def run_moban_with_fs(args, folder, crit
 | 
				
			||||||
 | 
					     os.unlink(result.resource)  # delete the zip file
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					-class Docs(object):
 | 
				
			||||||
 | 
					+class Docs(unittest.TestCase):
 | 
				
			||||||
 | 
					     def setUp(self):
 | 
				
			||||||
 | 
					         self.current = os.getcwd()
 | 
				
			||||||
 | 
					         self.base_folder = "docs"
 | 
				
			||||||
							
								
								
									
										10
									
								
								python-moban-ansible.changes
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										10
									
								
								python-moban-ansible.changes
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,10 @@
 | 
				
			|||||||
 | 
					-------------------------------------------------------------------
 | 
				
			||||||
 | 
					Thu Sep 24 08:40:44 UTC 2020 - pgajdos@suse.com
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					- initial version 0.0.2, required by python-moban
 | 
				
			||||||
 | 
					- added patches
 | 
				
			||||||
 | 
					  fix https://github.com/moremoban/moban-ansible/pull/2
 | 
				
			||||||
 | 
					  + python-moban-ansible-remove-nose.patch
 | 
				
			||||||
 | 
					- added sources
 | 
				
			||||||
 | 
					  + _multibuild
 | 
				
			||||||
 | 
					
 | 
				
			||||||
							
								
								
									
										87
									
								
								python-moban-ansible.spec
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										87
									
								
								python-moban-ansible.spec
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,87 @@
 | 
				
			|||||||
 | 
					#
 | 
				
			||||||
 | 
					# spec file for package python-moban-ansible
 | 
				
			||||||
 | 
					#
 | 
				
			||||||
 | 
					# 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/
 | 
				
			||||||
 | 
					#
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Tests have dependency loop with moban
 | 
				
			||||||
 | 
					%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-ansible%{pkg_suffix}
 | 
				
			||||||
 | 
					Version:        0.0.2
 | 
				
			||||||
 | 
					Release:        0
 | 
				
			||||||
 | 
					Summary:        Ansible filters, tests and utility functions for moban users
 | 
				
			||||||
 | 
					License:        BSD-3-Clause
 | 
				
			||||||
 | 
					Group:          Development/Languages/Python
 | 
				
			||||||
 | 
					URL:            https://github.com/moremoban/moban-ansible
 | 
				
			||||||
 | 
					Source:         https://files.pythonhosted.org/packages/source/m/moban-ansible/moban-ansible-%{version}.tar.gz
 | 
				
			||||||
 | 
					# https://github.com/moremoban/moban-ansible/pull/2
 | 
				
			||||||
 | 
					Patch0:          python-moban-ansible-remove-nose.patch
 | 
				
			||||||
 | 
					BuildRequires:  %{python_module devel}
 | 
				
			||||||
 | 
					BuildRequires:  %{python_module setuptools}
 | 
				
			||||||
 | 
					BuildRequires:  fdupes
 | 
				
			||||||
 | 
					BuildRequires:  python-rpm-macros
 | 
				
			||||||
 | 
					Requires:       python-moban >= 0.8.1
 | 
				
			||||||
 | 
					BuildArch:      noarch
 | 
				
			||||||
 | 
					# SECTION test requirements
 | 
				
			||||||
 | 
					%if %{with test}
 | 
				
			||||||
 | 
					BuildRequires:  %{python_module moban >= 0.8.1}
 | 
				
			||||||
 | 
					BuildRequires:  %{python_module pytest}
 | 
				
			||||||
 | 
					BuildRequires:  %{python_module mock}
 | 
				
			||||||
 | 
					%endif
 | 
				
			||||||
 | 
					# /SECTION
 | 
				
			||||||
 | 
					%python_subpackages
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					%description
 | 
				
			||||||
 | 
					Ansible filters, tests and utility functions for moban users
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					%prep
 | 
				
			||||||
 | 
					%setup -q -n moban-ansible-%{version}
 | 
				
			||||||
 | 
					%patch0 -p1
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					%if !%{with test}
 | 
				
			||||||
 | 
					%build
 | 
				
			||||||
 | 
					%python_build
 | 
				
			||||||
 | 
					%endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					%if !%{with test}
 | 
				
			||||||
 | 
					%install
 | 
				
			||||||
 | 
					%python_install
 | 
				
			||||||
 | 
					%python_expand %fdupes %{buildroot}%{$python_sitelib}
 | 
				
			||||||
 | 
					%endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					%if %{with test}
 | 
				
			||||||
 | 
					%check
 | 
				
			||||||
 | 
					%pytest
 | 
				
			||||||
 | 
					%endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					%if !%{with test}
 | 
				
			||||||
 | 
					%files %{python_files}
 | 
				
			||||||
 | 
					%doc CHANGELOG.rst README.rst
 | 
				
			||||||
 | 
					%license LICENSE
 | 
				
			||||||
 | 
					%{python_sitelib}/*
 | 
				
			||||||
 | 
					%endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					%changelog
 | 
				
			||||||
		Reference in New Issue
	
	Block a user