X-Git-Url: http://git.pld-linux.org/?a=blobdiff_plain;ds=sidebyside;f=python-line_profiler.spec;h=1dff5062d263952fc37993e67a19fc54bb7a3124;hb=cd7cf9c22a6f8863701e189dc6089e9e4035056f;hp=1f4068cec80f2a2e6012efde9a36c6a437e9fcaf;hpb=7fc28ce371e74c310c596a1d6b7785c2d5e2f107;p=packages%2Fpython-line_profiler.git diff --git a/python-line_profiler.spec b/python-line_profiler.spec index 1f4068c..1dff506 100644 --- a/python-line_profiler.spec +++ b/python-line_profiler.spec @@ -5,26 +5,31 @@ %bcond_without python2 # CPython 2.x module %bcond_without python3 # CPython 3.x module -%define module line_profiler +%define module line_profiler Summary: module for doing line-by-line profiling of functions Summary(pl.UTF-8): Moduł do optymalizacji linia po linii kodu funkcji # Name must match the python module/package name (as in 'import' statement) Name: python-%{module} -Version: 1.0 -Release: 2 +Version: 2.1 +Release: 4 License: BSD Group: Libraries/Python -Source0: https://pypi.python.org/packages/source/l/%{module}/%{module}-%{version}.tar.gz -# Source0-md5: 2f8352acfedf83f701a564583db5e14d +Source0: https://github.com/rkern/line_profiler/archive/%{version}.tar.gz +# Source0-md5: bd1cb2ba21af02339beab7ddc3a69c66 URL: https://github.com/rkern/line_profiler +BuildRequires: rpmbuild(macros) >= 1.710 BuildRequires: rpm-pythonprov %if %{with python2} +BuildRequires: python-Cython BuildRequires: python-devel BuildRequires: python-distribute +BuildRequires: python-ipython %endif %if %{with python3} +BuildRequires: python3-Cython BuildRequires: python3-devel BuildRequires: python3-distribute +BuildRequires: python3-ipython BuildRequires: python3-modules %endif Requires: python-modules @@ -73,14 +78,14 @@ Dokumentacja API %{module}. %build %if %{with python2} CC="%{__cc}" \ -CFLAGS="%{rpmcppflags} %{rpmcflags}" \ -%{__python} setup.py build --build-base build-2 %{?with_tests:test} +CFLAGS="%{rpmcppflags} %{rpmcflags} -DHAVE_GETTIMEOFDAY" \ +%py_build %{?with_tests:test} %endif %if %{with python3} CC="%{__cc}" \ -CFLAGS="%{rpmcppflags} %{rpmcflags}" \ -%{__python3} setup.py build --build-base build-3 %{?with_tests:test} +CFLAGS="%{rpmcppflags} %{rpmcflags} -DHAVE_GETTIMEOFDAY" \ +%py3_build %{?with_tests:test} %endif %if %{with doc} @@ -93,21 +98,13 @@ rm -rf _build/html/_sources rm -rf $RPM_BUILD_ROOT %if %{with python2} -%{__python} setup.py \ - build --build-base build-2 \ - install --skip-build \ - --optimize=2 \ - --root=$RPM_BUILD_ROOT +%py_install %py_postclean %endif %if %{with python3} -%{__python3} setup.py \ - build --build-base build-3 \ - install --skip-build \ - --optimize=2 \ - --root=$RPM_BUILD_ROOT +%py3_install %endif %clean @@ -132,7 +129,7 @@ rm -rf $RPM_BUILD_ROOT %{py3_sitedir}/kernprof.py %{py3_sitedir}/line_profiler.py %{py3_sitedir}/__pycache__ -%attr(755,root,root) %{py3_sitedir}/_line_profiler.cpython-*m.so +%attr(755,root,root) %{py3_sitedir}/_line_profiler.cpython-*.so %attr(755,root,root) %{_bindir}/kernprof %{py3_sitedir}/%{module}-%{version}-py*.egg-info %endif