forked from pool/python-actdiag
- Convert to libalternatives
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-actdiag?expand=0&rev=23
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
actdiag-3.0.0.tar.gz
Normal file
3
actdiag-3.0.0.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:0efc9b2887d3ec765b0f45bde1d5757a52301151ea62bcc2297e77aad9264006
|
||||||
|
size 2574809
|
118
clean-up-assertions.patch
Normal file
118
clean-up-assertions.patch
Normal file
@@ -0,0 +1,118 @@
|
|||||||
|
From a897ea0af0792dbb721c47dff49f222e409c4334 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Steve Kowalik <steven@wedontsleep.org>
|
||||||
|
Date: Thu, 18 Jan 2024 15:09:22 +1100
|
||||||
|
Subject: [PATCH] Clean up test assertions
|
||||||
|
|
||||||
|
Python 3.1 and 3.2 massively cleaned up and reorganized assert* methods
|
||||||
|
in TestCase, all for the better. A large amount of methods were then
|
||||||
|
deprecated, and they have finally been removed in Python 3.12. Clean up
|
||||||
|
the callsites.
|
||||||
|
---
|
||||||
|
src/actdiag/tests/test_rst_directives.py | 37 ++++++++++--------------
|
||||||
|
1 file changed, 16 insertions(+), 21 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/actdiag/tests/test_rst_directives.py b/src/actdiag/tests/test_rst_directives.py
|
||||||
|
index 9af9ff7..4738970 100644
|
||||||
|
--- a/src/actdiag/tests/test_rst_directives.py
|
||||||
|
+++ b/src/actdiag/tests/test_rst_directives.py
|
||||||
|
@@ -47,11 +47,11 @@ def test_setup(self):
|
||||||
|
self.assertEqual(directives.ActdiagDirective,
|
||||||
|
docutils._directives['actdiag'])
|
||||||
|
self.assertEqual('PNG', options['format'])
|
||||||
|
- self.assertEqual(False, options['antialias'])
|
||||||
|
- self.assertEqual(None, options['fontpath'])
|
||||||
|
- self.assertEqual(False, options['nodoctype'])
|
||||||
|
- self.assertEqual(False, options['noviewbox'])
|
||||||
|
- self.assertEqual(False, options['inline_svg'])
|
||||||
|
+ self.assertFalse(options['antialias'])
|
||||||
|
+ self.assertIsNone(options['fontpath'])
|
||||||
|
+ self.assertFalse(options['nodoctype'])
|
||||||
|
+ self.assertFalse(options['noviewbox'])
|
||||||
|
+ self.assertFalse(options['inline_svg'])
|
||||||
|
|
||||||
|
def test_setup_with_args(self):
|
||||||
|
directives.setup(format='SVG', antialias=True, fontpath='/dev/null',
|
||||||
|
@@ -62,11 +62,11 @@ def test_setup_with_args(self):
|
||||||
|
self.assertEqual(directives.ActdiagDirective,
|
||||||
|
docutils._directives['actdiag'])
|
||||||
|
self.assertEqual('SVG', options['format'])
|
||||||
|
- self.assertEqual(True, options['antialias'])
|
||||||
|
+ self.assertTrue(options['antialias'])
|
||||||
|
self.assertEqual('/dev/null', options['fontpath'])
|
||||||
|
- self.assertEqual(True, options['nodoctype'])
|
||||||
|
- self.assertEqual(True, options['noviewbox'])
|
||||||
|
- self.assertEqual(True, options['inline_svg'])
|
||||||
|
+ self.assertTrue(options['nodoctype'])
|
||||||
|
+ self.assertTrue(options['noviewbox'])
|
||||||
|
+ self.assertTrue(options['inline_svg'])
|
||||||
|
|
||||||
|
@capture_stderr
|
||||||
|
def test_cleanup(self):
|
||||||
|
@@ -131,7 +131,7 @@ def test_setup_noviewbox_is_true(self):
|
||||||
|
self.assertEqual(1, len(doctree))
|
||||||
|
self.assertEqual(nodes.image, type(doctree[0]))
|
||||||
|
svg = open(doctree[0]['uri']).read()
|
||||||
|
- self.assertRegexpMatches(svg, r'<svg height="\d+" width="\d+" ')
|
||||||
|
+ self.assertRegex(svg, r'<svg height="\d+" width="\d+" ')
|
||||||
|
|
||||||
|
def test_setup_noviewbox_is_false(self):
|
||||||
|
directives.setup(format='SVG', outputdir=self.tmpdir, noviewbox=False)
|
||||||
|
@@ -142,7 +142,7 @@ def test_setup_noviewbox_is_false(self):
|
||||||
|
self.assertEqual(1, len(doctree))
|
||||||
|
self.assertEqual(nodes.image, type(doctree[0]))
|
||||||
|
svg = open(doctree[0]['uri']).read()
|
||||||
|
- self.assertRegexpMatches(svg, r'<svg viewBox="0 0 \d+ \d+" ')
|
||||||
|
+ self.assertRegex(svg, r'<svg viewBox="0 0 \d+ \d+" ')
|
||||||
|
|
||||||
|
def test_setup_inline_svg_is_true(self):
|
||||||
|
directives.setup(format='SVG', outputdir=self.tmpdir, inline_svg=True)
|
||||||
|
@@ -189,8 +189,7 @@ def test_setup_inline_svg_is_true_and_width_option1(self):
|
||||||
|
self.assertEqual(1, len(doctree))
|
||||||
|
self.assertEqual(nodes.raw, type(doctree[0]))
|
||||||
|
self.assertEqual(nodes.Text, type(doctree[0][0]))
|
||||||
|
- self.assertRegexpMatches(doctree[0][0],
|
||||||
|
- r'<svg height="\d+" width="100" ')
|
||||||
|
+ self.assertRegex(doctree[0][0], r'<svg height="\d+" width="100" ')
|
||||||
|
|
||||||
|
def test_setup_inline_svg_is_true_and_width_option2(self):
|
||||||
|
directives.setup(format='SVG', outputdir=self.tmpdir,
|
||||||
|
@@ -203,8 +202,7 @@ def test_setup_inline_svg_is_true_and_width_option2(self):
|
||||||
|
self.assertEqual(1, len(doctree))
|
||||||
|
self.assertEqual(nodes.raw, type(doctree[0]))
|
||||||
|
self.assertEqual(nodes.Text, type(doctree[0][0]))
|
||||||
|
- self.assertRegexpMatches(doctree[0][0],
|
||||||
|
- r'<svg height="\d+" width="10000" ')
|
||||||
|
+ self.assertRegex(doctree[0][0], r'<svg height="\d+" width="10000" ')
|
||||||
|
|
||||||
|
def test_setup_inline_svg_is_true_and_height_option1(self):
|
||||||
|
directives.setup(format='SVG', outputdir=self.tmpdir,
|
||||||
|
@@ -217,8 +215,7 @@ def test_setup_inline_svg_is_true_and_height_option1(self):
|
||||||
|
self.assertEqual(1, len(doctree))
|
||||||
|
self.assertEqual(nodes.raw, type(doctree[0]))
|
||||||
|
self.assertEqual(nodes.Text, type(doctree[0][0]))
|
||||||
|
- self.assertRegexpMatches(doctree[0][0],
|
||||||
|
- r'<svg height="100" width="\d+" ')
|
||||||
|
+ self.assertRegex(doctree[0][0], r'<svg height="100" width="\d+" ')
|
||||||
|
|
||||||
|
def test_setup_inline_svg_is_true_and_height_option2(self):
|
||||||
|
directives.setup(format='SVG', outputdir=self.tmpdir,
|
||||||
|
@@ -231,8 +228,7 @@ def test_setup_inline_svg_is_true_and_height_option2(self):
|
||||||
|
self.assertEqual(1, len(doctree))
|
||||||
|
self.assertEqual(nodes.raw, type(doctree[0]))
|
||||||
|
self.assertEqual(nodes.Text, type(doctree[0][0]))
|
||||||
|
- self.assertRegexpMatches(doctree[0][0],
|
||||||
|
- r'<svg height="10000" width="\d+" ')
|
||||||
|
+ self.assertRegex(doctree[0][0], r'<svg height="10000" width="\d+" ')
|
||||||
|
|
||||||
|
def test_setup_inline_svg_is_true_and_width_and_height_option(self):
|
||||||
|
directives.setup(format='SVG', outputdir=self.tmpdir,
|
||||||
|
@@ -246,8 +242,7 @@ def test_setup_inline_svg_is_true_and_width_and_height_option(self):
|
||||||
|
self.assertEqual(1, len(doctree))
|
||||||
|
self.assertEqual(nodes.raw, type(doctree[0]))
|
||||||
|
self.assertEqual(nodes.Text, type(doctree[0][0]))
|
||||||
|
- self.assertRegexpMatches(doctree[0][0],
|
||||||
|
- '<svg height="100" width="200" ')
|
||||||
|
+ self.assertRegex(doctree[0][0], '<svg height="100" width="200" ')
|
||||||
|
|
||||||
|
def test_call_with_braces(self):
|
||||||
|
directives.setup(format='SVG', outputdir=self.tmpdir)
|
68
python-actdiag.changes
Normal file
68
python-actdiag.changes
Normal file
@@ -0,0 +1,68 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Jun 16 12:10:48 UTC 2025 - Markéta Machová <mmachova@suse.com>
|
||||||
|
|
||||||
|
- Convert to libalternatives
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Apr 8 10:32:41 UTC 2024 - Dirk Müller <dmueller@suse.com>
|
||||||
|
|
||||||
|
- add sle15_python_module_pythons
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Jan 18 04:31:47 UTC 2024 - Steve Kowalik <steven.kowalik@suse.com>
|
||||||
|
|
||||||
|
- Switch to autosetup and pyproject macros.
|
||||||
|
- Add patch clean-up-assertions.patch:
|
||||||
|
* Use non-deprecated assertion functions.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Aug 4 20:14:27 UTC 2022 - Ben Greiner <code@bnavigator.de>
|
||||||
|
|
||||||
|
- Fix the requirements
|
||||||
|
- Enable tests
|
||||||
|
- Don't catchall files
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Aug 4 08:24:17 UTC 2022 - Otto Hollmann <otto.hollmann@suse.com>
|
||||||
|
|
||||||
|
- Update to 3.0.0
|
||||||
|
* Drop python3.6 support
|
||||||
|
* Use funcparserlib-1.0.0a0 or newer to support new python versions
|
||||||
|
* Allow to write multiline string via triple quotes (""" ... """)
|
||||||
|
* Fix a bug: Fix #147: file existence disclosure using svg renderer
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed May 27 09:35:59 UTC 2020 - Petr Gajdos <pgajdos@suse.com>
|
||||||
|
|
||||||
|
- %python3_only -> %python_alternative
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Feb 25 15:57:30 UTC 2020 - Thomas Bechtold <tbechtold@suse.com>
|
||||||
|
|
||||||
|
- update to 2.0.0:
|
||||||
|
* Drop python2 and python3.4 support
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Jan 8 17:36:08 UTC 2019 - Jonathan Brownell <jbrownell@suse.com>
|
||||||
|
|
||||||
|
- Update conditionals to use Suggests properly based on RHEL version
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Jan 8 04:43:59 UTC 2019 - Thomas Bechtold <tbechtold@suse.com>
|
||||||
|
|
||||||
|
- Use Requires instead of Suggests for RHEL/Fedora systems
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Dec 5 01:51:27 UTC 2018 - Jan Engelhardt <jengelh@inai.de>
|
||||||
|
|
||||||
|
- Use noun phrase in summary.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Dec 4 12:45:27 UTC 2018 - Matej Cepl <mcepl@suse.com>
|
||||||
|
|
||||||
|
- Remove superfluous devel dependency for noarch package
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Sep 7 15:17:16 UTC 2017 - tbechtold@suse.com
|
||||||
|
|
||||||
|
- Initial packaging (version 0.5.4)
|
74
python-actdiag.spec
Normal file
74
python-actdiag.spec
Normal file
@@ -0,0 +1,74 @@
|
|||||||
|
#
|
||||||
|
# spec file for package python-actdiag
|
||||||
|
#
|
||||||
|
# Copyright (c) 2025 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/
|
||||||
|
#
|
||||||
|
|
||||||
|
|
||||||
|
%bcond_without libalternatives
|
||||||
|
%{?sle15_python_module_pythons}
|
||||||
|
Name: python-actdiag
|
||||||
|
Version: 3.0.0
|
||||||
|
Release: 0
|
||||||
|
Summary: Text to activity-diagram image generator
|
||||||
|
License: Apache-2.0
|
||||||
|
URL: http://blockdiag.com/
|
||||||
|
Source: https://files.pythonhosted.org/packages/source/a/actdiag/actdiag-%{version}.tar.gz
|
||||||
|
# PATCH-FIX-UPSTREAM gh#blockdiag/actdiag#25
|
||||||
|
Patch0: clean-up-assertions.patch
|
||||||
|
BuildRequires: %{python_module base >= 3.7}
|
||||||
|
BuildRequires: %{python_module blockdiag >= 3}
|
||||||
|
BuildRequires: %{python_module docutils}
|
||||||
|
BuildRequires: %{python_module pip}
|
||||||
|
BuildRequires: %{python_module pytest}
|
||||||
|
BuildRequires: %{python_module setuptools}
|
||||||
|
BuildRequires: %{python_module wheel}
|
||||||
|
BuildRequires: alts
|
||||||
|
BuildRequires: fdupes
|
||||||
|
BuildRequires: python-rpm-macros
|
||||||
|
Requires: alts
|
||||||
|
Requires: python-blockdiag >= 3
|
||||||
|
BuildArch: noarch
|
||||||
|
%python_subpackages
|
||||||
|
|
||||||
|
%description
|
||||||
|
actdiag generates activity-diagram image files from spec-text files.
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%autosetup -p1 -n actdiag-%{version}
|
||||||
|
# python-blockdiag-nose-to-pytest.patch of python-blockdiag changed the function name
|
||||||
|
sed -i 's/testcase_generator/_testcase_generator/' src/actdiag/tests/test_generate_diagram.py
|
||||||
|
|
||||||
|
%build
|
||||||
|
%pyproject_wheel
|
||||||
|
|
||||||
|
%install
|
||||||
|
%pyproject_install
|
||||||
|
%python_clone -a %{buildroot}%{_bindir}/actdiag
|
||||||
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||||
|
|
||||||
|
%check
|
||||||
|
%pytest src/actdiag/tests
|
||||||
|
|
||||||
|
%pre
|
||||||
|
%python_libalternatives_reset_alternative actdiag
|
||||||
|
|
||||||
|
%files %{python_files}
|
||||||
|
%license LICENSE
|
||||||
|
%doc README.rst
|
||||||
|
%python_alternative %{_bindir}/actdiag
|
||||||
|
%{python_sitelib}/actdiag
|
||||||
|
%{python_sitelib}/actdiag-%{version}.dist-info
|
||||||
|
|
||||||
|
%changelog
|
Reference in New Issue
Block a user