Sisyphus repository
Last update: 13 october 2019 | SRPMs: 17515 | Visits: 15263543
en ru br
ALT Linux repos
S:3.7.8-alt1

Group :: Development/Python
RPM: python-module-flake8

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

%define _unpackaged_files_terminate_build 1
%define oname flake8

%def_with check

Name: python-module-%oname
Version: 3.6.0
Release: alt2

Summary: Code checking using pep8 and pyflakes
Group: Development/Python
License: MIT
Url: http://pypi.python.org/pypi/flake8
# https://gitlab.com/pycqa/flake8.git
BuildArch: noarch

Source: %name-%version.tar

BuildRequires(pre): rpm-build-python3
BuildRequires: python-module-pytest-runner
BuildRequires: python3-module-pytest-runner

%if_with check
BuildRequires: python-module-pytest
BuildRequires: python-module-tox
BuildRequires: python-module-coverage
BuildRequires: python-module-pyflakes
BuildRequires: python-module-mock
BuildRequires: python-module-mccabe
BuildRequires: python-module-configparser
BuildRequires: python-module-pycodestyle
BuildRequires: python3-module-pytest
BuildRequires: python3-module-tox
BuildRequires: python3-module-coverage
BuildRequires: python3-module-pyflakes
BuildRequires: python3-module-mock
BuildRequires: python3-module-mccabe
BuildRequires: python3-module-pycodestyle
%endif

%py_requires mccabe
%py_requires pyflakes
%py_requires pycodestyle

%description
Flake8 is a wrapper around these tools:

- PyFlakes - pep8 - Ned's McCabe script

Flake8 runs all tools by launching the single 'flake8' script, but ignores
pep8 and PyFlakes extended options and just uses defaults. It displays the
warnings in a per-file, merged output.

It also adds a few features:

- files that contains with this header are skipped::

- lines that contains a "# NOQA" comment at the end will not issue a
warning. - a Mercurial hook.

- a McCabe complexity checker.

%package -n python3-module-%oname
Summary: Code checking using pep8 and pyflakes
Group: Development/Python3
%py3_requires mccabe
%py3_requires pycodestyle
%py3_requires pyflakes

%description -n python3-module-%oname
Flake8 is a wrapper around these tools:

- PyFlakes - pep8 - Ned's McCabe script

Flake8 runs all tools by launching the single 'flake8' script, but ignores
pep8 and PyFlakes extended options and just uses defaults. It displays the
warnings in a per-file, merged output.

It also adds a few features:

- files that contains with this header are skipped::

- lines that contains a "# NOQA" comment at the end will not issue a
warning. - a Mercurial hook.

- a McCabe complexity checker.

This is version of the package running with Python 3.

%prep
%setup


%build
%python_build_debug -b build2
%python3_build_debug -b build3

%install
ln -sf build2 build
%python_install
mv %buildroot%_bindir/{flake8,python2-flake8}
ln -sf build3 build
%python3_install

%check
ln -sf build2 build
export PIP_INDEX_URL=http://host.invalid./

export PYTHONPATH="$(pwd)"/src
# copy nessecary exec deps
TOX_TESTENV_PASSENV='PYTHONPATH' %_bindir/tox \
--sitepackages -e py%{python_version_nodots python} --notest
cp -f %_bindir/coverage .tox/py%{python_version_nodots python}/bin/

TOX_TESTENV_PASSENV='PYTHONPATH' %_bindir/tox \
--sitepackages -e py%{python_version_nodots python} -v -- -v

ln -sf build3 build
export PYTHONPATH="$(pwd)"/src
# copy nessecary exec deps
TOX_TESTENV_PASSENV='PYTHONPATH' %_bindir/tox.py3 \
--sitepackages -e py%{python_version_nodots python3} --notest
cp -f %_bindir/coverage3 .tox/py%{python_version_nodots python3}/bin/coverage

TOX_TESTENV_PASSENV='PYTHONPATH' %_bindir/tox.py3 \
--sitepackages -e py%{python_version_nodots python3} -v -- -v

%files
%doc README.rst LICENSE
%_bindir/python2-flake8
%python_sitelibdir/flake8/
%python_sitelibdir/flake8-*.egg-info/

%files -n python3-module-%oname
%doc README.rst LICENSE
%_bindir/flake8
%python3_sitelibdir/flake8/
%python3_sitelibdir/flake8-*.egg-info/

%changelog

Full changelog you can see here

 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin