]> git.pld-linux.org Git - packages/python3-blockdiag.git/blame - python3-blockdiag.spec
rebuild with tests and docs
[packages/python3-blockdiag.git] / python3-blockdiag.spec
CommitLineData
0a2b7beb
JB
1#
2# Conditional build:
3%bcond_without tests # unit tests
0a2b7beb 4
d3cd6d4a 5%define module blockdiag
2d94327f 6Summary: Blockdiag generate block-diagram image file from spec-text file
0a2b7beb 7Summary(pl.UTF-8): Generowanie obrazków diagramów blokowych z opisu tekstowego
e163e41d
JB
8Name: python3-%{module}
9Version: 2.0.1
be120b86 10Release: 4
2d94327f 11License: Apache v2.0
0a2b7beb
JB
12Group: Libraries/Python
13#Source0Download: https://pypi.org/simple/blockdiag/
14Source0: https://files.pythonhosted.org/packages/source/b/blockdiag/%{module}-%{version}.tar.gz
e163e41d 15# Source0-md5: 89898a6c32636ba2139502bfdb8eff12
d3cd6d4a 16URL: http://blockdiag.com/en/blockdiag/index.html
e163e41d 17BuildRequires: python3-modules >= 1:3.5
0a2b7beb
JB
18BuildRequires: python3-setuptools
19%if %{with tests}
20BuildRequires: python3-ReportLab
21BuildRequires: python3-docutils
22BuildRequires: python3-funcparserlib
23BuildRequires: python3-nose
24BuildRequires: python3-nose_exclude
e163e41d 25BuildRequires: python3-pillow >= 3.0
0a2b7beb 26BuildRequires: python3-webcolors
8124828c 27%endif
0a2b7beb
JB
28BuildRequires: rpmbuild(macros) >= 1.714
29BuildRequires: sed >= 4.0
e163e41d 30Requires: python3-modules >= 1:3.5
d3cd6d4a 31BuildArch: noarch
32BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
33
34%description
0a2b7beb
JB
35blockdiag generates block-diagram image file from spec-text file.
36
37Features:
38- Generate block-diagram from dot like text (basic feature).
39- Multilingualization for node-label (UTF-8 only).
40
41%description -l pl.UTF-8
42blockdiag generuje pliki obrazów diagramów blokowych z tekstowych
43plików opisu.
44
45Funkcje:
46- generowanie diagramów z tekstu w stylu dot (podstawowa funkcja).
47- obsługa wielu języków dla etykiet węzłów (tylko UTF-8).
48
d3cd6d4a 49%prep
489017c6 50%setup -q -n %{module}-%{version}
d3cd6d4a 51
52%build
0a2b7beb
JB
53%py3_build
54
55%if %{with tests}
cead4f04
JB
56# disable tests requiring network: test_command.TestBlockdiagApp.test_app_cleans_up_images, test_generate_diagram.test_generate, test_generate_diagram.ghostscript_not_found_test
57# test_setup_inline_svg_is_true_with_multibytes fails on utf-8 vs latin-1 inconsistency
0a2b7beb 58PYTHONPATH=$(pwd)/src \
cead4f04 59nosetests-%{py3_ver} src/blockdiag/tests -e 'test_app_cleans_up_images|test_generate|ghostscript_not_found_test|test_setup_inline_svg_is_true_with_multibytes'
0a2b7beb 60%endif
0a2b7beb 61
d3cd6d4a 62%install
63rm -rf $RPM_BUILD_ROOT
d3cd6d4a 64
0a2b7beb
JB
65%py3_install
66
67%{__rm} -r $RPM_BUILD_ROOT%{py3_sitescriptdir}/blockdiag/tests
68
69%{__mv} $RPM_BUILD_ROOT%{_bindir}/{blockdiag,blockdiag-3}
70ln -s blockdiag-3 $RPM_BUILD_ROOT%{_bindir}/blockdiag
71install -d $RPM_BUILD_ROOT%{_mandir}/man1
72cp -p blockdiag.1 $RPM_BUILD_ROOT%{_mandir}/man1/blockdiag-3.1
73echo '.so blockdiag-3.1' >$RPM_BUILD_ROOT%{_mandir}/man1/blockdiag.1
f5db40d1 74
d3cd6d4a 75%clean
76rm -rf $RPM_BUILD_ROOT
77
78%files
79%defattr(644,root,root,755)
0a2b7beb 80%doc CHANGES.rst README.rst
0a2b7beb
JB
81%attr(755,root,root) %{_bindir}/blockdiag
82%attr(755,root,root) %{_bindir}/blockdiag-3
83%{py3_sitescriptdir}/blockdiag
84%{py3_sitescriptdir}/blockdiag_sphinxhelper.py
85%{py3_sitescriptdir}/__pycache__/blockdiag_sphinxhelper.cpython-*.py[co]
86%{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info
87%{_mandir}/man1/blockdiag.1*
88%{_mandir}/man1/blockdiag-3.1*
This page took 0.078795 seconds and 4 git commands to generate.