]> git.pld-linux.org Git - packages/python-isort.git/blob - python-isort.spec
rebuild with tests and docs
[packages/python-isort.git] / python-isort.spec
1 #
2 # Conditional build:
3 %bcond_with     tests   # unit tests (needs more dependencies in PLD)
4 %bcond_without  python2 # CPython 2.x module
5 %bcond_without  python3 # CPython 3.x module
6
7 %define         module  isort
8 Summary:        Python 2 library to sort imports alphabetically
9 Summary(pl.UTF-8):      Narzędzie Pythona 2 do alfabetycznego sortowania listy importów
10 Name:           python-%{module}
11 # keep 4.x here for python2 support
12 Version:        4.3.21
13 Release:        9
14 License:        MIT
15 Group:          Libraries/Python
16 #Source0Download: https://pypi.org/simple/isort/
17 Source0:        https://files.pythonhosted.org/packages/source/i/isort/%{module}-%{version}.tar.gz
18 # Source0-md5:  05d66f2eb7ce2c2d702e86bac24bf9e4
19 URL:            https://github.com/timothycrosley/isort
20 BuildRequires:  rpm-pythonprov
21 BuildRequires:  rpmbuild(macros) >= 1.714
22 %if %{with python2}
23 BuildRequires:  python-modules >= 1:2.7
24 BuildRequires:  python-setuptools
25 %if %{with tests}
26 BuildRequires:  python-backports.functools_lru_cache
27 BuildRequires:  python-futures
28 BuildRequires:  python-pip-api
29 BuildRequires:  python-pipreqs
30 BuildRequires:  python-pytest
31 BuildRequires:  python-requirementslib
32 %endif
33 %endif
34 %if %{with python3}
35 BuildRequires:  python3-modules >= 1:3.4
36 BuildRequires:  python3-setuptools
37 %if %{with tests}
38 BuildRequires:  python3-pip-api
39 BuildRequires:  python3-pipreqs
40 BuildRequires:  python3-pytest
41 BuildRequires:  python3-requirementslib
42 %endif
43 %endif
44 Requires:       python-modules >= 1:2.7
45 BuildArch:      noarch
46 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
47
48 %description
49 isort is a Python utility / library to sort imports alphabetically,
50 and automatically separated into sections. It provides a command line
51 utility, Python library and plugins for various editors to quickly
52 sort all your imports. It currently cleanly supports Python 2.7 and
53 3.4+ without any dependencies.
54
55 This package contains Python 2 library.
56
57 %description -l pl.UTF-8
58 isort to pythonowe narzędzie/biblioteka do alfabetycznego sortowania
59 importów i automatycznego dzielenia ich na sekcje. Udostępnia
60 narzędzie wiersza poleceń, bibliotekę Pythona i wtyczki do różnych
61 edytorów, pozwalające szybko posortować importy. Obecnie obsługuje
62 czysto wersje Pythona 2.7 i 3.4+ bez zewnętrznych zależności.
63
64 Ten pakiet zawiera bibliotekę Pythona 2.
65
66 %package -n python3-%{module}
67 Summary:        Python 3 library to sort imports alphabetically
68 Summary(pl.UTF-8):      Biblioteka Pythona 3 do alfabetycznego sortowania listy importów
69 Group:          Libraries/Python
70 Requires:       python3-modules >= 1:3.4
71
72 %description -n python3-%{module}
73 isort is a Python utility / library to sort imports alphabetically,
74 and automatically separated into sections. It provides a command line
75 utility, Python library and plugins for various editors to quickly
76 sort all your imports. It currently cleanly supports Python 2.7 and
77 3.4+ without any dependencies.
78
79 This package contains Python 3 library.
80
81 %description -n python3-%{module} -l pl.UTF-8
82 isort to pythonowe narzędzie/biblioteka do alfabetycznego sortowania
83 importów i automatycznego dzielenia ich na sekcje. Udostępnia
84 narzędzie wiersza poleceń, bibliotekę Pythona i wtyczki do różnych
85 edytorów, pozwalające szybko posortować importy. Obecnie obsługuje
86 czysto wersje Pythona 2.7 i 3.4+ bez zewnętrznych zależności.
87
88 Ten pakiet zawiera bibliotekę Pythona 3.
89
90 %package -n isort
91 Summary:        Python utility to sort imports alphabetically
92 Summary(pl.UTF-8):      Pythonowe narzędzie do alfabetycznego sortowania listy importów
93 Group:          Development/Tools
94 %if %{with python3}
95 Requires:       python3-%{module} = %{version}-%{release}
96 %else
97 Requires:       python-%{module} = %{version}-%{release}
98 %endif
99
100 %description -n isort
101 isort is a Python utility / library to sort imports alphabetically,
102 and automatically separated into sections. It provides a command line
103 utility, Python library and plugins for various editors to quickly
104 sort all your imports. It currently cleanly supports Python 2.7 and
105 3.4+ without any dependencies.
106
107 This package contains command line utility.
108
109 %description -n isort -l pl.UTF-8
110 isort to pythonowe narzędzie/biblioteka do alfabetycznego sortowania
111 importów i automatycznego dzielenia ich na sekcje. Udostępnia
112 narzędzie wiersza poleceń, bibliotekę Pythona i wtyczki do różnych
113 edytorów, pozwalające szybko posortować importy. Obecnie obsługuje
114 czysto wersje Pythona 2.7 i 3.4+ bez zewnętrznych zależności.
115
116 Ten pakiet zawiera narzędzie wiersza poleceń.
117
118 %prep
119 %setup -q -n %{module}-%{version}
120
121 %build
122 %if %{with python2}
123 %py_build
124
125 %if %{with tests}
126 PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
127 %{__python} -m pytest test_isort.py
128 %endif
129 %endif
130
131 %if %{with python3}
132 %py3_build
133
134 %if %{with tests}
135 PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
136 %{__python3} -m pytest test_isort.py
137 %endif
138 %endif
139
140 %install
141 rm -rf $RPM_BUILD_ROOT
142
143 %if %{with python2}
144 %py_install
145
146 %py_postclean
147 %endif
148
149 %if %{with python3}
150 %py3_install
151 %endif
152
153 %clean
154 rm -rf $RPM_BUILD_ROOT
155
156 %if %{with python2}
157 %files
158 %defattr(644,root,root,755)
159 %doc ACKNOWLEDGEMENTS.md CHANGELOG.md LICENSE README.rst
160 %{py_sitescriptdir}/%{module}
161 %{py_sitescriptdir}/%{module}-%{version}-py*.egg-info
162 %endif
163
164 %if %{with python3}
165 %files -n python3-%{module}
166 %defattr(644,root,root,755)
167 %doc ACKNOWLEDGEMENTS.md CHANGELOG.md LICENSE README.rst
168 %{py3_sitescriptdir}/%{module}
169 %{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info
170 %endif
171
172 %files -n isort
173 %defattr(644,root,root,755)
174 %attr(755,root,root) %{_bindir}/isort
This page took 0.095713 seconds and 3 git commands to generate.