|
|
3eabb00 |
%bcond_without python3
|
|
|
3eabb00 |
|
|
|
3eabb00 |
%global module_name vulture
|
|
|
3eabb00 |
%global common_desc \
|
|
|
3eabb00 |
Vulture finds unused classes, functions and variables in your code. \
|
|
|
3eabb00 |
This helps you cleanup and find errors in your programs. If you run it \
|
|
|
3eabb00 |
on both your library and test suite you can find untested code. \
|
|
|
3eabb00 |
Due to Python’s dynamic nature, static code analyzers like vulture \
|
|
|
3eabb00 |
are likely to miss some dead code. Also, code that is only called \
|
|
|
3eabb00 |
implicitly may be reported as unused. Nonetheless, vulture can be a \
|
|
|
3eabb00 |
very helpful tool for higher code quality.
|
|
|
3eabb00 |
|
|
|
3eabb00 |
Name: python-%{module_name}
|
|
|
0aa051f |
Version: 0.27
|
|
|
0aa051f |
Release: 1%{?dist}
|
|
|
3eabb00 |
Summary: Find Dead Code
|
|
|
3eabb00 |
|
|
|
3eabb00 |
License: MIT
|
|
|
3eabb00 |
URL: https://pypi.python.org/pypi/vulture
|
|
|
3eabb00 |
Source0: https://files.pythonhosted.org/packages/source/v/%{module_name}/%{module_name}-%{version}.tar.gz
|
|
|
3eabb00 |
|
|
|
3eabb00 |
BuildArch: noarch
|
|
|
3eabb00 |
|
|
|
3eabb00 |
%description
|
|
|
3eabb00 |
%{common_desc}
|
|
|
3eabb00 |
|
|
|
3eabb00 |
%package -n python2-%{module_name}
|
|
|
3eabb00 |
Summary: Find Dead Code
|
|
|
3eabb00 |
%{?python_provide:%python_provide python2-%{module_name}}
|
|
|
3eabb00 |
|
|
|
3eabb00 |
BuildRequires: python2-devel
|
|
|
607a5c4 |
BuildRequires: python2-setuptools
|
|
|
3eabb00 |
# Required by tests
|
|
|
3eabb00 |
BuildRequires: python2-pytest
|
|
|
3eabb00 |
BuildRequires: python2-pytest-cov
|
|
|
3eabb00 |
|
|
|
607a5c4 |
Requires: python2-setuptools
|
|
|
3eabb00 |
|
|
|
3eabb00 |
%description -n python2-%{module_name}
|
|
|
3eabb00 |
%{common_desc}
|
|
|
3eabb00 |
|
|
|
3eabb00 |
%if %{with python3}
|
|
|
3eabb00 |
%package -n python3-%{module_name}
|
|
|
3eabb00 |
Summary: Find Dead Code
|
|
|
3eabb00 |
%{?python_provide:%python_provide python3-%{module_name}}
|
|
|
3eabb00 |
|
|
|
3eabb00 |
BuildRequires: python3-devel
|
|
|
3eabb00 |
BuildRequires: python3-setuptools
|
|
|
3eabb00 |
# Required by tests
|
|
|
3eabb00 |
BuildRequires: python3-pytest
|
|
|
3eabb00 |
BuildRequires: python3-pytest-cov
|
|
|
3eabb00 |
|
|
|
3eabb00 |
Requires: python3-setuptools
|
|
|
3eabb00 |
%description -n python3-%{module_name}
|
|
|
3eabb00 |
%{common_desc}
|
|
|
3eabb00 |
%endif
|
|
|
3eabb00 |
|
|
|
3eabb00 |
%prep
|
|
|
3eabb00 |
%autosetup -n %{module_name}-%{version}
|
|
|
3eabb00 |
# Remove shebang
|
|
|
dd29d14 |
sed -i '1{/^#!/d}' vulture/*.py
|
|
|
3eabb00 |
|
|
|
3eabb00 |
%build
|
|
|
3eabb00 |
%py2_build
|
|
|
3eabb00 |
%if %{with python3}
|
|
|
3eabb00 |
%py3_build
|
|
|
3eabb00 |
%endif
|
|
|
3eabb00 |
|
|
|
3eabb00 |
%install
|
|
|
3eabb00 |
%if %{with python3}
|
|
|
3eabb00 |
%py3_install
|
|
|
3eabb00 |
mv %{buildroot}%{_bindir}/%{module_name} %{buildroot}%{_bindir}/%{module_name}-%{python3_version}
|
|
|
3eabb00 |
%endif
|
|
|
3eabb00 |
%py2_install
|
|
|
3eabb00 |
mv %{buildroot}%{_bindir}/%{module_name} %{buildroot}%{_bindir}/%{module_name}-%{python2_version}
|
|
|
3eabb00 |
|
|
|
3eabb00 |
ln -s %{_bindir}/vulture-%{python3_version} %{buildroot}/%{_bindir}/vulture-3
|
|
|
3eabb00 |
ln -s %{_bindir}/vulture-%{python2_version} %{buildroot}/%{_bindir}/vulture-2
|
|
|
3eabb00 |
ln -s %{_bindir}/vulture-%{python2_version} %{buildroot}/%{_bindir}/vulture
|
|
|
3eabb00 |
|
|
|
3eabb00 |
%check
|
|
|
dd29d14 |
export PYTHONPATH=.
|
|
|
3eabb00 |
py.test-2
|
|
|
3eabb00 |
%if %{with python3}
|
|
|
3eabb00 |
py.test-3
|
|
|
3eabb00 |
%endif
|
|
|
3eabb00 |
|
|
|
3eabb00 |
%files -n python2-%{module_name}
|
|
|
3eabb00 |
%doc README.rst
|
|
|
3eabb00 |
%license LICENSE.txt
|
|
|
3eabb00 |
%{_bindir}/%{module_name}
|
|
|
3eabb00 |
%{_bindir}/%{module_name}-2
|
|
|
3eabb00 |
%{_bindir}/%{module_name}-%{python2_version}
|
|
|
dd29d14 |
%{python2_sitelib}/%{module_name}
|
|
|
3eabb00 |
%{python2_sitelib}/%{module_name}-%{version}-py?.?.egg-info
|
|
|
3eabb00 |
|
|
|
3eabb00 |
%if %{with python3}
|
|
|
3eabb00 |
%files -n python3-%{module_name}
|
|
|
3eabb00 |
%doc README.rst
|
|
|
3eabb00 |
%license LICENSE.txt
|
|
|
3eabb00 |
%{_bindir}/%{module_name}-3
|
|
|
3eabb00 |
%{_bindir}/%{module_name}-%{python3_version}
|
|
|
dd29d14 |
%{python3_sitelib}/%{module_name}/__pycache__
|
|
|
dd29d14 |
%{python3_sitelib}/%{module_name}
|
|
|
3eabb00 |
%{python3_sitelib}/%{module_name}-%{version}-py?.?.egg-info
|
|
|
3eabb00 |
%endif
|
|
|
3eabb00 |
|
|
|
3eabb00 |
%changelog
|
|
|
0aa051f |
* Fri Jun 29 2018 Yatin Karel <ykarel@redhat.com> - 0.27-1
|
|
|
0aa051f |
- Update to 0.27 (#1586070)
|
|
|
0aa051f |
|
|
|
380af0b |
* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 0.26-3
|
|
|
380af0b |
- Rebuilt for Python 3.7
|
|
|
380af0b |
|
|
|
e91fff2 |
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.26-2
|
|
|
e91fff2 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
|
|
e91fff2 |
|
|
|
4dbb5ed |
* Mon Aug 28 2017 Fedora Release Monitoring <release-monitoring@fedoraproject.org> - 0.26-1
|
|
|
4dbb5ed |
- Update to 0.26 (#1485917)
|
|
|
4dbb5ed |
|
|
|
f0be9a7 |
* Wed Aug 16 2017 Fedora Release Monitoring <release-monitoring@fedoraproject.org> - 0.25-1
|
|
|
f0be9a7 |
- Update to 0.25 (#1472024)
|
|
|
f0be9a7 |
|
|
|
0309b81 |
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.16-2
|
|
|
0309b81 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
|
|
|
0309b81 |
|
|
|
dd29d14 |
* Mon Jul 17 2017 Yatin Karel <ykarel@redhat.com> - 0.16-1
|
|
|
dd29d14 |
- Sync with upstream release 0.16
|
|
|
dd29d14 |
|
|
|
4e6ba03 |
* Wed Jul 05 2017 Yatin Karel <ykarel@redhat.com> - 0.14-3
|
|
|
4e6ba03 |
- Fix Changelog release
|
|
|
4e6ba03 |
|
|
|
607a5c4 |
* Wed Jul 05 2017 Yatin Karel <ykarel@redhat.com> - 0.14-2
|
|
|
607a5c4 |
- Use versioned package, python2-setuptools(not python-setuptools)
|
|
|
607a5c4 |
|
|
|
3eabb00 |
* Tue Jun 20 2017 Yatin Karel <ykarel@redhat.com> - 0.14-1
|
|
|
3eabb00 |
- Initial package import
|
|
|
3eabb00 |
|