Пакет python-module-flake8: Specfile
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 | %def_with python3 %global modname flake8 Name: python-module-%{modname} Version: 2.4.0 Release: alt0.M70C.1 Summary: Code checking using pep8 and pyflakes Group: Development/Python License: MIT URL: http://pypi.python.org/pypi/%{modname} Source0: %{name}-%{version}.tar Patch0: flake8-2.4.0-alt-requirements.patch BuildArch: noarch BuildRequires: python-devel python-modules-multiprocessing BuildRequires: python-module-nose BuildRequires: python-module-setuptools BuildRequires: python-module-mccabe >= 0.2 BuildRequires: python-tools-pep8 >= 1.4.3 BuildRequires: pyflakes >= 0.6.1 BuildRequires: python-module-mock Requires: python-module-mccabe >= 0.2 Requires: python-tools-pep8 >= 1.4.3 Requires: pyflakes >= 0.6.1 Requires: python-module-setuptools %if_with python3 BuildRequires(pre): rpm-build-python3 BuildRequires: python3-module-setuptools BuildRequires: python3-module-nose BuildRequires: python3-module-mccabe >= 0.2 BuildRequires: python3-tools-pep8 >= 1.4.3 BuildRequires: python3-pyflakes >= 0.6.1 BuildRequires: python3-module-mock %endif %py_requires multiprocessing %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:: # flake8: noqa - lines that contains a "# NOQA" comment at the end will not issue a warning. - a Mercurial hook. - a McCabe complexity checker. %if_with python3 %package -n python3-module-%{modname} Summary: Code checking using pep8 and pyflakes Group: Development/Python Requires: python3-module-setuptools Requires: python3-module-mccabe >= 0.2 Requires: python3-tools-pep8 >= 1.4.3 Requires: python3-pyflakes >= 0.6.1 %description -n python3-module-%{modname} 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:: # flake8: noqa - 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. %endif %prep %setup %patch0 -p2 #sed -i -e '/^#!\s*\/.*bin\/.*python/d' flake8/pep8.py #chmod -x flake8/pep8.py %if_with python3 rm -rf ../python3 cp -a . ../python3 find ../python3 -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python3}|' %endif %build %python_build %if_with python3 pushd ../python3 %python3_build popd %endif %install unset PYTHONPATH # Must do the python3 install first because the scripts in /usr/bin are # overwritten with every setup.py install (and we want the python2 version # to be the default for now). %if_with python3 pushd ../python3 %python3_install mv %{buildroot}%{_bindir}/flake8 %{buildroot}%{_bindir}/python3-flake8 popd %endif %python_install %check %{__python} setup.py nosetests --verbosity=2 %if_with python3 %{__python3} setup.py nosetests --verbosity=2 %endif %files %doc README.rst CONTRIBUTORS.txt %{_bindir}/%{modname} %{python_sitelibdir}/%{modname}* %if_with python3 %files -n python3-module-%{modname} %doc README.rst CONTRIBUTORS.txt %{_bindir}/python3-flake8 %{python3_sitelibdir}/%{modname}* %endif %changelog * Thu Jun 18 2015 Anton V. Boyarshinov <boyarsh@altlinux.ru> 2.4.0-alt0.M70C.1 - backport to c7 * Tue Apr 28 2015 Eugeny A. Rostovtsev (REAL) <real at altlinux.org> 2.4.0-alt1 - Version 2.4.0 * Mon Feb 16 2015 Eugeny A. Rostovtsev (REAL) <real at altlinux.org> 2.3.0-alt1 - Version 2.3.0 * Sat Nov 08 2014 Eugeny A. Rostovtsev (REAL) <real at altlinux.org> 2.2.5-alt1 - Version 2.2.5 * Fri Aug 01 2014 Lenar Shakirov <snejok@altlinux.ru> 2.1.0-alt1 - First build for ALT (based on Fedora 2.1.0-3.fc21.src) |