3 %bcond_with tests # do perform "make test"
4 %bcond_without python2 # CPython 2.x module
5 %bcond_without python3 # CPython 3.x module
7 %define module objgraph
8 Summary: Draws Python object reference graphs with graphviz
9 Summary(pl.UTF-8): Rysuje referencje pomiedzy obiektamiy przy uzyciu graphviz
14 Group: Development/Languages/Python
15 Source0: https://files.pythonhosted.org/packages/source/o/%{module}/%{module}-%{version}.tar.gz
16 # Source0-md5: cbe527c7dc095a41458d86cab2059591
17 URL: http://mg.pov.lt/objgraph/
18 BuildRequires: rpm-pythonprov
19 BuildRequires: rpmbuild(macros) >= 1.714
21 BuildRequires: python-setuptools
24 BuildRequires: python3-setuptools
27 BuildRequires: graphviz
29 Requires: python-modules
31 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
34 %define _noautoreq pythonegg.graphviz python3egg.graphviz
37 Module that lets you visually explore Python object graphs and debug
40 %description -l pl.UTF-8
41 Moduł do wizualizacji grafów pythonowych obiektów i debugowania
44 %package -n python3-%{module}
45 Summary: Draws Python object reference graphs with graphviz
46 Summary(pl.UTF-8): Rysuje referencje pomiedzy obiektamiy przy uzyciu graphviz
47 Group: Development/Languages/Python
48 Requires: python3-modules
50 %description -n python3-%{module}
51 Module that lets you visually explore Python object graphs and debug
54 %description -n python3-%{module} -l pl.UTF-8
55 Moduł do wizualizacji grafów pythonowych obiektów i debugowania
59 %setup -q -n %{module}-%{version}
63 %py_build %{?with_tests:test}
67 %py3_build %{?with_tests:test}
71 rm -rf $RPM_BUILD_ROOT
84 %defattr(644,root,root,755)
85 %doc CHANGES.rst README.rst docs
86 %{py_sitescriptdir}/%{module}.py*
87 %{py_sitescriptdir}/%{module}-%{version}-py*.egg-info
89 %files -n python3-%{module}
90 %defattr(644,root,root,755)
91 %doc CHANGES.rst README.rst docs
92 %{py3_sitescriptdir}/%{module}.py
93 %{py3_sitescriptdir}/__pycache__/%{module}.*
94 %{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info
97 rm -rf $RPM_BUILD_ROOT