From 6509a9c88eedace6b68c0f2d7c7c1201d7d46cce Mon Sep 17 00:00:00 2001 From: rdobuilder Date: Aug 01 2022 07:29:35 +0000 Subject: Update to 3.0.0 Related-to: https://review.rdoproject.org/r/q/I2ad0a4501a7d90e363e1d8d1730eb0ddb1a05d15 --- diff --git a/.python-blockdiag.metadata b/.python-blockdiag.metadata new file mode 100644 index 0000000..c62b8da --- /dev/null +++ b/.python-blockdiag.metadata @@ -0,0 +1 @@ +029958fbf43df896b51281ccfd1777a2ae815f65 SOURCES/blockdiag-3.0.0.tar.gz diff --git a/SOURCES/.gitignore b/SOURCES/.gitignore new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/SOURCES/.gitignore diff --git a/SOURCES/159.patch b/SOURCES/159.patch new file mode 100644 index 0000000..d70e765 --- /dev/null +++ b/SOURCES/159.patch @@ -0,0 +1,97 @@ +From 17846e821f3c979189003d8af6fdfc5301b94b85 Mon Sep 17 00:00:00 2001 +From: Dridi Boukelmoune +Date: Fri, 10 Dec 2021 09:03:29 +0100 +Subject: [PATCH 1/2] dist: Include invalid.txt needed by the test suite + +--- + MANIFEST.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/MANIFEST.in b/MANIFEST.in +index 2cdf3636..b6467b11 100644 +--- a/MANIFEST.in ++++ b/MANIFEST.in +@@ -5,6 +5,6 @@ include blockdiag.1 + include tox.ini + include src/blockdiag/tests/VLGothic/* + recursive-include examples blockdiagrc *.diag *.png *.svg +-recursive-include src README *.py *.diag *.gif *.png ++recursive-include src README *.py *.diag *.gif *.png invalid.txt + + exclude examples/update.sh + +From 7a4ffa77789a0b3c202c78e5cf198bcf32754c15 Mon Sep 17 00:00:00 2001 +From: Dridi Boukelmoune +Date: Fri, 10 Dec 2021 09:04:27 +0100 +Subject: [PATCH 2/2] test: Skip tests requiring an internet access + +Some build systems like Fedora's build packages in offline environments, +and trying to fetch remote resources results in test failures. +--- + src/blockdiag/tests/test_command.py | 7 ++++++- + src/blockdiag/tests/test_generate_diagram.py | 4 ++++ + tox.ini | 2 +- + 3 files changed, 11 insertions(+), 2 deletions(-) + +diff --git a/src/blockdiag/tests/test_command.py b/src/blockdiag/tests/test_command.py +index f5e8e569..d4bbb4e0 100644 +--- a/src/blockdiag/tests/test_command.py ++++ b/src/blockdiag/tests/test_command.py +@@ -14,12 +14,14 @@ + # limitations under the License. + + import os ++import sys + import unittest + + from blockdiag.command import BlockdiagApp +-from blockdiag.tests.utils import TemporaryDirectory ++from blockdiag.tests.utils import TemporaryDirectory, capture_stderr + + ++@capture_stderr + class TestBlockdiagApp(unittest.TestCase): + def test_app_cleans_up_images(self): + testdir = os.path.dirname(__file__) +@@ -42,6 +44,9 @@ def cleanup(): + app.register_cleanup_handler(cleanup) # to get internal state + app.run(args) + ++ if 'Could not retrieve:' in sys.stderr.getvalue(): ++ raise unittest.SkipTest("No internet access") ++ + self.assertTrue(urlopen_cache) # check images were cached + for path in urlopen_cache.values(): + self.assertFalse(os.path.exists(path)) # and removed finally +diff --git a/src/blockdiag/tests/test_generate_diagram.py b/src/blockdiag/tests/test_generate_diagram.py +index a212d89f..37620e03 100644 +--- a/src/blockdiag/tests/test_generate_diagram.py ++++ b/src/blockdiag/tests/test_generate_diagram.py +@@ -104,6 +104,8 @@ def generate(mainfunc, filetype, source, options): + + mainfunc(['--debug', '-T', filetype, '-o', tmpfile, source] + + list(options)) ++ if 'Could not retrieve:' in sys.stderr.getvalue(): ++ raise unittest.SkipTest("No internet access") + finally: + tmpdir.clean() + +@@ -150,6 +152,8 @@ def ghostscript_not_found_test(): + + args = ['-T', 'SVG', '-o', tmpfile, diagpath] + ret = blockdiag.command.main(args) ++ if 'Could not retrieve:' in sys.stderr.getvalue(): ++ raise unittest.SkipTest("No internet access") + assert 'Could not convert image:' in sys.stderr.getvalue() + assert ret == 0 + finally: +diff --git a/tox.ini b/tox.ini +index 0aafed88..e58c9977 100644 +--- a/tox.ini ++++ b/tox.ini +@@ -26,4 +26,4 @@ description = + extras = + testing + commands = +- flake8 src ++ flake8 --show-source src diff --git a/SPECS/python-blockdiag.spec b/SPECS/python-blockdiag.spec new file mode 100644 index 0000000..55bb3a3 --- /dev/null +++ b/SPECS/python-blockdiag.spec @@ -0,0 +1,241 @@ +%global srcname blockdiag +%global srcdesc \ +blockdiag and its family generate diagram images from simply text file.\ +\ +Features:\ +- Generates beautiful diagram images from simple text format (similar to\ + graphviz’s DOT format)\ +- Layouts diagram elements automatically\ +- Embeds to many documentations; Sphinx, Trac, Redmine and some wikis\ +\ +- Supports many types of diagrams\ + - block diagram (with this package)\ + - sequence diagram (with the seqdiag package)\ + - activity diagram (with the actdiag package)\ + - logical network diagram (with the nwdiag package)\ +\ +Enjoy documentation with blockdiag ! + +Name: python-%{srcname} +Version: 3.0.0 +Release: 5%{?dist} +Summary: Generate block-diagram images from text + +License: ASL 2.0 +URL: https://blockdiag.com/ +Source: %pypi_source +Patch0: https://patch-diff.githubusercontent.com/raw/blockdiag/blockdiag/pull/159.patch + +BuildArch: noarch +# upstream uses ipagp.ttf as its default font +BuildRequires: ipa-pgothic-fonts +BuildRequires: pyproject-rpm-macros +BuildRequires: python3-devel +BuildRequires: %{py3_dist docutils} +BuildRequires: %{py3_dist flake8} +BuildRequires: %{py3_dist funcparserlib} +BuildRequires: %{py3_dist mock} +BuildRequires: %{py3_dist nose} +BuildRequires: %{py3_dist pillow} +BuildRequires: %{py3_dist reportlab} +BuildRequires: %{py3_dist setuptools} +BuildRequires: %{py3_dist tox-current-env} +BuildRequires: %{py3_dist webcolors} + + +%description %{srcdesc} + + +%package -n %{srcname} +Summary: %{summary} +Requires: python3-%{srcname} = %{version}-%{release} + + +%description -n %{srcname} %{srcdesc} + + +%package -n python3-%{srcname} +Summary: Python 3 module for %{srcname} +Requires: ipa-pgothic-fonts +Provides: python3-%{srcname}-devel = %{version}-%{release} +%{?python_provide:%python_provide python3-%{srcname}} + + +%description -n python3-%{srcname} +%{summary}. + + +%prep +%autosetup -p1 -n %{srcname}-%{version} + +# collateral from patch0: +touch src/blockdiag/tests/diagrams/invalid.txt + + +%build +%py3_build + + +%install +%py3_install +install -pm 644 -D %{srcname}.1 %{buildroot}%{_mandir}/man1/%{srcname}.1 + + +%check +ALL_TESTS=1 %tox + + +%files -n %{srcname} +%license LICENSE +%{_bindir}/%{srcname} +%{_mandir}/man1/%{srcname}.1* + + +%files -n python3-%{srcname} +%license LICENSE +%{python3_sitelib}/%{srcname}* + + +%changelog +* Fri Jul 22 2022 Fedora Release Engineering - 3.0.0-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + +* Mon Jun 13 2022 Python Maint - 3.0.0-4 +- Rebuilt for Python 3.11 + +* Fri Jan 21 2022 Fedora Release Engineering - 3.0.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + +* Fri Dec 10 2021 Dridi Boukelmoune - 3.0.0-2 +- Patch the test suite to skip networked tests + +* Tue Dec 07 2021 Dridi Boukelmoune - 3.0.0-1 +- Bump version to 3.0.0 +- Run the test suite with tox + +* Fri Jul 23 2021 Fedora Release Engineering - 2.0.1-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Fri Jun 04 2021 Python Maint - 2.0.1-5 +- Rebuilt for Python 3.10 + +* Wed Jan 27 2021 Fedora Release Engineering - 2.0.1-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Tue Jul 28 2020 Fedora Release Engineering - 2.0.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Tue May 26 2020 Miro Hrončok - 2.0.1-2 +- Rebuilt for Python 3.9 + +* Mon Feb 10 2020 Dridi Boukelmoune - 2.0.1-1 +- Fold the devel subpackage in the python3 subpackage +- Bump version to 2.0.1 + +* Thu Jan 30 2020 Fedora Release Engineering - 2.0.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Sun Jan 26 2020 Dridi Boukelmoune - 2.0.0-1 +- Bump version to 2.0.0 + +* Thu Oct 03 2019 Miro Hrončok - 1.5.4-8 +- Rebuilt for Python 3.8.0rc1 (#1748018) + +* Mon Aug 19 2019 Miro Hrončok - 1.5.4-7 +- Rebuilt for Python 3.8 + +* Tue Aug 13 2019 Dridi Boukelmoune - 1.5.4-6 +- Drop pep8 dependency + +* Fri Jul 26 2019 Fedora Release Engineering - 1.5.4-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Sat Apr 20 2019 Dridi Boukelmoune - 1.5.4-4 +- Fix obsolete/provides for python 2 + +* Sat Apr 20 2019 Dridi Boukelmoune - 1.5.4-3 +- Fix devel requires + +* Sat Apr 20 2019 Dridi Boukelmoune - 1.5.4-2 +- Move the blockdiag command to its own package + +* Tue Feb 05 2019 Dridi Boukelmoune - 1.5.4-1 +- Bump to 1.5.4 +- Drop downstream patches (upstreamed) +- Catch up with packaging guidelines +- In general, use recommended RPM macros +- Drop the Python 2 package +- Inline package description + +* Sat Feb 02 2019 Fedora Release Engineering - 1.5.3-16 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Fri Jul 13 2018 Fedora Release Engineering - 1.5.3-15 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Sun Jul 08 2018 Dridi Boukelmoune 1.5.3-14 +- Amended patch for Python 3.7 + +* Tue Jul 03 2018 Dridi Boukelmoune 1.5.3-13 +- Patched for Python 3.7 + +* Tue Jun 19 2018 Miro Hrončok - 1.5.3-12 +- Rebuilt for Python 3.7 + +* Fri Feb 09 2018 Fedora Release Engineering - 1.5.3-11 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Tue Jan 16 2018 Iryna Shcherbina - 1.5.3-10 +- Update Python 2 dependency declarations to new packaging standards + (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3) + +* Tue Aug 29 2017 Haïkel Guémar - 1.5.3-9 +- Rename also -devel package + +* Sat Aug 19 2017 Zbigniew Jędrzejewski-Szmek - 1.5.3-8 +- Python 2 binary package renamed to python2-blockdiag + See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3 + +* Thu Jul 27 2017 Fedora Release Engineering - 1.5.3-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Sat Feb 11 2017 Fedora Release Engineering - 1.5.3-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Mon Dec 19 2016 Miro Hrončok - 1.5.3-5 +- Rebuild for Python 3.6 + +* Tue Jul 19 2016 Fedora Release Engineering - 1.5.3-4 +- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages + +* Thu Feb 04 2016 Fedora Release Engineering - 1.5.3-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Tue Nov 10 2015 Fedora Release Engineering - 1.5.3-2 +- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5 + +* Thu Aug 20 2015 Haïkel Guémar - 1.5.3-1 +- Upstream 1.5.3 + +* Thu Jun 18 2015 Fedora Release Engineering - 1.3.2-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Sat Jun 07 2014 Fedora Release Engineering - 1.3.2-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Mon May 19 2014 Bohuslav Kabrda - 1.3.2-5 +- Rebuilt for https://fedoraproject.org/wiki/Changes/Python_3.4 + +* Mon Mar 03 2014 Dridi Boukelmoune 1.3.2-4 +- Switched to the source tarball from bitbucket +- Added missing dependencies + +* Sun Feb 16 2014 Dridi Boukelmoune 1.3.2-3 +- Added devel packages needed by other *diag packages + +* Tue Dec 31 2013 Dridi Boukelmoune 1.3.2-2 +- Fixed python => python2 where relevant +- New slightly different summary + +* Sat Dec 28 2013 Dridi Boukelmoune 1.3.2-1 +- Initial spec