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