1 Star 0 Fork 12

白光磊/python-vulture

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
python-vulture.spec 1.90 KB
一键复制 编辑 原始数据 按行查看 历史
白光磊 提交于 2021-07-09 09:22 . 添加python-vulture-2.1-1
%global pypi_name vulture
%global common_desc \
Vulture finds unused classes, functions and variables in your code. \
This helps you cleanup and find errors in your programs. If you run it \
on both your library and test suite you can find untested code. \
Due to Python’s dynamic nature, static code analyzers like vulture \
are likely to miss some dead code. Also, code that is only called \
implicitly may be reported as unused. Nonetheless, vulture can be a \
very helpful tool for higher code quality.
Name: python-%{pypi_name}
Version: 2.1
Release: 1
Summary: Find dead code
License: MIT
URL: https://github.com/jendrikseipp/vulture
Source0: %{url}/archive/v%{version}/%{pypi_name}-%{version}.tar.gz
BuildArch: noarch
%description
%{common_desc}
%package -n python3-%{pypi_name}
Summary: %{summary}
%{?python_provide:%python_provide python3-%{pypi_name}}
BuildRequires: python3-devel
BuildRequires: python3dist(setuptools)
BuildRequires: python3dist(pytest)
BuildRequires: python3dist(pytest-cov)
%description -n python3-%{pypi_name}
%{common_desc}
%prep
%autosetup -n %{pypi_name}-%{version}
sed -i '1{/^#!/d}' vulture/*.py
%build
%py3_build
%install
%py3_install
mv %{buildroot}%{_bindir}/%{pypi_name} %{buildroot}%{_bindir}/%{pypi_name}-%{python3_version}
ln -s %{_bindir}/vulture-%{python3_version} %{buildroot}/%{_bindir}/vulture-3
ln -s %{_bindir}/vulture-%{python3_version} %{buildroot}/%{_bindir}/vulture
%check
%pytest -v tests
%files -n python3-%{pypi_name}
%doc CHANGELOG.md README.md
%license LICENSE.txt
%{_bindir}/%{pypi_name}
%{_bindir}/%{pypi_name}-3
%{_bindir}/%{pypi_name}-%{python3_version}
%{python3_sitelib}/%{pypi_name}/__pycache__
%{python3_sitelib}/%{pypi_name}/
%{python3_sitelib}/%{pypi_name}-%{version}-py%{python3_version}.egg-info/
%changelog
* Fri Jul 9 2021 baiguanglei <baiguanglei@kylinos.cn> - 2.1-1
- Initial package
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/bai-guanglei/python-vulture.git
git@gitee.com:bai-guanglei/python-vulture.git
bai-guanglei
python-vulture
python-vulture
master

搜索帮助