]> git.pld-linux.org Git - packages/python-astor.git/blame - python-astor.spec
rebuild with python 3.10
[packages/python-astor.git] / python-astor.spec
CommitLineData
4dc10c99
JB
1#
2# Conditional build:
3%bcond_with tests # unit tests (using local python installation, failing on python 3.9)
4%bcond_without python2 # CPython 2.x module
5%bcond_without python3 # CPython 3.x module
6
7Summary: Read/rewrite/write Python ASTs
8Summary(pl.UTF-8): Odczyt/przepisywanie/zapis pythonowych AST
9Name: python-astor
10Version: 0.8.1
286be1e5 11Release: 2
4dc10c99
JB
12License: BSD
13Group: Libraries/Python
14#Source0Download: https://pypi.org/simple/astor/
15Source0: https://files.pythonhosted.org/packages/source/a/astor/astor-%{version}.tar.gz
16# Source0-md5: 83ab4ee6598f0381d94ed6949a6d6da2
17URL: https://pypi.org/project/astor/
18%if %{with python2}
19BuildRequires: python-modules >= 1:2.7
20BuildRequires: python-setuptools
21%if %{with tests}
22BuildRequires: python-astunparse
23BuildRequires: python-nose
24%endif
25%endif
26%if %{with python3}
27BuildRequires: python3-modules >= 1:3.4
28BuildRequires: python3-setuptools
29%if %{with tests}
30BuildRequires: python3-astunparse
31BuildRequires: python3-nose
32%endif
33%endif
34BuildRequires: rpm-pythonprov
35BuildRequires: rpmbuild(macros) >= 1.714
36Requires: python-modules >= 1:2.7
37BuildArch: noarch
38BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
39
40%description
41astor is designed to allow easy manipulation of Python source via the
42AST.
43
44%description -l pl.UTF-8
45astor powstał, aby umożliwić łatwe operowanie na kodzie źródłowym w
46Pythonie poprzez AST.
47
48%package -n python3-astor
49Summary: Read/rewrite/write Python ASTs
50Summary(pl.UTF-8): Odczyt/przepisywanie/zapis pythonowych AST
51Group: Libraries/Python
52Requires: python3-modules >= 1:3.4
53
54%description -n python3-astor
55astor is designed to allow easy manipulation of Python source via the
56AST.
57
58%description -n python3-astor -l pl.UTF-8
59astor powstał, aby umożliwić łatwe operowanie na kodzie źródłowym w
60Pythonie poprzez AST.
61
62%prep
63%setup -q -n astor-%{version}
64
65%build
66%if %{with python2}
67%py_build
68
69%if %{with tests}
70nosetests-%{py_ver} tests
71%endif
72%endif
73
74%if %{with python3}
75%py3_build
76
77%if %{with tests}
78nosetests-%{py3_ver} tests
79%endif
80%endif
81
82%install
83rm -rf $RPM_BUILD_ROOT
84
85%if %{with python2}
86%py_install
87
88%py_postclean
89%endif
90
91%if %{with python3}
92%py3_install
93%endif
94
95%clean
96rm -rf $RPM_BUILD_ROOT
97
98%if %{with python2}
99%files
100%defattr(644,root,root,755)
101%doc AUTHORS LICENSE README.rst
102%{py_sitescriptdir}/astor
103%{py_sitescriptdir}/astor-%{version}-py*.egg-info
104%endif
105
106%if %{with python3}
107%files -n python3-astor
108%defattr(644,root,root,755)
109%doc AUTHORS LICENSE README.rst
110%{py3_sitescriptdir}/astor
111%{py3_sitescriptdir}/astor-%{version}-py*.egg-info
112%endif
This page took 0.082613 seconds and 4 git commands to generate.