17
0

Compare commits

31 Commits

Author SHA256 Message Date
6b74cb4bef Accepting request 1301513 from devel:languages:python
- Replace python-blockdiag-nose-to-pytest.patch with a different
  upstream patch to also drop use of yield tests.

OBS-URL: https://build.opensuse.org/request/show/1301513
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-blockdiag?expand=0&rev=13
2025-08-27 19:34:48 +00:00
a3edc68c72 - Replace python-blockdiag-nose-to-pytest.patch with a different
upstream patch to also drop use of yield tests.

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-blockdiag?expand=0&rev=30
2025-08-27 02:56:11 +00:00
bf4d23982c Accepting request 1282830 from devel:languages:python
- fix usage of libalternatives

OBS-URL: https://build.opensuse.org/request/show/1282830
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-blockdiag?expand=0&rev=12
2025-06-04 18:30:13 +00:00
fe14607c6b Accepting request 1277708 from devel:languages:python
OBS-URL: https://build.opensuse.org/request/show/1277708
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-blockdiag?expand=0&rev=11
2025-05-15 15:02:45 +00:00
229448d5d0 - Convert to pip-based build
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-blockdiag?expand=0&rev=26
2025-05-15 11:04:45 +00:00
6902e5ab4d Accepting request 1115014 from devel:languages:python
OBS-URL: https://build.opensuse.org/request/show/1115014
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-blockdiag?expand=0&rev=10
2023-10-04 20:31:43 +00:00
833255b998 Accepting request 1114989 from home:mcalabkova:branches:devel:languages:python
- Add upstream pillow10.patch to fix compatibility with Pillow 10.0.0

OBS-URL: https://build.opensuse.org/request/show/1114989
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-blockdiag?expand=0&rev=24
2023-10-03 12:53:11 +00:00
6fbb71beca Accepting request 1084288 from devel:languages:python
- add sle15_python_module_pythons (jsc#PED-68)

OBS-URL: https://build.opensuse.org/request/show/1084288
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-blockdiag?expand=0&rev=9
2023-05-03 13:42:15 +00:00
8f809b21cb - add sle15_python_module_pythons (jsc#PED-68)
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-blockdiag?expand=0&rev=22
2023-05-03 11:51:11 +00:00
68ec44c8af Accepting request 993149 from devel:languages:python
OBS-URL: https://build.opensuse.org/request/show/993149
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-blockdiag?expand=0&rev=8
2022-08-05 17:51:09 +00:00
faa254a7c8 Accepting request 993133 from home:bnavigator:branches:devel:languages:python
- 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 #147: file existence disclosure using svg renderer
- Refresh python-blockdiag-nose-to-pytest.patch

OBS-URL: https://build.opensuse.org/request/show/993133
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-blockdiag?expand=0&rev=20
2022-08-04 20:59:21 +00:00
484a456f37 Clean up SPEC file
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-blockdiag?expand=0&rev=19
2021-12-09 00:52:59 +00:00
81260fbe9d Accepting request 915434 from devel:languages:python
OBS-URL: https://build.opensuse.org/request/show/915434
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-blockdiag?expand=0&rev=7
2021-09-03 19:25:26 +00:00
a402d1d7f1 Accepting request 915425 from home:pgajdos:python
The sed was superfluous, redundant and forgotten.
- added patches
  https://github.com/blockdiag/blockdiag/pull/131
  + python-blockdiag-nose-to-pytest.patch

OBS-URL: https://build.opensuse.org/request/show/915425
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-blockdiag?expand=0&rev=18
2021-09-01 08:57:37 +00:00
98d79ad5f7 Accepting request 915064 from home:pgajdos:python
- %check: test the package

OBS-URL: https://build.opensuse.org/request/show/915064
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-blockdiag?expand=0&rev=17
2021-08-31 17:54:10 +00:00
a78c2c1765 Accepting request 778638 from devel:languages:python
- Update to 2.0.1:
  * Drop python2 and python3.4 support
  * Fix #126: '_io.BufferedRandom' object has no attribute 'buffer'
  * Fix #109 blockdiag does not work with recent pillow

OBS-URL: https://build.opensuse.org/request/show/778638
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-blockdiag?expand=0&rev=6
2020-02-24 14:54:22 +00:00
a64361add6 - Update to 2.0.1:
* Drop python2 and python3.4 support
  * Fix #126: '_io.BufferedRandom' object has no attribute 'buffer'
  * Fix #109 blockdiag does not work with recent pillow

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-blockdiag?expand=0&rev=15
2020-02-24 02:13:35 +00:00
b1273b396e Accepting request 680067 from devel:languages:python
- Update to 1.5.4:
  * better python 3.7 compatibility

OBS-URL: https://build.opensuse.org/request/show/680067
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-blockdiag?expand=0&rev=5
2019-03-01 15:48:16 +00:00
Tomáš Chvátal
01fe1f9abe - Update to 1.5.4:
* better python 3.7 compatibility

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-blockdiag?expand=0&rev=13
2019-02-28 09:40:39 +00:00
2e4d427b57 Accepting request 654395 from devel:languages:python
OBS-URL: https://build.opensuse.org/request/show/654395
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-blockdiag?expand=0&rev=4
2018-12-13 18:46:54 +00:00
6ff0eddfc2 Accepting request 654138 from home:jengelh:branches:devel:languages:python
- Use noun phrase in summary.

OBS-URL: https://build.opensuse.org/request/show/654138
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-blockdiag?expand=0&rev=11
2018-12-05 08:20:15 +00:00
926ca50898 Clean up the SPEC file
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-blockdiag?expand=0&rev=10
2018-12-04 17:10:32 +00:00
702f902520 Remove superfluous devel dependency for noarch package
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-blockdiag?expand=0&rev=9
2018-12-04 13:17:17 +00:00
66bccca7b5 Accepting request 583415 from devel:languages:python
OBS-URL: https://build.opensuse.org/request/show/583415
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-blockdiag?expand=0&rev=3
2018-03-07 09:38:37 +00:00
Thomas Bechtold
207078c9d6 Accepting request 583390 from home:aplanas:branches:devel:languages:python
Allows Recommends and Suggest in Fedora

OBS-URL: https://build.opensuse.org/request/show/583390
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-blockdiag?expand=0&rev=7
2018-03-06 14:29:56 +00:00
98c9566202 Accepting request 580805 from devel:languages:python
OBS-URL: https://build.opensuse.org/request/show/580805
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-blockdiag?expand=0&rev=2
2018-03-05 12:37:22 +00:00
1b5286e067 Accepting request 580671 from home:aplanas:branches:devel:languages:python
- Recommends only for SUSE

OBS-URL: https://build.opensuse.org/request/show/580671
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-blockdiag?expand=0&rev=5
2018-02-27 21:54:09 +00:00
117da22a07 Accepting request 522204 from devel:languages:python
OBS-URL: https://build.opensuse.org/request/show/522204
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-blockdiag?expand=0&rev=1
2017-10-11 20:56:26 +00:00
Todd R
7058aac291 Accepting request 489636 from home:TheBlackCat:branches:devel:languages:python
- Implement single-spec version.

OBS-URL: https://build.opensuse.org/request/show/489636
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-blockdiag?expand=0&rev=3
2017-04-20 15:16:51 +00:00
b64d465d45 Accepting request 443108 from home:termim:branches:devel:languages:python
implement update-alternatives

OBS-URL: https://build.opensuse.org/request/show/443108
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-blockdiag?expand=0&rev=2
2016-12-06 12:05:45 +00:00
fa637669a4 Accepting request 394974 from Cloud:OpenStack:Master
OBS-URL: https://build.opensuse.org/request/show/394974
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-blockdiag?expand=0&rev=1
2016-05-17 13:13:39 +00:00
3 changed files with 140 additions and 24 deletions

View File

@@ -1,3 +1,15 @@
From 4f4f726252084f17ecc6c524592222af09d37da4 Mon Sep 17 00:00:00 2001
From: Guillaume Grossetie <ggrossetie@yuzutech.fr>
Date: Mon, 10 Jul 2023 00:31:37 +0200
Subject: [PATCH] Switch to pytest (nose is unmaintained and does not work on
Python3.10)
---
setup.py | 3 +-
src/blockdiag/tests/test_generate_diagram.py | 95 ++++++++++----------
tox.ini | 2 +-
3 files changed, 49 insertions(+), 51 deletions(-)
Index: blockdiag-3.0.0/setup.py
===================================================================
--- blockdiag-3.0.0.orig/setup.py
@@ -23,39 +35,139 @@ Index: blockdiag-3.0.0/src/blockdiag/tests/test_generate_diagram.py
===================================================================
--- blockdiag-3.0.0.orig/src/blockdiag/tests/test_generate_diagram.py
+++ blockdiag-3.0.0/src/blockdiag/tests/test_generate_diagram.py
@@ -19,8 +19,6 @@ import sys
@@ -19,7 +19,7 @@ import sys
import unittest
from xml.etree import ElementTree
-from nose.tools import nottest
-
+import pytest
import blockdiag
import blockdiag.command
from blockdiag.tests.utils import (TemporaryDirectory, capture_stderr,
@@ -52,7 +50,7 @@ def test_generate():
files = get_diagram_files(basepath)
options = []
@@ -38,7 +38,7 @@ def get_diagram_files(testdir):
diagramsdir = os.path.join(testdir, 'diagrams')
skipped = ['README', 'debian-logo-256color-palettealpha.png',
- 'errors', 'invalid.txt', 'white.gif']
+ 'errors', 'invalid.txt', 'white.gif', 'node_icon.diag']
for file in os.listdir(diagramsdir):
if file in skipped:
pass
@@ -46,66 +46,67 @@ def get_diagram_files(testdir):
yield os.path.join(diagramsdir, file)
-def test_generate():
- mainfunc = blockdiag.command.main
- basepath = os.path.dirname(__file__)
- files = get_diagram_files(basepath)
- options = []
+base_path = os.path.dirname(__file__)
+files = get_diagram_files(base_path)
+generate_testdata = []
+generate_with_separate_testdata = []
+for file_source in files:
+ generate_testdata.append((file_source, 'svg', []))
+ generate_testdata.append((file_source, 'png', []))
+ generate_testdata.append((file_source, 'png', ['--antialias']))
+ generate_testdata.append((file_source, 'pdf', []))
+ if re.search('separate', file_source):
+ generate_with_separate_testdata.append((file_source, 'svg', ['--separate']))
+ generate_with_separate_testdata.append((file_source, 'png', ['--separate']))
+ generate_with_separate_testdata.append((file_source, 'png', ['--separate', '--antialias']))
+ generate_with_separate_testdata.append((file_source, 'pdf', ['--separate']))
+
- for testcase in testcase_generator(basepath, mainfunc, files, options):
+ for testcase in _testcase_generator(basepath, mainfunc, files, options):
yield testcase
- yield testcase
+@pytest.mark.parametrize("source,file_type,options", generate_with_separate_testdata)
+def test_generate_with_separate_option(source, file_type, options):
+ mainfunc = blockdiag.command.main
+ generate(mainfunc, source, file_type, options)
@@ -63,12 +61,11 @@ def test_generate_with_separate():
filtered = (f for f in files if re.search('separate', f))
options = ['--separate']
-def test_generate_with_separate():
+@pytest.mark.parametrize("source,file_type,options", generate_testdata)
+def test_generate_with_separate(source, file_type, options):
mainfunc = blockdiag.command.main
- basepath = os.path.dirname(__file__)
- files = get_diagram_files(basepath)
- filtered = (f for f in files if re.search('separate', f))
- options = ['--separate']
-
- for testcase in testcase_generator(basepath, mainfunc, filtered, options):
+ for testcase in _testcase_generator(basepath, mainfunc, filtered, options):
yield testcase
- yield testcase
-
-
-@nottest
-def testcase_generator(basepath, mainfunc, files, options):
+def _testcase_generator(basepath, mainfunc, files, options):
fontpath = get_fontpath(basepath)
options = options + ['-f', fontpath]
- fontpath = get_fontpath(basepath)
- options = options + ['-f', fontpath]
+ generate(mainfunc, source, file_type, options)
- for source in files:
- yield generate, mainfunc, 'svg', source, options
+@capture_stderr
+def generate(mainfunc, source, file_type, options):
+ if file_type == 'png':
if not supported_pil():
- yield unittest.skip("Pillow is not available")(generate)
- yield unittest.skip("Pillow is not available")(generate)
- elif os.environ.get('ALL_TESTS') is None:
- message = "Skipped by default. To enable it, specify $ALL_TESTS=1"
- yield unittest.skip(message)(generate)
- yield unittest.skip(message)(generate)
- else:
- yield generate, mainfunc, 'png', source, options
- yield generate, mainfunc, 'png', source, options + ['--antialias']
-
+ unittest.skip('Pillow is not available')
+ return
+ if os.environ.get('ALL_TESTS') is None:
+ unittest.skip('Skipped by default. To enable it, specify $ALL_TESTS=1')
+ return
+ elif file_type == 'pdf':
if not supported_pdf():
- yield unittest.skip("reportlab is not available")(generate)
- elif os.environ.get('ALL_TESTS') is None:
- message = "Skipped by default. To enable it, specify $ALL_TESTS=1"
- yield unittest.skip(message)(generate)
- else:
- yield generate, mainfunc, 'pdf', source, options
-
+ unittest.skip('reportlab is not available')
+ return
+ if os.environ.get('ALL_TESTS') is None:
+ unittest.skip('Skipped by default. To enable it, specify $ALL_TESTS=1')
+ return
-@capture_stderr
-def generate(mainfunc, filetype, source, options):
+ tmpdir = None
try:
tmpdir = TemporaryDirectory()
- fd, tmpfile = tmpdir.mkstemp()
+ fd, tmp_file = tmpdir.mkstemp()
os.close(fd)
-
- mainfunc(['--debug', '-T', filetype, '-o', tmpfile, source] +
- list(options))
+ mainfunc(
+ [
+ '--debug',
+ '-T',
+ file_type,
+ '-o', tmp_file, source
+ ] + list(options)
+ )
finally:
- tmpdir.clean()
+ if tmpdir is not None:
+ tmpdir.clean()
def not_exist_font_config_option_test():
Index: blockdiag-3.0.0/tox.ini
===================================================================
--- blockdiag-3.0.0.orig/tox.ini

View File

@@ -1,3 +1,9 @@
-------------------------------------------------------------------
Wed Aug 27 02:55:25 UTC 2025 - Steve Kowalik <steven.kowalik@suse.com>
- Replace python-blockdiag-nose-to-pytest.patch with a different
upstream patch to also drop use of yield tests.
-------------------------------------------------------------------
Wed Jun 4 14:58:34 UTC 2025 - Nico Krapp <nico.krapp@suse.com>

View File

@@ -1,7 +1,7 @@
#
# spec file for package python-blockdiag
#
# Copyright (c) 2025 SUSE LLC
# Copyright (c) 2025 SUSE LLC and contributors
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -23,11 +23,9 @@ Version: 3.0.0
Release: 0
Summary: Program to generate block-diagram images from text
License: Apache-2.0
Group: Development/Languages/Python
URL: http://blockdiag.com/
Source: https://files.pythonhosted.org/packages/source/b/blockdiag/blockdiag-%{version}.tar.gz
# PATCH-FIX-UPSTREAM python-blockdiag-nose-to-pytest.patch gh#blockdiag/blockdiag#131 pgajdos@suse.com
# Remove the last silly dependency on nose
# PATCH-FIX-UPSTREAM Based on gh#blockdiag/blockdiag#175/commits/4f4f726252084f17ecc6c524592222af09d37da4
Patch0: python-blockdiag-nose-to-pytest.patch
# PATCH-FIX-UPSTREAM https://github.com/blockdiag/blockdiag/pull/179 Add support for Pillow 10
Patch1: pillow10.patch
@@ -94,6 +92,6 @@ popd
%doc CHANGES.rst README.rst
%python_alternative %{_bindir}/blockdiag
%{python_sitelib}/blockdiag
%{python_sitelib}/blockdiag-%{version}*-info
%{python_sitelib}/blockdiag-%{version}.dist-info
%changelog