]>
Commit | Line | Data |
---|---|---|
0a2b7beb JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without tests # unit tests | |
0a2b7beb | 4 | |
d3cd6d4a | 5 | %define module blockdiag |
2d94327f | 6 | Summary: Blockdiag generate block-diagram image file from spec-text file |
0a2b7beb | 7 | Summary(pl.UTF-8): Generowanie obrazków diagramów blokowych z opisu tekstowego |
e163e41d JB |
8 | Name: python3-%{module} |
9 | Version: 2.0.1 | |
be120b86 | 10 | Release: 4 |
2d94327f | 11 | License: Apache v2.0 |
0a2b7beb JB |
12 | Group: Libraries/Python |
13 | #Source0Download: https://pypi.org/simple/blockdiag/ | |
14 | Source0: https://files.pythonhosted.org/packages/source/b/blockdiag/%{module}-%{version}.tar.gz | |
e163e41d | 15 | # Source0-md5: 89898a6c32636ba2139502bfdb8eff12 |
d3cd6d4a | 16 | URL: http://blockdiag.com/en/blockdiag/index.html |
e163e41d | 17 | BuildRequires: python3-modules >= 1:3.5 |
0a2b7beb JB |
18 | BuildRequires: python3-setuptools |
19 | %if %{with tests} | |
20 | BuildRequires: python3-ReportLab | |
21 | BuildRequires: python3-docutils | |
22 | BuildRequires: python3-funcparserlib | |
23 | BuildRequires: python3-nose | |
24 | BuildRequires: python3-nose_exclude | |
e163e41d | 25 | BuildRequires: python3-pillow >= 3.0 |
0a2b7beb | 26 | BuildRequires: python3-webcolors |
8124828c | 27 | %endif |
0a2b7beb JB |
28 | BuildRequires: rpmbuild(macros) >= 1.714 |
29 | BuildRequires: sed >= 4.0 | |
e163e41d | 30 | Requires: python3-modules >= 1:3.5 |
d3cd6d4a | 31 | BuildArch: noarch |
32 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
33 | ||
34 | %description | |
0a2b7beb JB |
35 | blockdiag generates block-diagram image file from spec-text file. |
36 | ||
37 | Features: | |
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 | |
42 | blockdiag generuje pliki obrazów diagramów blokowych z tekstowych | |
43 | plików opisu. | |
44 | ||
45 | Funkcje: | |
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 | 58 | PYTHONPATH=$(pwd)/src \ |
cead4f04 | 59 | nosetests-%{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 |
63 | rm -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} | |
70 | ln -s blockdiag-3 $RPM_BUILD_ROOT%{_bindir}/blockdiag | |
71 | install -d $RPM_BUILD_ROOT%{_mandir}/man1 | |
72 | cp -p blockdiag.1 $RPM_BUILD_ROOT%{_mandir}/man1/blockdiag-3.1 | |
73 | echo '.so blockdiag-3.1' >$RPM_BUILD_ROOT%{_mandir}/man1/blockdiag.1 | |
f5db40d1 | 74 | |
d3cd6d4a | 75 | %clean |
76 | rm -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* |