]> git.pld-linux.org Git - packages/python-objgraph.git/blame - python-objgraph.spec
- release 4 (by relup.sh)
[packages/python-objgraph.git] / python-objgraph.spec
CommitLineData
23d84bf7
MK
1#
2# Conditional build:
b9af2bb5
JB
3%bcond_without doc # Sphinx documentation
4%bcond_without tests # unit tests
8352fbfd
JK
5%bcond_without python2 # CPython 2.x module
6%bcond_without python3 # CPython 3.x module
23d84bf7
MK
7
8%define module objgraph
9Summary: Draws Python object reference graphs with graphviz
b9af2bb5 10Summary(pl.UTF-8): Rysowanie referencji między obiektami przy uzyciu graphviza
23d84bf7 11Name: python-objgraph
b9af2bb5 12Version: 3.4.1
4ed168c8 13Release: 4
23d84bf7
MK
14License: MIT
15Group: Development/Languages/Python
b9af2bb5
JB
16#Source0Download: https://pypi.org/simple/objgraph/
17Source0: https://files.pythonhosted.org/packages/source/o/objgraph/%{module}-%{version}.tar.gz
18# Source0-md5: 4f416da377b3c7799799c357c6f0c2ed
19Patch0: %{name}-mock.patch
23d84bf7 20URL: http://mg.pov.lt/objgraph/
23d84bf7 21BuildRequires: rpm-pythonprov
8352fbfd
JK
22BuildRequires: rpmbuild(macros) >= 1.714
23%if %{with python2}
b9af2bb5 24BuildRequires: python-modules >= 1:2.7
8352fbfd 25BuildRequires: python-setuptools
b9af2bb5
JB
26%if %{with tests}
27BuildRequires: python-graphviz
28BuildRequires: python-mock
29%endif
8352fbfd
JK
30%endif
31%if %{with python3}
b9af2bb5 32BuildRequires: python3-modules >= 1:3.5
8352fbfd 33BuildRequires: python3-setuptools
b9af2bb5
JB
34%if %{with tests}
35BuildRequires: python3-graphviz
36%endif
8352fbfd 37%endif
8ea9379e
JK
38%if %{with tests}
39BuildRequires: graphviz
40%endif
b9af2bb5 41Requires: python-modules >= 1:2.7
23d84bf7
MK
42BuildArch: noarch
43BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
44
8352fbfd 45# optional dependency
b9af2bb5
JB
46%define _noautoreq_pyegg graphviz
47%define _noautoreq_py3egg graphviz
23d84bf7 48
8352fbfd
JK
49%description
50Module that lets you visually explore Python object graphs and debug
51memory leaks.
23d84bf7
MK
52
53%description -l pl.UTF-8
b9af2bb5 54Moduł do wizualizacji grafów pythonowych obiektów i diagnozowania
8352fbfd
JK
55wycieków pamięci.
56
57%package -n python3-%{module}
58Summary: Draws Python object reference graphs with graphviz
b9af2bb5 59Summary(pl.UTF-8): Rysowanie referencji między obiektami przy uzyciu graphviza
8352fbfd 60Group: Development/Languages/Python
b9af2bb5 61Requires: python3-modules >= 1:3.5
8352fbfd
JK
62
63%description -n python3-%{module}
64Module that lets you visually explore Python object graphs and debug
65memory leaks.
66
67%description -n python3-%{module} -l pl.UTF-8
b9af2bb5 68Moduł do wizualizacji grafów pythonowych obiektów i diagnozowania
8352fbfd 69wycieków pamięci.
23d84bf7 70
b9af2bb5
JB
71%package apidocs
72Summary: API documentation for Python objgraph module
73Summary(pl.UTF-8): Dokumentacja API modułu Pythona objgraph
74Group: Documentation
75
76%description apidocs
77API documentation for Python objgraph module.
78
79%description apidocs -l pl.UTF-8
80Dokumentacja API modułu Pythona objgraph.
81
23d84bf7
MK
82%prep
83%setup -q -n %{module}-%{version}
b9af2bb5 84%patch0 -p1
23d84bf7 85
23d84bf7 86%build
8352fbfd 87%if %{with python2}
b9af2bb5
JB
88%py_build
89
90%if %{with tests}
91%{__python} tests.py
92%endif
8352fbfd 93%endif
23d84bf7 94
8352fbfd 95%if %{with python3}
b9af2bb5
JB
96%py3_build
97
98%if %{with tests}
99%{__python3} tests.py
100%endif
101%endif
102
103%if %{with doc}
104sphinx-build-2 -b html docs docs/_build/html
8352fbfd 105%endif
23d84bf7
MK
106
107%install
108rm -rf $RPM_BUILD_ROOT
23d84bf7 109
8352fbfd
JK
110%if %{with python2}
111%py_install
23d84bf7 112
23d84bf7 113%py_postclean
8352fbfd 114%endif
23d84bf7 115
8352fbfd
JK
116%if %{with python3}
117%py3_install
118%endif
23d84bf7 119
b9af2bb5
JB
120%clean
121rm -rf $RPM_BUILD_ROOT
122
123%if %{with python2}
23d84bf7
MK
124%files
125%defattr(644,root,root,755)
b9af2bb5 126%doc CHANGES.rst LICENSE README.rst
8352fbfd
JK
127%{py_sitescriptdir}/%{module}.py*
128%{py_sitescriptdir}/%{module}-%{version}-py*.egg-info
b9af2bb5 129%endif
8352fbfd 130
b9af2bb5 131%if %{with python3}
8352fbfd
JK
132%files -n python3-%{module}
133%defattr(644,root,root,755)
b9af2bb5 134%doc CHANGES.rst LICENSE README.rst
8352fbfd
JK
135%{py3_sitescriptdir}/%{module}.py
136%{py3_sitescriptdir}/__pycache__/%{module}.*
137%{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info
b9af2bb5 138%endif
8352fbfd 139
b9af2bb5
JB
140%if %{with doc}
141%files apidocs
142%defattr(644,root,root,755)
143%doc docs/_build/html/{_images,_static,*.html,*.js}
144%endif
This page took 0.118167 seconds and 4 git commands to generate.