blob: 6a5adb883812d7f6ae0f61b4f318c178141906e2 (
plain)
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
|
%global srcname bowler
%bcond_without tests
Name: python-%{srcname}
Version: 0.9.0
Release: 1%{?dist}
Summary: Safe code refactoring for modern Python projects
License: MIT
URL: https://pybowler.io
Source0: %{pypi_source}
BuildArch: noarch
BuildRequires: python3-devel
BuildRequires: python3-setuptools
%if %{with tests}
BuildRequires: %{py3_dist appdirs}
BuildRequires: %{py3_dist attrs}
BuildRequires: %{py3_dist click}
BuildRequires: %{py3_dist coverage}
BuildRequires: %{py3_dist fissix}
BuildRequires: %{py3_dist moreorless} >= 0.2.0
BuildRequires: %{py3_dist volatile}
%endif
%global _description %{expand:
Bowler is a refactoring tool for manipulating Python at the syntax tree level.
It enables safe, large scale code modifications while guaranteeing that the
resulting code compiles and runs. It provides both a simple command line
interface and a fluent API in Python for generating complex code modifications
in code.}
%description %_description
%package -n python3-%{srcname}
Summary: %{summary}
%description -n python3-%{srcname} %_description
%package -n python3-%{srcname}-docs
Summary: Documentation for python3-%{srcname}
Requires: python3-%{srcname} = %{version}-%{release}
%description -n python3-%{srcname}-docs %_description
The python3-%{srcname}-docs package contains documentation for python3-%{srcname}.
%prep
%autosetup -p1 -n %{srcname}-%{version}
sed -i '1d' $(grep -l '#!/usr/bin/env' bowler/*.py)
# this is only needed for testing
sed -i '/volatile/d' requirements.txt
%build
%py3_build
%install
%py3_install
%if %{with tests}
%check
%{python3} -m coverage run -m bowler.tests
%endif
%files -n python3-%{srcname}
%license LICENSE
%doc CODE_OF_CONDUCT.md CONTRIBUTING.md README.md
%{_bindir}/%{srcname}
%{python3_sitelib}/%{srcname}/
%exclude %{python3_sitelib}/%{srcname}/tests
%{python3_sitelib}/%{srcname}-%{version}-py%{python3_version}.egg-info/
%files -n python3-%{srcname}-docs
%doc docs/*.md
%changelog
* Thu Nov 19 2020 Michel Alexandre Salim <salimma@fedoraproject.org> - 0.9.0-1
- Initial package
|