[packages/python-astroid] - up to 2.3.2; has anyone used this package? astroid 2.x is python3-only

qboosh qboosh at pld-linux.org
Fri Oct 25 21:01:59 CEST 2019


commit c8eef9e6a7718b8b9e35109598882aa8dcaad188
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Fri Oct 25 21:05:34 2019 +0200

    - up to 2.3.2; has anyone used this package? astroid 2.x is python3-only

 python-astroid.spec | 69 ++++++++++++++++++++++++++++++++++++++---------------
 1 file changed, 50 insertions(+), 19 deletions(-)
---
diff --git a/python-astroid.spec b/python-astroid.spec
index f422c7a..08c6247 100644
--- a/python-astroid.spec
+++ b/python-astroid.spec
@@ -1,19 +1,20 @@
 #
 # Conditional build:
-%bcond_without  python2 # Python 2.x module
-%bcond_without  python3 # Python 3.x module
+%bcond_without	tests	# unit tests
+%bcond_with	python2	# Python 2.x module
+%bcond_without	python3	# Python 3.x module
 
 %define	module	astroid
 Summary:	An abstract syntax tree for Python 2 with inference support
 Summary(pl.UTF-8):	Abstrakcyjnego drzewa składniowe dla Pythona 2 z obsługą wywodu
 Name:		python-%{module}
-Version:	2.3.1
-Release:	2
+Version:	2.3.2
+Release:	1
 License:	LGPL v2.1+
 Group:		Development/Languages/Python
-#Source0Download: https://pypi.python.org/pypi/astroid/
+#Source0Download: https://pypi.org/simple/astroid/
 Source0:	https://files.pythonhosted.org/packages/source/a/astroid/astroid-%{version}.tar.gz
-# Source0-md5:	006fa7ae21f6b9ca4bcd92f64f94d0e5
+# Source0-md5:	b2cd5c0383ff33c1410e737c2607aa7a
 Patch0:		%{name}-deps.patch
 URL:		https://github.com/PyCQA/astroid
 %if %{with python2}
@@ -21,24 +22,38 @@ BuildRequires:	python-devel >= 1:2.7
 BuildRequires:	python-modules >= 1:2.7
 BuildRequires:	python-pytest-runner
 BuildRequires:	python-setuptools >= 7.0
+%if %{with tests}
+BuildRequires:	python-lazy-object-proxy >= 1.4
+BuildRequires:	python-pytest
+BuildRequires:	python-six >= 1.12
+BuildRequires:	python-typed_ast >= 1.4.0
+BuildRequires:	python-typed_ast < 1.5
+BuildRequires:	python-wrapt >= 1.11
+%endif
 %endif
 %if %{with python3}
-BuildRequires:	python3-devel >= 1:3.3
-BuildRequires:	python3-modules >= 1:3.3
+BuildRequires:	python3-devel >= 1:3.5
+BuildRequires:	python3-modules >= 1:3.5
 BuildRequires:	python3-pytest-runner
 BuildRequires:	python3-setuptools >= 7.0
-BuildRequires:	rpm-pythonprov
-BuildRequires:	rpmbuild(macros) >= 1.710
+%if %{with tests}
+BuildRequires:	python3-lazy-object-proxy >= 1.4
+BuildRequires:	python3-pytest
+BuildRequires:	python3-six >= 1.12
+%if "%{py3_ver}" < "3.8"
+BuildRequires:	python3-typed_ast >= 1.4.0
+BuildRequires:	python3-typed_ast < 1.5
+%endif
+BuildRequires:	python3-wrapt >= 1.11
 %endif
+%endif
+BuildRequires:	rpm-pythonprov
+BuildRequires:	rpmbuild(macros) >= 1.714
 Requires:	python-modules >= 1:2.7
-Requires:	python-six
 Obsoletes:	python-logilab-astng
 BuildArch:	noarch
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
-# current Python 3.x provides all these
-%define		_noautoreq	python3egg.backports.functools-lru-cache python3egg.enum34 python3egg.singledispatch
-
 %description
 The aim of this module is to provide a common base representation of
 Python source code for projects such as pychecker, pyreverse,
@@ -56,8 +71,13 @@ potrzebami pylinta. Dawniej nazywała się logilab-astng.
 Summary:	An abstract syntax tree for Python 3 with inference support
 Summary(pl.UTF-8):	Abstrakcyjnego drzewa składniowe dla Pythona 3 z obsługą wywodu
 Group:		Development/Languages/Python
-Requires:	python3-modules >= 1:3.3
-Requires:	python3-six
+Requires:	python3-modules >= 1:3.5
+%if "%{py3_ver}" < "3.8"
+# not detected by rpm from rule:
+# [:implementation_name == "cpython" and python_version < "3.8"]
+Requires:	python3-typed_ast >= 1.4.0
+Requires:	python3-typed_ast < 1.5
+%endif
 Obsoletes:	python3-logilab-astng
 
 %description -n python3-%{module}
@@ -77,15 +97,26 @@ potrzebami pylinta. Dawniej nazywała się logilab-astng.
 %setup -q -n %{module}-%{version}
 %patch0 -p1
 
-# drop python 2.5 egg deps
-%{__rm} */*/*/*/*/*py2.5.egg
+# non-deterministic (skipped if numpy not installed; unittest_brain_numpy_core_multiarray.py fails with numpy 1.16.5
+%{__rm} astroid/tests/unittest_brain_numpy_*
+# test_knownValues_get_builtin_module_part fails
+%{__rm} astroid/tests/unittest_modutils.py
 
 %build
 %if %{with python2}
 %py_build
+
+%if %{with tests}
+%{__python} -m pytest astroid/tests
+%endif
 %endif
+
 %if %{with python3}
-%py3_build --build-base=build3
+%py3_build
+
+%if %{with tests}
+%{__python3} -m pytest astroid/tests
+%endif
 %endif
 
 %install
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/python-astroid.git/commitdiff/c8eef9e6a7718b8b9e35109598882aa8dcaad188



More information about the pld-cvs-commit mailing list