]> git.pld-linux.org Git - SPECS.git/blob - python-pylint-django.spec
SPECS updated Wed 28 Jul 14:48:01 CEST 2021
[SPECS.git] / python-pylint-django.spec
1 #
2 # Conditional build:
3 %bcond_without  tests   # do not perform "make test"
4 %bcond_without  python2 # CPython 2.x module
5 %bcond_without  python3 # CPython 3.x module
6
7 %define         module  pylint-django
8 Summary:        Pylint plugin for hangling Django code
9 # Name must match the python module/package name (as in 'import' statement)
10 Name:           python-%{module}
11 Version:        0.7.1
12 Release:        5
13 License:        GPL v2
14 Group:          Libraries/Python
15 Source0:        https://pypi.python.org/packages/source/p/pylint-django/%{module}-%{version}.tar.gz
16 # Source0-md5:  4e170e1276bb00ad4996f24daae1786e
17 URL:            https://github.com/landscapeio/pylint-django
18 BuildRequires:  rpm-pythonprov
19 BuildRequires:  rpmbuild(macros) >= 1.714
20 %if %{with python2}
21 BuildRequires:  python-modules
22 BuildRequires:  python-setuptools
23 %{?with_tests:BuildRequires:    python-pylint-plugin-utils}
24 %endif
25 %if %{with python3}
26 BuildRequires:  python3-modules
27 BuildRequires:  python3-setuptools
28 %{?with_tests:BuildRequires:    python3-pylint-plugin-utils}
29 %endif
30 Requires:       python-modules
31 BuildArch:      noarch
32 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
33
34 %description
35 pylint-django is a Pylint plugin to aid Pylint in recognising and
36 understandingerrors caused when using the Django framework.
37
38 %package -n python3-%{module}
39 Summary:        Pylint plugin for hangling Django code
40 Group:          Libraries/Python
41 Requires:       python3-modules
42
43 %description -n python3-%{module}
44 pylint-django is a Pylint plugin to aid Pylint in recognising and
45 understandingerrors caused when using the Django framework.
46
47 %prep
48 %setup -q -n %{module}-%{version}
49
50 %build
51 %if %{with python2}
52 %py_build %{?with_tests:test}
53 %endif
54
55 %if %{with python3}
56 %py3_build %{?with_tests:test}
57 %endif
58
59 %install
60 rm -rf $RPM_BUILD_ROOT
61
62 %if %{with python2}
63 %py_install
64
65 %py_postclean
66 %endif
67
68 %if %{with python3}
69 %py3_install
70 %endif
71
72 %clean
73 rm -rf $RPM_BUILD_ROOT
74
75 %if %{with python2}
76 %files
77 %defattr(644,root,root,755)
78 %{py_sitescriptdir}/pylint_django
79 %if "%{py_ver}" > "2.4"
80 %{py_sitescriptdir}/pylint_django-%{version}-py*.egg-info
81 %endif
82 %endif
83
84 %if %{with python3}
85 %files -n python3-%{module}
86 %defattr(644,root,root,755)
87 %{py3_sitescriptdir}/pylint_django
88 %{py3_sitescriptdir}/pylint_django-%{version}-py*.egg-info
89 %endif
This page took 0.780766 seconds and 3 git commands to generate.