bd3d62
%global pkgname line_profiler
bd3d62
bd3d62
Name:           python-%{pkgname}
5be46a
Version:        2.1
a8edf3
Release:        5%{?dist}
bd3d62
Summary:        Line-by-line profiler for python
bd3d62
bd3d62
License:        BSD and Python
Igor Gnatenko 682d20
URL:            https://github.com/rkern/line_profiler
Igor Gnatenko 682d20
Source0:        %{url}/archive/%{version}/%{pkgname}-%{version}.tar.gz
bd3d62
5be46a
# Support for Python 3.7:
5be46a
# https://github.com/rkern/line_profiler/issues/129
5be46a
Patch0:         pep479.patch
5be46a
Igor Gnatenko 682d20
BuildRequires:  gcc
Igor Gnatenko 682d20
Igor Gnatenko 682d20
%global _description \
Igor Gnatenko 682d20
line_profiler is a module for doing line-by-line profiling of functions.\
Igor Gnatenko 682d20
kernprof is a convenient script for running either line_profiler or\
Igor Gnatenko 682d20
the Python standard library's cProfile or profile modules,\
bd3d62
depending on what is available.
bd3d62
Igor Gnatenko 682d20
%description %{_description}
Igor Gnatenko 682d20
bd3d62
%package -n     python3-%{pkgname}
Igor Gnatenko 682d20
Summary:        %{summary}
Igor Gnatenko 682d20
%{?python_provide:%python_provide python3-%{pkgname}}
bd3d62
BuildRequires:  python3-devel
bd3d62
BuildRequires:  python3-setuptools
Igor Gnatenko 682d20
BuildRequires:  python3-Cython
Igor Gnatenko 682d20
BuildRequires:  python3-ipython-console
Igor Gnatenko 682d20
Requires:       python3-ipython-console
648ac5
Conflicts:      python2-%{pkgname} < 2.1-2
bd3d62
Igor Gnatenko 682d20
%description -n python3-%{pkgname} %{_description}
bd3d62
Igor Gnatenko 682d20
Python 3 version.
bd3d62
Igor Gnatenko 682d20
%prep
5be46a
%autosetup -p1 -n %{pkgname}-%{version}
Igor Gnatenko 682d20
sed -i -e '1{\@^#!/usr/bin/env python@d}' %{pkgname}.py kernprof.py
bd3d62
bd3d62
%build
Igor Gnatenko 682d20
%py3_build
bd3d62
bd3d62
%install
Igor Gnatenko 682d20
%py3_install
648ac5
bd3d62
bd3d62
%check
bd3d62
PYTHONPATH=%{buildroot}%{python3_sitearch} %{__python3} -m unittest discover -s tests -v
bd3d62
bd3d62
%files -n python3-%{pkgname}
Igor Gnatenko 682d20
%license LICENSE.txt LICENSE_Python.txt
Igor Gnatenko 682d20
%doc README.rst
Igor Gnatenko 682d20
%{python3_sitearch}/%{pkgname}-*.egg-info/
Igor Gnatenko 682d20
%{python3_sitearch}/_%{pkgname}.*.so
Igor Gnatenko 682d20
%{python3_sitearch}/%{pkgname}.py
5be46a
%{python3_sitearch}/%{pkgname}_py35.py
Igor Gnatenko 682d20
%{python3_sitearch}/__pycache__/%{pkgname}.*
5be46a
%{python3_sitearch}/__pycache__/%{pkgname}_py35.*
Igor Gnatenko 682d20
%{python3_sitearch}/kernprof.py
Igor Gnatenko 682d20
%{python3_sitearch}/__pycache__/kernprof.*
648ac5
%{_bindir}/kernprof
bd3d62
bd3d62
%changelog
a8edf3
* Mon Aug 19 2019 Miro Hron훾ok <mhroncok@redhat.com> - 2.1-5
a8edf3
- Rebuilt for Python 3.8
a8edf3
b55695
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.1-4
b55695
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
b55695
648ac5
* Sun Feb 03 2019 Miro Hron훾ok <mhroncok@redhat.com> - 2.1-3
648ac5
- Drop Python 2 subpackage
648ac5
d2c2b2
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.1-2
d2c2b2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
d2c2b2
5be46a
* Thu Aug 16 2018 Jackson Isaac <jacksonisaac@fedoraproject.org> - 2.1-1
5be46a
- Update to 2.1
5be46a
- Add patch for python 3.7 - Fixes #1605752
5be46a
- Update file list for python3 package to add new py35 files
5be46a
ba2f3a
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.0-8
ba2f3a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
ba2f3a
9a18f8
* Tue Jun 19 2018 Miro Hron훾ok <mhroncok@redhat.com> - 2.0-7
9a18f8
- Rebuilt for Python 3.7
9a18f8
a00486
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.0-6
a00486
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
a00486
50750d
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.0-5
50750d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
50750d
f7ab07
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.0-4
f7ab07
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
f7ab07
2444f1
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.0-3
2444f1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
2444f1
Igor Gnatenko ecc7e7
* Mon Jan 23 2017 Igor Gnatenko <ignatenko@redhat.com> - 2.0-2
Igor Gnatenko ecc7e7
- Bump version
Igor Gnatenko ecc7e7
Igor Gnatenko 682d20
* Sun Jan 15 2017 Igor Gnatenko <ignatenko@redhat.com> - 2.0-1
Igor Gnatenko 682d20
- Update to 2.0
Igor Gnatenko 682d20
- Modernize spec
Igor Gnatenko 682d20
591fc1
* Mon Dec 19 2016 Miro Hron훾ok <mhroncok@redhat.com> - 1.0-10
591fc1
- Rebuild for Python 3.6
591fc1
f09517
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0-9
f09517
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
f09517
d688b4
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.0-8
d688b4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
d688b4
0e0dc1
* Tue Nov 10 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0-7
0e0dc1
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5
0e0dc1
bd3d62
* Sat Jul 25 2015 Jackson Isaac <jacksonisaac2008@gmail.com> - 1.0-6
bd3d62
- Add Python License. Exclude __pycache__ in py3 file listing.
bd3d62
bd3d62
* Thu Jul 23 2015 Jackson Isaac <jacksonisaac2008@gmail.com> - 1.0-5
bd3d62
- Remove python2_sitelib definition. Remove ghost from files. 
bd3d62
- Add PYTHONPATH for tests. Run tests for files in tests/
bd3d62
bd3d62
* Wed Jul 22 2015 Jackson Isaac <jacksonisaac2008@gmail.com> - 1.0-4
bd3d62
- Rename kernprof binary instead of symlinking.
bd3d62
bd3d62
* Mon Jul 20 2015 Jackson Isaac <jacksonisaac2008@gmail.com> - 1.0-3
bd3d62
- Do not use py3dir as it is unclean. Use chmod instead of attr.
bd3d62
bd3d62
* Wed Jul 15 2015 Jackson Isaac <jacksonisaac2008@gmail.com> - 1.0-2
bd3d62
- Add compiler flags in build. Create py2 and py3 specific packages.
bd3d62
- Add kernprof script in buildroot for both py2 and py3 versions.
bd3d62
bd3d62
* Wed Jul  8 2015 Jackson Isaac - 1.0-1
bd3d62
- Initial version of line_profiler package