]> git.pld-linux.org Git - packages/python-isort.git/blame - python-isort.spec
drop unnecessary py_comp
[packages/python-isort.git] / python-isort.spec
CommitLineData
db818afa
JK
1#
2# Conditional build:
3%bcond_with tests # do perform tests (broken in 4.2.15)
4%bcond_without python2 # CPython 2.x module
5%bcond_without python3 # CPython 3.x module
6
7%define module isort
8Summary: Python utility / library to sort imports alphabetically
9Name: python-%{module}
10Version: 4.2.15
11Release: 1
12License: MIT
13Group: Libraries/Python
14Source0: https://files.pythonhosted.org/packages/source/i/%{module}/%{module}-%{version}.tar.gz
15# Source0-md5: 34915a2ce60e6fe3dbcbf5982deef9b4
16URL: https://github.com/timothycrosley/isort
17BuildRequires: rpm-pythonprov
18BuildRequires: rpmbuild(macros) >= 1.714
19%if %{with python2}
20BuildRequires: python-setuptools
21%endif
22%if %{with python3}
23BuildRequires: python3-setuptools
24%endif
25Requires: python-modules
26BuildArch: noarch
27BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
28
29%description
30isort is a Python utility / library to sort imports alphabetically,
31and automatically separated into sections. It provides a command line
32utility, Python library and plugins for various editors to quickly
33sort all your imports. It currently cleanly supports Python 2.7 - 3.6
34without any dependencies.
35
36%package -n python3-%{module}
37Summary: Python utility / library to sort imports alphabetically
38Group: Libraries/Python
39Requires: python3-modules
40
41%description -n python3-%{module}
42isort is a Python utility / library to sort imports alphabetically,
43and automatically separated into sections. It provides a command line
44utility, Python library and plugins for various editors to quickly
45sort all your imports. It currently cleanly supports Python 2.7 - 3.6
46without any dependencies.
47
48%package -n isort
49Summary: Python utility / library to sort imports alphabetically
50Group: Development/Tools
51%if %{with python3}
52Requires: python3-%{module} = %{version}-%{release}
53%else
54Requires: python-%{module} = %{version}-%{release}
55%endif
56
57%description -n isort
58isort is a Python utility / library to sort imports alphabetically,
59and automatically separated into sections. It provides a command line
60utility, Python library and plugins for various editors to quickly
61sort all your imports. It currently cleanly supports Python 2.7 - 3.6
62without any dependencies.
63
64%prep
65%setup -q -n %{module}-%{version}
66
67%build
68%if %{with python2}
69%py_build %{?with_tests:test}
70%endif
71
72%if %{with python3}
73%py3_build %{?with_tests:test}
74%endif
75
76%install
77rm -rf $RPM_BUILD_ROOT
78
79%if %{with python2}
80%py_install
81
db818afa
JK
82%py_postclean
83%endif
84
85%if %{with python3}
86%py3_install
87%endif
88
89%clean
90rm -rf $RPM_BUILD_ROOT
91
92%if %{with python2}
93%files
94%defattr(644,root,root,755)
95%doc ACKNOWLEDGEMENTS.md CHANGELOG.md README.rst
96%{py_sitescriptdir}/%{module}
97%{py_sitescriptdir}/%{module}-%{version}-py*.egg-info
98%endif
99
100%if %{with python3}
101%files -n python3-%{module}
102%defattr(644,root,root,755)
103%doc ACKNOWLEDGEMENTS.md CHANGELOG.md README.rst
104%{py3_sitescriptdir}/%{module}
105%{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info
106%endif
107
108%files -n isort
109%defattr(644,root,root,755)
110%attr(755,root,root) %{_bindir}/isort
This page took 0.096872 seconds and 4 git commands to generate.