summaryrefslogtreecommitdiffstats
path: root/python/python-fissix.spec
blob: d2fe5f42cec0c5e2acd47eb9f61ca54fdfe7a5a3 (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
%global srcname fissix

%bcond_without tests

Name:           python-%{srcname}
Version:        20.8.0
Release:        1%{?dist}
Summary:        Monkeypatches to override default behavior of lib2to3
License:        Python
URL:            https://github.com/jreese/fissix
Source0:        %{pypi_source}
Patch0:         %{srcname}-dont_ship_tests.patch

BuildArch:      noarch

BuildRequires:  python3-devel
BuildRequires:  python3-setuptools
%if %{with tests}
BuildRequires:  python3-test
BuildRequires:  %{py3_dist appdirs}
BuildRequires:  %{py3_dist pytest}
%endif


%global _description %{expand:
Backport of latest lib2to3, with enhancements.}


%description %_description


%package -n python3-%{srcname}
Summary:        %{summary}
# not sure why but automatic requires don't work
Requires:       %{py3_dist appdirs}

%description -n python3-%{srcname} %_description


%prep
%autosetup -p1 -n %{srcname}-%{version}
sed -i '1d' fissix/pgen2/token.py


%build
%py3_build


%install
%py3_install
cp -p fissix/*.txt %{buildroot}%{python3_sitelib}/%{srcname}/


%check
# mv fissix-tests fissix/tests
%{python3} -m pytest --verbose fissix/tests


%files -n python3-%{srcname}
%license LICENSE
%doc README.md
%{python3_sitelib}/%{srcname}/
%{python3_sitelib}/%{srcname}-%{version}-py%{python3_version}.egg-info


%changelog
* Thu Nov 19 2020 Michel Alexandre Salim <salimma@fedoraproject.org> - 0.9.0-1
- Initial package