]>
Commit | Line | Data |
---|---|---|
3733a74c | 1 | # NOTE: for versions >= 2.0 (for python 3.5+) see python3-sphinxcontrib-blockdiag.spec |
78fec9ce JB |
2 | # |
3 | # Conditional build: | |
4 | %bcond_with tests # unit tests (missing data) | |
5 | %bcond_without python2 # CPython 2.x module | |
3733a74c | 6 | %bcond_with python3 # CPython 3.x module (built from python3-sphinxcontrib-blockdiag.spec) |
78fec9ce JB |
7 | |
8 | Summary: Sphinx "blockdiag" extension | |
9 | Summary(pl.UTF-8): Rozszerzenie "blockdiag" dla Sphinksa | |
10 | Name: python-sphinxcontrib-blockdiag | |
3733a74c | 11 | # keep 1.x here for python2 support |
78fec9ce | 12 | Version: 1.5.5 |
564c7912 | 13 | Release: 2 |
78fec9ce JB |
14 | License: BSD |
15 | Group: Libraries/Python | |
16 | #Source0Download: https://pypi.org/simple/sphinxcontrib-blockdiag/ | |
17 | Source0: https://files.pythonhosted.org/packages/source/s/sphinxcontrib-blockdiag/sphinxcontrib-blockdiag-%{version}.tar.gz | |
18 | # Source0-md5: a867f4f392d2c47816b958bfba034c6e | |
19 | URL: https://pypi.org/project/sphinxcontrib-blockdiag/ | |
20 | %if %{with python2} | |
21 | BuildRequires: python-modules >= 1:2.6 | |
22 | BuildRequires: python-setuptools | |
23 | %if %{with tests} | |
24 | BuildRequires: python-Sphinx >= 0.6 | |
25 | BuildRequires: python-blockdiag >= 1.5.0 | |
26 | BuildRequires: python-mock | |
27 | BuildRequires: python-sphinx_testing | |
28 | %if "%{py_ver}" < "2.7" | |
29 | BuildRequires: python-unittest2 | |
30 | %endif | |
31 | %endif | |
32 | %endif | |
33 | %if %{with python3} | |
34 | BuildRequires: python3-modules >= 1:3.2 | |
35 | BuildRequires: python3-setuptools | |
36 | %if %{with tests} | |
37 | BuildRequires: python3-Sphinx >= 0.6 | |
38 | BuildRequires: python3-blockdiag >= 1.5.0 | |
39 | BuildRequires: python3-sphinx_testing | |
40 | %endif | |
41 | %endif | |
42 | BuildRequires: rpm-pythonprov | |
43 | BuildRequires: rpmbuild(macros) >= 1.714 | |
44 | Requires: python-modules >= 1:2.6 | |
45 | Requires: python-sphinxcontrib | |
46 | BuildArch: noarch | |
47 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
48 | ||
49 | %description | |
50 | A Sphinx extension for embedding block diagram using blockdiag module. | |
51 | ||
52 | %description -l pl.UTF-8 | |
53 | Rozszerzenie Sphinksa do osadzania diagramów blokowych przy użyciu | |
54 | modułu blockdiag. | |
55 | ||
56 | %package -n python3-sphinxcontrib-blockdiag | |
57 | Summary: Sphinx "blockdiag" extension | |
58 | Summary(pl.UTF-8): Rozszerzenie "blockdiag" dla Sphinksa | |
59 | Group: Libraries/Python | |
60 | Requires: python3-modules >= 1:3.2 | |
61 | Requires: python3-sphinxcontrib | |
62 | ||
63 | %description -n python3-sphinxcontrib-blockdiag | |
64 | A Sphinx extension for embedding block diagram using blockdiag module. | |
65 | ||
66 | %description -n python3-sphinxcontrib-blockdiag -l pl.UTF-8 | |
67 | Rozszerzenie Sphinksa do osadzania diagramów blokowych przy użyciu | |
68 | modułu blockdiag. | |
69 | ||
70 | %prep | |
71 | %setup -q -n sphinxcontrib-blockdiag-%{version} | |
72 | ||
73 | %build | |
74 | %if %{with python2} | |
75 | %py_build | |
76 | ||
77 | %if %{with tests} | |
78 | %{__python} -m unittest discover -s tests | |
79 | %endif | |
80 | %endif | |
81 | ||
82 | %if %{with python3} | |
83 | %py3_build | |
84 | ||
85 | %if %{with tests} | |
86 | %{__python3} -m unittest discover -s tests | |
87 | %endif | |
88 | %endif | |
89 | ||
90 | %install | |
91 | rm -rf $RPM_BUILD_ROOT | |
92 | ||
93 | %if %{with python2} | |
94 | %py_install | |
95 | ||
96 | %py_postclean | |
97 | %endif | |
98 | ||
99 | %if %{with python3} | |
100 | %py3_install | |
101 | %endif | |
102 | ||
103 | %clean | |
104 | rm -rf $RPM_BUILD_ROOT | |
105 | ||
106 | %if %{with python2} | |
107 | %files | |
108 | %defattr(644,root,root,755) | |
109 | %doc AUTHORS LICENSE README.rst | |
110 | %{py_sitescriptdir}/sphinxcontrib/blockdiag.py[co] | |
111 | %{py_sitescriptdir}/sphinxcontrib_blockdiag-%{version}-py*.egg-info | |
112 | %{py_sitescriptdir}/sphinxcontrib_blockdiag-%{version}-py*-nspkg.pth | |
113 | %endif | |
114 | ||
115 | %if %{with python3} | |
116 | %files -n python3-sphinxcontrib-blockdiag | |
117 | %defattr(644,root,root,755) | |
118 | %doc AUTHORS LICENSE README.rst | |
119 | %{py3_sitescriptdir}/sphinxcontrib/blockdiag.py | |
120 | %{py3_sitescriptdir}/sphinxcontrib/__pycache__/blockdiag.cpython-*.py[co] | |
121 | %{py3_sitescriptdir}/sphinxcontrib_blockdiag-%{version}-py*.egg-info | |
122 | %{py3_sitescriptdir}/sphinxcontrib_blockdiag-%{version}-py*-nspkg.pth | |
123 | %endif |