]> git.pld-linux.org Git - packages/python3-typed_ast.git/blame - python3-typed_ast.spec
rebuild with separate debuginfo build-ids
[packages/python3-typed_ast.git] / python3-typed_ast.spec
CommitLineData
6a0d703c
JB
1#
2# Conditional build:
3%bcond_without tests # unit tests
4
5Summary: Python 2 and 3 ast modules with type comment support
6Summary(pl.UTF-8): Moduły ast z Pythona 2 i 3 z obsługą komentarzy o typach
7Name: python3-typed_ast
44bb4d1f 8Version: 1.4.2
ad2dd8b9 9Release: 2
6a0d703c
JB
10License: Apache v2.0
11Group: Libraries/Python
12#Source0Download: https://pypi.org/simple/typed-ast/
13Source0: https://files.pythonhosted.org/packages/source/t/typed-ast/typed_ast-%{version}.tar.gz
44bb4d1f 14# Source0-md5: 5aaec45a8259fd9dd13e7fe938a5565d
6a0d703c
JB
15URL: https://pypi.org/project/typed-ast/
16BuildRequires: python3-modules >= 1:3.5
17BuildRequires: python3-setuptools
18%if %{with tests}
19BuildRequires: python3-pytest
20%endif
21BuildRequires: rpm-pythonprov
22BuildRequires: rpmbuild(macros) >= 1.714
23Requires: python3-modules >= 1:3.5
24BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
25
26%description
27typed_ast is a Python 3 package that provides a Python 2.7 and Python 3
28parser similar to the standard ast library. Unlike ast, the parsers in
29typed_ast include PEP 484 type comments and are independent of the
30version of Python under which they are run. The typed_ast parsers
31produce the standard Python AST (plus type comments), and are both
32fast and correct, as they are based on the CPython 2.7 and 3.7
33parsers. typed_ast runs on CPython 3.5-3.8 on Linux, OS X and Windows.
34
35%description -l pl.UTF-8
36typed_ast to pakiet Pythona 3 udostępniający parser dla Pythona 2.7
37oraz Pythona 3, podobny do biblioteki standardowej ast. W
38przeciwieństwie do ast, parsery w module typed_ast zawierają
39komentarze o typach zgodne z PEP 484 i są niezależne od wersji
40Pythona, przez którą są uruchamiane. Parsery typed_ast tworzą
41standardowe pythonowe drzewo składniowe (AST), wzbogacone o komentarze
42o typach; są szybkie i poprawne, jako że są oparte na kodzie CPythona
432.7 oraz 3.7. typed_ast działa na CPythonie 3.5-3.8 pod Linuksem, OS X
44oraz Windows.
45
46%prep
47%setup -q -n typed_ast-%{version}
48
49%build
50%py3_build
51
52%if %{with tests}
53export PYTHONPATH=$(echo $(pwd)/build-3/lib.*)
54# run from subdir, so python won't catch PWD as PYTHONPATH
55cd ast3
56%{__python3} -m pytest tests
57%endif
58
59%install
60rm -rf $RPM_BUILD_ROOT
61
62%py3_install
63
19fa8e70
JB
64%{__rm} -r $RPM_BUILD_ROOT%{py3_sitedir}/typed_ast/tests
65
6a0d703c
JB
66%clean
67rm -rf $RPM_BUILD_ROOT
68
69%files
70%defattr(644,root,root,755)
71%doc LICENSE README.md
19fa8e70
JB
72%dir %{py3_sitedir}/typed_ast
73%attr(755,root,root) %{py3_sitedir}/typed_ast/_ast*.cpython-*.so
74%{py3_sitedir}/typed_ast/*.py
75%{py3_sitedir}/typed_ast/__pycache__
6a0d703c 76%{py3_sitedir}/typed_ast-%{version}-py*.egg-info
This page took 0.049753 seconds and 4 git commands to generate.