From: Jakub Bogusz Date: Fri, 25 Oct 2019 17:40:19 +0000 (+0200) Subject: - new, python3 only X-Git-Tag: auto/th/python3-typed_ast-1.4.0-1 X-Git-Url: http://git.pld-linux.org/?p=packages%2Fpython3-typed_ast.git;a=commitdiff_plain;h=6a0d703c936c46426100754d39eee23dd00cdb6e - new, python3 only --- 6a0d703c936c46426100754d39eee23dd00cdb6e diff --git a/python3-typed_ast.spec b/python3-typed_ast.spec new file mode 100644 index 0000000..310d0b1 --- /dev/null +++ b/python3-typed_ast.spec @@ -0,0 +1,71 @@ +# +# Conditional build: +%bcond_without tests # unit tests + +Summary: Python 2 and 3 ast modules with type comment support +Summary(pl.UTF-8): Moduły ast z Pythona 2 i 3 z obsługą komentarzy o typach +Name: python3-typed_ast +Version: 1.4.0 +Release: 1 +License: Apache v2.0 +Group: Libraries/Python +#Source0Download: https://pypi.org/simple/typed-ast/ +Source0: https://files.pythonhosted.org/packages/source/t/typed-ast/typed_ast-%{version}.tar.gz +# Source0-md5: 9a3dd35e136427313465faa75f3110da +URL: https://pypi.org/project/typed-ast/ +BuildRequires: python3-modules >= 1:3.5 +BuildRequires: python3-setuptools +%if %{with tests} +BuildRequires: python3-pytest +%endif +BuildRequires: rpm-pythonprov +BuildRequires: rpmbuild(macros) >= 1.714 +Requires: python3-modules >= 1:3.5 +BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) + +%description +typed_ast is a Python 3 package that provides a Python 2.7 and Python 3 +parser similar to the standard ast library. Unlike ast, the parsers in +typed_ast include PEP 484 type comments and are independent of the +version of Python under which they are run. The typed_ast parsers +produce the standard Python AST (plus type comments), and are both +fast and correct, as they are based on the CPython 2.7 and 3.7 +parsers. typed_ast runs on CPython 3.5-3.8 on Linux, OS X and Windows. + +%description -l pl.UTF-8 +typed_ast to pakiet Pythona 3 udostępniający parser dla Pythona 2.7 +oraz Pythona 3, podobny do biblioteki standardowej ast. W +przeciwieństwie do ast, parsery w module typed_ast zawierają +komentarze o typach zgodne z PEP 484 i są niezależne od wersji +Pythona, przez którą są uruchamiane. Parsery typed_ast tworzą +standardowe pythonowe drzewo składniowe (AST), wzbogacone o komentarze +o typach; są szybkie i poprawne, jako że są oparte na kodzie CPythona +2.7 oraz 3.7. typed_ast działa na CPythonie 3.5-3.8 pod Linuksem, OS X +oraz Windows. + +%prep +%setup -q -n typed_ast-%{version} + +%build +%py3_build + +%if %{with tests} +export PYTHONPATH=$(echo $(pwd)/build-3/lib.*) +# run from subdir, so python won't catch PWD as PYTHONPATH +cd ast3 +%{__python3} -m pytest tests +%endif + +%install +rm -rf $RPM_BUILD_ROOT + +%py3_install + +%clean +rm -rf $RPM_BUILD_ROOT + +%files +%defattr(644,root,root,755) +%doc LICENSE README.md +%{py3_sitedir}/typed_ast +%{py3_sitedir}/typed_ast-%{version}-py*.egg-info