Пакет python3-module-astroid: Specfile

%define _unpackaged_files_terminate_build 1
%define oname astroid

%def_with check

Name: python3-module-%oname
Version: 2.2.5
Release: alt1

Summary: Python Abstract Syntax Tree New Generation
License: LGPLv2.1+
Group: Development/Python3
# Source-git: https://github.com/PyCQA/astroid.git
Url: https://pypi.org/project/astroid

Source: %name-%version.tar

BuildRequires(pre): rpm-build-python3
BuildRequires: python3-module-pytest-runner

%if_with check
BuildRequires: python3-module-lazy-object-proxy
BuildRequires: python3-module-nose
BuildRequires: python3-module-pytest
BuildRequires: python3-module-wrapt
BuildRequires: python3-module-numpy
BuildRequires: python3-module-typed_ast
BuildRequires: python3-module-dateutil
BuildRequires: python3-module-tox
%endif

BuildArch: noarch
%py3_requires typed_ast

%description
The aim of this module is to provide a common base representation of python
source code. It is currently the powering pylint's capabilities.

It provides a compatible representation which comes from the _ast module. It
rebuilds the tree generated by the builtin _ast module by recursively walking
down the AST and building an extended ast. The new node classes have additional
methods and attributes for different usages. They include some support for
static inference and local name scopes. Furthermore, astroid can also build
partial trees by inspecting living objects.

%prep
%setup

%build
%python3_build

%install
%python3_install

%check
grep -qs '[[:space:]]*attr[[:space:]]*$' tox.ini || exit 1
grep -qs '[[:space:]]*coverage[[:space:]]*$' tox.ini || exit 1
grep -qs ' {envsitepackagesdir}/coverage run ' tox.ini || exit 1
grep -qsF 'py36: typed_ast<1.3.0' tox.ini || exit 1

sed -i '/[[:space:]]*attr[[:space:]]*$/d' tox.ini
sed -i '/[[:space:]]*coverage[[:space:]]*$/d' tox.ini
sed -i 's/ {envsitepackagesdir}\/coverage run / /' tox.ini
sed -i 's/py36: typed_ast<1\.3\.0/py36: typed_ast>=1.3.0/' tox.ini

export PIP_NO_INDEX=YES
export PIP_NO_DEPS=YES
export TOXENV=py%{python_version_nodots python3}
tox.py3 --sitepackages -p auto -o -v

%files
%doc ChangeLog README.rst
%python3_sitelibdir/astroid/
%python3_sitelibdir/astroid-*.egg-info/

%changelog
* Sun Mar 17 2019 Stanislav Levin <slev@altlinux.org> 2.2.5-alt1
- 2.1.0 -> 2.2.5.

* Mon Jan 14 2019 Stanislav Levin <slev@altlinux.org> 2.1.0-alt1
- 2.0.4 -> 2.1.0.

* Mon Sep 03 2018 Stanislav Levin <slev@altlinux.org> 2.0.4-alt1
- Move Python3 module to a separated src package.
- 1.6.4 -> 2.0.4.

* Fri May 25 2018 Stanislav Levin <slev@altlinux.org> 1.6.4-alt1
- 1.5.3 -> 1.6.4

* Fri Oct 20 2017 Aleksei Nikiforov <darktemplar@altlinux.org> 1.5.3-alt3
- Updated runtime dependencies.

* Thu Aug 17 2017 Aleksei Nikiforov <darktemplar@altlinux.org> 1.5.3-alt2
- Fixed build.

* Tue Aug 01 2017 Aleksei Nikiforov <darktemplar@altlinux.org> 1.5.3-alt1
- Updated to upstream version 1.5.3.

* Mon Mar 14 2016 Denis Medvedev <nbr@altlinux.org> 1.4.4-alt1
- Upstream switched to git. New version 1.4.4

* Thu Jan 28 2016 Mikhail Efremov <sem@altlinux.org> 1.3.8-alt1.1
- NMU: Use buildreq for BR.

* Thu Aug 13 2015 Eugeny A. Rostovtsev (REAL) <real at altlinux.org> 1.3.8-alt1
- Version 1.3.8

* Thu Dec 04 2014 Eugeny A. Rostovtsev (REAL) <real at altlinux.org> 1.3.2-alt1
- Version 1.3.2 (ALT #30535)

* Wed Mar 19 2014 Timur Aitov <timonbl4@altlinux.org> 1.0.1-alt1
- Version 1.0.1

* Mon Apr 01 2013 Eugeny A. Rostovtsev (REAL) <real at altlinux.org> 0.24.2-alt1.hg20130227
- Version 0.24.2

* Fri Mar 22 2013 Aleksey Avdeev <solo@altlinux.ru> 0.23.1-alt1.hg20120119.1
- Rebuild with Python-3.3

* Fri Jun 22 2012 Eugeny A. Rostovtsev (REAL) <real at altlinux.org> 0.23.1-alt1.hg20120119
- Version 0.23.1
- Added module for Python 3

* Sat Nov 26 2011 Eugeny A. Rostovtsev (REAL) <real at altlinux.org> 0.23.0-alt1
- Version 0.23.0

* Thu Oct 20 2011 Vitaly Kuznetsov <vitty@altlinux.ru> 0.20.3-alt1.1
- Rebuild with Python-2.7

* Wed Sep 29 2010 Andrey Rahmatullin <wrar@altlinux.org> 0.20.3-alt1
- 0.20.3

* Mon Sep 13 2010 Andrey Rahmatullin <wrar@altlinux.org> 0.20.2-alt1
- 0.20.2

* Mon Sep 06 2010 Andrey Rahmatullin <wrar@altlinux.org> 0.20.1-alt2
- run tests

* Fri May 14 2010 Andrey Rahmatullin <wrar@altlinux.ru> 0.20.1-alt1
- 0.20.1

* Fri Mar 26 2010 Andrey Rahmatullin <wrar@altlinux.ru> 0.20.0-alt1
- 0.20.0

* Fri Dec 18 2009 Andrey Rahmatullin <wrar@altlinux.ru> 0.19.3-alt1
- 0.19.3

* Fri Dec 18 2009 Andrey Rahmatullin <wrar@altlinux.ru> 0.19.2-alt1
- 0.19.2

* Thu Nov 12 2009 Eugeny A. Rostovtsev (REAL) <real at altlinux.org> 0.19.1-alt1.1
- Rebuilt with python 2.6

* Fri Sep 04 2009 Andrey Rahmatullin <wrar@altlinux.ru> 0.19.1-alt1
- 0.19.1

* Thu Mar 26 2009 Andrey Rahmatullin <wrar@altlinux.ru> 0.19.0-alt1
- 0.19.0

* Sun Mar 22 2009 Andrey Rahmatullin <wrar@altlinux.ru> 0.18.0-alt1
- 0.18.0

* Sun Feb 22 2009 Andrey Rahmatullin <wrar@altlinux.ru> 0.17.4-alt2
- use %%python_{build,install}

* Tue Dec 02 2008 Andrey Rahmatullin <wrar@altlinux.ru> 0.17.4-alt1
- 0.17.4

* Sun Oct 12 2008 Andrey Rahmatullin <wrar@altlinux.ru> 0.17.3-alt1
- 0.17.3
- spec cleanup
- probably fix automatic dependency search
- don't package tests

* Thu Jan 24 2008 Grigory Batalov <bga@altlinux.ru> 0.16.3-alt1.1
- Rebuilt with python-2.5.

* Wed Dec 6 2006 Andrey Khavryuchenko <akhavr@altlinux.org> 0.16.3-alt1
- Initial build for ALT Linux