3 %bcond_without doc # Sphinx documentation
4 %bcond_without tests # unit tests
5 %bcond_without python2 # CPython 2.x module
6 %bcond_without python3 # CPython 3.x module
8 %define module objgraph
9 Summary: Draws Python object reference graphs with graphviz
10 Summary(pl.UTF-8): Rysowanie referencji między obiektami przy uzyciu graphviza
15 Group: Development/Languages/Python
16 #Source0Download: https://pypi.org/simple/objgraph/
17 Source0: https://files.pythonhosted.org/packages/source/o/objgraph/%{module}-%{version}.tar.gz
18 # Source0-md5: 4f416da377b3c7799799c357c6f0c2ed
19 Patch0: %{name}-mock.patch
20 URL: http://mg.pov.lt/objgraph/
21 BuildRequires: rpm-pythonprov
22 BuildRequires: rpmbuild(macros) >= 1.714
24 BuildRequires: python-modules >= 1:2.7
25 BuildRequires: python-setuptools
27 BuildRequires: python-graphviz
28 BuildRequires: python-mock
32 BuildRequires: python3-modules >= 1:3.5
33 BuildRequires: python3-setuptools
35 BuildRequires: python3-graphviz
39 BuildRequires: graphviz
41 Requires: python-modules >= 1:2.7
43 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
46 %define _noautoreq_pyegg graphviz
47 %define _noautoreq_py3egg graphviz
50 Module that lets you visually explore Python object graphs and debug
53 %description -l pl.UTF-8
54 Moduł do wizualizacji grafów pythonowych obiektów i diagnozowania
57 %package -n python3-%{module}
58 Summary: Draws Python object reference graphs with graphviz
59 Summary(pl.UTF-8): Rysowanie referencji między obiektami przy uzyciu graphviza
60 Group: Development/Languages/Python
61 Requires: python3-modules >= 1:3.5
63 %description -n python3-%{module}
64 Module that lets you visually explore Python object graphs and debug
67 %description -n python3-%{module} -l pl.UTF-8
68 Moduł do wizualizacji grafów pythonowych obiektów i diagnozowania
72 Summary: API documentation for Python objgraph module
73 Summary(pl.UTF-8): Dokumentacja API modułu Pythona objgraph
77 API documentation for Python objgraph module.
79 %description apidocs -l pl.UTF-8
80 Dokumentacja API modułu Pythona objgraph.
83 %setup -q -n %{module}-%{version}
104 sphinx-build-2 -b html docs docs/_build/html
108 rm -rf $RPM_BUILD_ROOT
121 rm -rf $RPM_BUILD_ROOT
125 %defattr(644,root,root,755)
126 %doc CHANGES.rst LICENSE README.rst
127 %{py_sitescriptdir}/%{module}.py*
128 %{py_sitescriptdir}/%{module}-%{version}-py*.egg-info
132 %files -n python3-%{module}
133 %defattr(644,root,root,755)
134 %doc CHANGES.rst LICENSE README.rst
135 %{py3_sitescriptdir}/%{module}.py
136 %{py3_sitescriptdir}/__pycache__/%{module}.*
137 %{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info
142 %defattr(644,root,root,755)
143 %doc docs/_build/html/{_images,_static,*.html,*.js}