From: Jacek Konieczny Date: Wed, 28 Feb 2018 09:03:19 +0000 (+0100) Subject: Updated to version 3.4.0 and for Python 3 X-Git-Tag: auto/th/python-objgraph-3.4.0-1~2 X-Git-Url: http://git.pld-linux.org/gitweb.cgi?p=packages%2Fpython-objgraph.git;a=commitdiff_plain;h=8352fbfdb5778b1ecbb5f10b34e265aaa239489f Updated to version 3.4.0 and for Python 3 --- diff --git a/python-objgraph.spec b/python-objgraph.spec index a492fc4..2fdab26 100644 --- a/python-objgraph.spec +++ b/python-objgraph.spec @@ -1,74 +1,94 @@ # # Conditional build: %bcond_without tests # do not perform "make test" +%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 Name: python-objgraph -Version: 1.7.1 -Release: 2 +Version: 3.4.0 +Release: 1 License: MIT Group: Development/Languages/Python -# http://pypi.python.org/packages/source/o/objgraph/objgraph-1.7.1.tar.gz#md5=f6c501b68239e3063b05ca01041652d0 -Source0: http://pypi.python.org/packages/source/o/%{module}/%{module}-%{version}.tar.gz -# Source0-md5: f6c501b68239e3063b05ca01041652d0 +Source0: https://files.pythonhosted.org/packages/source/o/%{module}/%{module}-%{version}.tar.gz +# Source0-md5: cbe527c7dc095a41458d86cab2059591 URL: http://mg.pov.lt/objgraph/ -BuildRequires: python-devel -BuildRequires: python-distribute BuildRequires: rpm-pythonprov -# remove BR: python-devel for 'noarch' packages. -# if py_postclean is used -BuildRequires: rpmbuild(macros) >= 1.710 -#Requires: python-libs +BuildRequires: rpmbuild(macros) >= 1.714 +%if %{with python2} +BuildRequires: python-setuptools +%endif +%if %{with python3} +BuildRequires: python3-setuptools +%endif Requires: python-modules BuildArch: noarch BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) -%description -Module that lets you visually explore Python object graphs. +# optional dependency +%define _noautoreq pythonegg.graphviz python3egg.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. +Moduł do wizualizacji grafów pythonowych obiektów i debugowania +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 +Group: Development/Languages/Python +Requires: python3-modules + +%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 +wycieków pamięci. %prep %setup -q -n %{module}-%{version} -# fix #!%{_bindir}/env python -> #!%{__python}: -# %{__sed} -i -e '1s,^#!.*python,#!%{__python},' %{name}.py - %build -# CC/CFLAGS is only for arch packages - remove on noarch packages -# CC="%{__cc}" \ -# %py_build +%if %{with python2} +%py_build %{?with_tests:test} +%endif -%{?with_tests:%{__python} setup.py test} +%if %{with python3} +%py3_build %{?with_tests:test} +%endif %install rm -rf $RPM_BUILD_ROOT -%py_install -# install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} -# cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} +%if %{with python2} +%py_install -# change %{py_sitedir} to %{py_sitescriptdir} for 'noarch' packages! -%py_ocomp $RPM_BUILD_ROOT%{py_sitedir} -%py_comp $RPM_BUILD_ROOT%{py_sitedir} %py_postclean +%endif -%clean -rm -rf $RPM_BUILD_ROOT +%if %{with python3} +%py3_install +%endif %files %defattr(644,root,root,755) -# %doc AUTHORS CREDITS ChangeLog NEWS README THANKS TODO -# change %{py_sitedir} to %{py_sitescriptdir} for 'noarch' packages! -# %{py_sitedir}/*.py[co] -%{py_sitescriptdir}/*.py[co] - -# %attr(755,root,root) %{py_sitedir}/*.so -%if "%{py_ver}" > "2.4" -%{py_sitescriptdir}/%{module}-*.egg-info -%endif -# %{_examplesdir}/%{name}-%{version} +%doc CHANGES.rst README.rst docs +%{py_sitescriptdir}/%{module}.py* +%{py_sitescriptdir}/%{module}-%{version}-py*.egg-info + +%files -n python3-%{module} +%defattr(644,root,root,755) +%doc CHANGES.rst README.rst docs +%{py3_sitescriptdir}/%{module}.py +%{py3_sitescriptdir}/__pycache__/%{module}.* +%{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info + +%clean +rm -rf $RPM_BUILD_ROOT