]> git.pld-linux.org Git - packages/python-objgraph.git/commitdiff
- updated to 3.4.1 auto/th/python-objgraph-3.4.1-1
authorJakub Bogusz <qboosh@pld-linux.org>
Thu, 2 Jan 2020 04:43:27 +0000 (05:43 +0100)
committerJakub Bogusz <qboosh@pld-linux.org>
Thu, 2 Jan 2020 04:43:27 +0000 (05:43 +0100)
- added mock patch (use unittest.mock if available to avoid python3-mock dependency)
- added apidocs

python-objgraph-mock.patch [new file with mode: 0644]
python-objgraph.spec

diff --git a/python-objgraph-mock.patch b/python-objgraph-mock.patch
new file mode 100644 (file)
index 0000000..8c8e61c
--- /dev/null
@@ -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,
+ )
index 72b70c70d7bcfc3630949a158425bd2b83b52508..627b882d0a3d53505b148921b9f7874a5e1283b8 100644 (file)
 #
 # 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
This page took 0.184558 seconds and 4 git commands to generate.