%global srcname dodgy Name: python-%{srcname} Version: 0.1.9 Release: 2%{?dist} Summary: Searches for dodgy looking lines in Python code License: MIT URL: https://github.com/landscapeio/%{srcname} Source0: %{url}/archive/%{version}/%{name}-%{version}.tar.gz BuildArch: noarch %global desc Dodgy is a very basic tool to run against your codebase to search for "dodgy"\ looking values. It is a series of simple regular expressions designed to\ detect things such as accidental SCM diff checkins, or passwords or secret\ keys hard coded into files.\ \ While this is primarily aimed at open source projects (for whom a publicly\ available secret key is pretty dangerous), it can also be used in private\ projects, with the caveat that it will point out things which are not a\ problem for private projects and is not configurable enough currently to\ change that.\ \ Another note - this tool is probably best run pre-commit, since it will\ hopefully prevent dodgy things being checked in. %description %{desc} %package -n python2-%{srcname} Summary: %{summary} BuildRequires: python2-devel BuildRequires: python2-setuptools %if 0%{?fedora} BuildRequires: python2-pytest %else BuildRequires: pytest %endif %{?python_provide:%python_provide python2-%{srcname}} %description -n python2-%{srcname} %{desc} %package -n python%{python3_pkgversion}-%{srcname} Summary: %{summary} BuildRequires: python%{python3_pkgversion}-devel BuildRequires: python%{python3_pkgversion}-setuptools BuildRequires: python%{python3_pkgversion}-pytest %{?python_provide:%python_provide python%{python3_pkgversion}-%{srcname}} %description -n python%{python3_pkgversion}-%{srcname} %{desc} %prep %setup -q -n %{srcname}-%{version} %build %py2_build %py3_build %install %py2_install mv %{buildroot}%{_bindir}/dodgy{,-%{python2_version}} %py3_install mv %{buildroot}%{_bindir}/dodgy{,-%{python3_version}} %if 0%{?fedora} mv %{buildroot}%{_bindir}/dodgy{-%{python3_version},} rm %{buildroot}%{_bindir}/dodgy-%{python2_version} %else mv %{buildroot}%{_bindir}/dodgy{-%{python2_version},} rm %{buildroot}%{_bindir}/dodgy-%{python3_version} %endif %check py.test-%{python2_version} -v py.test-%{python3_version} -v %files -n python2-%{srcname} %license LICENSE %doc README.md %if 0%{?rhel} %{_bindir}/dodgy %endif %{python2_sitelib}/%{srcname}* %files -n python%{python3_pkgversion}-%{srcname} %license LICENSE %doc README.md %if 0%{?fedora} %{_bindir}/dodgy %endif %{python3_sitelib}/%{srcname}* %changelog * Mon Dec 4 2017 Orion Poplawski - 0.1.9-2 - Only ship one version of dodgy binary - Use python2- BRs where possible * Fri Mar 10 2017 Orion Poplawski - 0.1.9-1 - Initial package