[packages/python-objgraph] - updated to 3.4.1 - added mock patch (use unittest.mock if available to avoid python3-mock dependen
qboosh
qboosh at pld-linux.org
Thu Jan 2 05:43:36 CET 2020
commit b9af2bb53a94f82a36c5b8aa481f0a1916145c07
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Thu Jan 2 05:43:27 2020 +0100
- updated to 3.4.1
- added mock patch (use unittest.mock if available to avoid python3-mock dependency)
- added apidocs
python-objgraph-mock.patch | 10 ++++++
python-objgraph.spec | 83 ++++++++++++++++++++++++++++++++++++----------
2 files changed, 75 insertions(+), 18 deletions(-)
---
diff --git a/python-objgraph.spec b/python-objgraph.spec
index 72b70c7..627b882 100644
--- a/python-objgraph.spec
+++ b/python-objgraph.spec
@@ -1,70 +1,107 @@
#
# Conditional build:
-%bcond_with tests # do perform "make test"
+%bcond_without doc # Sphinx documentation
+%bcond_without tests # unit tests
%bcond_without python2 # CPython 2.x module
%bcond_without python3 # CPython 3.x module
%define module objgraph
Summary: Draws Python object reference graphs with graphviz
-Summary(pl.UTF-8): Rysuje referencje pomiedzy obiektamiy przy uzyciu graphviz
+Summary(pl.UTF-8): Rysowanie referencji między obiektami przy uzyciu graphviza
Name: python-objgraph
-Version: 3.4.0
-Release: 3
+Version: 3.4.1
+Release: 1
License: MIT
Group: Development/Languages/Python
-Source0: https://files.pythonhosted.org/packages/source/o/%{module}/%{module}-%{version}.tar.gz
-# Source0-md5: cbe527c7dc095a41458d86cab2059591
+#Source0Download: https://pypi.org/simple/objgraph/
+Source0: https://files.pythonhosted.org/packages/source/o/objgraph/%{module}-%{version}.tar.gz
+# Source0-md5: 4f416da377b3c7799799c357c6f0c2ed
+Patch0: %{name}-mock.patch
URL: http://mg.pov.lt/objgraph/
BuildRequires: rpm-pythonprov
BuildRequires: rpmbuild(macros) >= 1.714
%if %{with python2}
+BuildRequires: python-modules >= 1:2.7
BuildRequires: python-setuptools
+%if %{with tests}
+BuildRequires: python-graphviz
+BuildRequires: python-mock
+%endif
%endif
%if %{with python3}
+BuildRequires: python3-modules >= 1:3.5
BuildRequires: python3-setuptools
+%if %{with tests}
+BuildRequires: python3-graphviz
+%endif
%endif
%if %{with tests}
BuildRequires: graphviz
%endif
-Requires: python-modules
+Requires: python-modules >= 1:2.7
BuildArch: noarch
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
# optional dependency
-%define _noautoreq pythonegg.graphviz python3egg.graphviz
+%define _noautoreq_pyegg graphviz
+%define _noautoreq_py3egg graphviz
%description
Module that lets you visually explore Python object graphs and debug
memory leaks.
%description -l pl.UTF-8
-Moduł do wizualizacji grafów pythonowych obiektów i debugowania
+Moduł do wizualizacji grafów pythonowych obiektów i diagnozowania
wycieków pamięci.
%package -n python3-%{module}
Summary: Draws Python object reference graphs with graphviz
-Summary(pl.UTF-8): Rysuje referencje pomiedzy obiektamiy przy uzyciu graphviz
+Summary(pl.UTF-8): Rysowanie referencji między obiektami przy uzyciu graphviza
Group: Development/Languages/Python
-Requires: python3-modules
+Requires: python3-modules >= 1:3.5
%description -n python3-%{module}
Module that lets you visually explore Python object graphs and debug
memory leaks.
%description -n python3-%{module} -l pl.UTF-8
-Moduł do wizualizacji grafów pythonowych obiektów i debugowania
+Moduł do wizualizacji grafów pythonowych obiektów i diagnozowania
wycieków pamięci.
+%package apidocs
+Summary: API documentation for Python objgraph module
+Summary(pl.UTF-8): Dokumentacja API modułu Pythona objgraph
+Group: Documentation
+
+%description apidocs
+API documentation for Python objgraph module.
+
+%description apidocs -l pl.UTF-8
+Dokumentacja API modułu Pythona objgraph.
+
%prep
%setup -q -n %{module}-%{version}
+%patch0 -p1
%build
%if %{with python2}
-%py_build %{?with_tests:test}
+%py_build
+
+%if %{with tests}
+%{__python} tests.py
+%endif
%endif
%if %{with python3}
-%py3_build %{?with_tests:test}
+%py3_build
+
+%if %{with tests}
+%{__python3} tests.py
+%endif
+%endif
+
+%if %{with doc}
+sphinx-build-2 -b html docs docs/_build/html
%endif
%install
@@ -80,18 +117,28 @@ rm -rf $RPM_BUILD_ROOT
%py3_install
%endif
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%if %{with python2}
%files
%defattr(644,root,root,755)
-%doc CHANGES.rst README.rst docs
+%doc CHANGES.rst LICENSE README.rst
%{py_sitescriptdir}/%{module}.py*
%{py_sitescriptdir}/%{module}-%{version}-py*.egg-info
+%endif
+%if %{with python3}
%files -n python3-%{module}
%defattr(644,root,root,755)
-%doc CHANGES.rst README.rst docs
+%doc CHANGES.rst LICENSE README.rst
%{py3_sitescriptdir}/%{module}.py
%{py3_sitescriptdir}/__pycache__/%{module}.*
%{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info
+%endif
-%clean
-rm -rf $RPM_BUILD_ROOT
+%if %{with doc}
+%files apidocs
+%defattr(644,root,root,755)
+%doc docs/_build/html/{_images,_static,*.html,*.js}
+%endif
diff --git a/python-objgraph-mock.patch b/python-objgraph-mock.patch
new file mode 100644
index 0000000..8c8e61c
--- /dev/null
+++ b/python-objgraph-mock.patch
@@ -0,0 +1,10 @@
+--- objgraph-3.4.0/setup.py.orig 2017-12-20 10:04:47.000000000 +0100
++++ objgraph-3.4.0/setup.py 2018-07-30 20:37:39.188194635 +0200
+@@ -85,7 +85,6 @@
+ install_requires=[
+ 'graphviz', # just for ipython support currently
+ ],
+- tests_require=['mock'],
+ test_suite='tests.test_suite',
+ zip_safe=True,
+ )
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/python-objgraph.git/commitdiff/b9af2bb53a94f82a36c5b8aa481f0a1916145c07
More information about the pld-cvs-commit
mailing list