[packages/python3-blockdiag] - updated to 2.0.1 (python 3.5+) as python3-blockdiag.spec - removed outdated tests patch
qboosh
qboosh at pld-linux.org
Sat Feb 6 15:32:59 CET 2021
commit e163e41da98f77f389e604891593a7d5b2f32176
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Sat Feb 6 15:33:24 2021 +0100
- updated to 2.0.1 (python 3.5+) as python3-blockdiag.spec
- removed outdated tests patch
python-blockdiag-tests.patch | 17 -----
python-blockdiag.spec => python3-blockdiag.spec | 94 ++-----------------------
2 files changed, 6 insertions(+), 105 deletions(-)
---
diff --git a/python-blockdiag.spec b/python3-blockdiag.spec
similarity index 51%
rename from python-blockdiag.spec
rename to python3-blockdiag.spec
index 0134f0b..57b63be 100644
--- a/python-blockdiag.spec
+++ b/python3-blockdiag.spec
@@ -1,41 +1,20 @@
#
# Conditional build:
%bcond_without tests # unit tests
-%bcond_without python2 # CPython 2.x module
-%bcond_without python3 # CPython 3.x module
%define module blockdiag
Summary: Blockdiag generate block-diagram image file from spec-text file
Summary(pl.UTF-8): Generowanie obrazków diagramów blokowych z opisu tekstowego
-Name: python-%{module}
-# keep 1.x here for python2 support
-Version: 1.5.4
+Name: python3-%{module}
+Version: 2.0.1
Release: 1
License: Apache v2.0
Group: Libraries/Python
#Source0Download: https://pypi.org/simple/blockdiag/
Source0: https://files.pythonhosted.org/packages/source/b/blockdiag/%{module}-%{version}.tar.gz
-# Source0-md5: 2de59ac957224c4f92ea3072aa1221bf
-Patch0: %{name}-tests.patch
+# Source0-md5: 89898a6c32636ba2139502bfdb8eff12
URL: http://blockdiag.com/en/blockdiag/index.html
-%if %{with python2}
-BuildRequires: python-modules >= 1:2.6
-BuildRequires: python-setuptools
-%if %{with tests}
-BuildRequires: python-ReportLab
-BuildRequires: python-docutils
-BuildRequires: python-funcparserlib
-BuildRequires: python-nose
-BuildRequires: python-pillow
-BuildRequires: python-webcolors
-%if "%{py_ver}" < "2.7"
-BuildRequires: python-ordereddict
-BuildRequires: python-unittest2
-%endif
-%endif
-%endif
-%if %{with python3}
-BuildRequires: python3-modules >= 1:3.2
+BuildRequires: python3-modules >= 1:3.5
BuildRequires: python3-setuptools
%if %{with tests}
BuildRequires: python3-ReportLab
@@ -43,13 +22,12 @@ BuildRequires: python3-docutils
BuildRequires: python3-funcparserlib
BuildRequires: python3-nose
BuildRequires: python3-nose_exclude
-BuildRequires: python3-pillow
+BuildRequires: python3-pillow >= 3.0
BuildRequires: python3-webcolors
%endif
-%endif
BuildRequires: rpmbuild(macros) >= 1.714
BuildRequires: sed >= 4.0
-Requires: python-modules >= 1:2.6
+Requires: python3-modules >= 1:3.5
BuildArch: noarch
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -68,42 +46,10 @@ Funkcje:
- generowanie diagramów z tekstu w stylu dot (podstawowa funkcja).
- obsługa wielu języków dla etykiet węzłów (tylko UTF-8).
-%package -n python3-%{module}
-Summary: Blockdiag generate block-diagram image file from spec-text file
-Summary(pl.UTF-8): Generowanie obrazków diagramów blokowych z opisu tekstowego
-Group: Libraries/Python
-Requires: python3-modules >= 1:3.2
-
-%description -n python3-%{module}
-blockdiag generates block-diagram image file from spec-text file.
-
-Features:
-- Generate block-diagram from dot like text (basic feature).
-- Multilingualization for node-label (utf-8 only).
-
-%description -n python3-%{module} -l pl.UTF-8
-blockdiag generuje pliki obrazów diagramów blokowych z tekstowych
-plików opisu.
-
-Funkcje:
-- generowanie diagramów z tekstu w stylu dot (podstawowa funkcja).
-- obsługa wielu języków dla etykiet węzłów (tylko UTF-8).
-
%prep
%setup -q -n %{module}-%{version}
-%patch0 -p1
%build
-%if %{with python2}
-%py_build
-
-%if %{with tests}
-PYTHONPATH=$(pwd)/src \
-nosetests-%{py_ver} src/blockdiag/tests
-%endif
-%endif
-
-%if %{with python3}
%py3_build
%if %{with tests}
@@ -111,24 +57,10 @@ nosetests-%{py_ver} src/blockdiag/tests
PYTHONPATH=$(pwd)/src \
nosetests-%{py3_ver} src/blockdiag/tests -e test_setup_inline_svg_is_true_with_multibytes
%endif
-%endif
%install
rm -rf $RPM_BUILD_ROOT
-%if %{with python2}
-%py_install
-
-%{__rm} -r $RPM_BUILD_ROOT%{py_sitescriptdir}/blockdiag/tests
-
-%{__mv} $RPM_BUILD_ROOT%{_bindir}/{blockdiag,blockdiag-2}
-install -d $RPM_BUILD_ROOT%{_mandir}/man1
-cp -p blockdiag.1 $RPM_BUILD_ROOT%{_mandir}/man1/blockdiag-2.1
-
-%py_postclean
-%endif
-
-%if %{with python3}
%py3_install
%{__rm} -r $RPM_BUILD_ROOT%{py3_sitescriptdir}/blockdiag/tests
@@ -138,26 +70,13 @@ ln -s blockdiag-3 $RPM_BUILD_ROOT%{_bindir}/blockdiag
install -d $RPM_BUILD_ROOT%{_mandir}/man1
cp -p blockdiag.1 $RPM_BUILD_ROOT%{_mandir}/man1/blockdiag-3.1
echo '.so blockdiag-3.1' >$RPM_BUILD_ROOT%{_mandir}/man1/blockdiag.1
-%endif
%clean
rm -rf $RPM_BUILD_ROOT
-%if %{with python2}
%files
%defattr(644,root,root,755)
%doc CHANGES.rst README.rst
-%attr(755,root,root) %{_bindir}/blockdiag-2
-%{py_sitescriptdir}/blockdiag
-%{py_sitescriptdir}/blockdiag_sphinxhelper.py[co]
-%{py_sitescriptdir}/%{module}-%{version}-*.egg-info
-%{_mandir}/man1/blockdiag-2.1*
-%endif
-
-%if %{with python3}
-%files -n python3-%{module}
-%defattr(644,root,root,755)
-%doc CHANGES.rst README.rst
%attr(755,root,root) %{_bindir}/blockdiag
%attr(755,root,root) %{_bindir}/blockdiag-3
%{py3_sitescriptdir}/blockdiag
@@ -166,4 +85,3 @@ rm -rf $RPM_BUILD_ROOT
%{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info
%{_mandir}/man1/blockdiag.1*
%{_mandir}/man1/blockdiag-3.1*
-%endif
diff --git a/python-blockdiag-tests.patch b/python-blockdiag-tests.patch
deleted file mode 100644
index d4d9e3a..0000000
--- a/python-blockdiag-tests.patch
+++ /dev/null
@@ -1,17 +0,0 @@
---- blockdiag-1.5.4/src/blockdiag/tests/test_utils_fontmap.py.orig 2018-07-22 13:48:38.000000000 +0200
-+++ blockdiag-1.5.4/src/blockdiag/tests/test_utils_fontmap.py 2021-02-06 12:31:08.863287467 +0100
-@@ -223,7 +223,13 @@
- _config = u("[fontmap]\nsansserif: %s\nsansserif: %s\n") % \
- (self.fontpath[0], self.fontpath[1])
- config = StringIO(_config)
-- if sys.version_info[0] == 2:
-+ has_configparser = False
-+ try:
-+ import configparser
-+ has_configparser = True
-+ except ImportError:
-+ pass
-+ if (sys.version_info[0] == 2) and not has_configparser:
- fmap = FontMap(config)
-
- font1 = fmap.find()
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/python3-blockdiag.git/commitdiff/e163e41da98f77f389e604891593a7d5b2f32176
More information about the pld-cvs-commit
mailing list