From 91f2339e680c774e25940454866f28ece6d60e52 Mon Sep 17 00:00:00 2001 From: Robert Kuska Date: Nov 11 2015 12:05:17 +0000 Subject: Turn off pylint check --- diff --git a/atomic.spec b/atomic.spec index 779fab3..d7a7382 100644 --- a/atomic.spec +++ b/atomic.spec @@ -24,11 +24,18 @@ License: LGPLv2+ URL: https://github.com/projectatomic/atomic ExclusiveArch: x86_64 Source0: https://github.com/projectatomic/%{name}/archive/%{commit}.tar.gz +# https://github.com/projectatomic/atomic/pull/204 +# Note for maintainer, pylint is problematic packages as it depends on +# astroid and astroid uses private api of python3 therefore its unstable +# when new version of python3 is released, as happened now with python3.5 +# release. pylint cant be build because astroid doesnt work with python3.5, +# therefore I switch off pylint check for build of rpm +Patch0: separate-pylint-from-python-build.patch BuildRequires: %{pypkg}-devel -%if 0%{?fedora} -BuildRequires: %{pylint} -%endif +#%if 0%{?fedora} +#BuildRequires: %{pylint} +#%endif BuildRequires: %{pypkg}-requests >= 2.4.3 BuildRequires: %{pypkg}-setuptools BuildRequires: %{pypkg}-tools @@ -65,12 +72,14 @@ management. if [ %{pypkg} == 'python3' ]; then sed -i 's/input = raw_input/pass/' Atomic/util.py fi +%patch0 -p1 %build -make PYTHON=%{__python} PYLINT=%{?pylint} all +make PYTHON=%{__python} python-build +make PYTHON=%{__python} docs %install -make PYTHON=%{__python} PYLINT=%{?pylint} install DESTDIR=%{buildroot} +make PYTHON=%{__python} install-only DESTDIR=%{buildroot} %check [ ! -w /run/docker.sock ] || make PYTHON=%{__python} test diff --git a/separate-pylint-from-python-build.patch b/separate-pylint-from-python-build.patch new file mode 100644 index 0000000..af166df --- /dev/null +++ b/separate-pylint-from-python-build.patch @@ -0,0 +1,42 @@ +diff -up atomic-8a66e2950de23da470122980a5649f14d0f294a7/Makefile.pylint atomic-8a66e2950de23da470122980a5649f14d0f294a7/Makefile +--- atomic-8a66e2950de23da470122980a5649f14d0f294a7/Makefile.pylint 2015-11-10 13:01:13.000000000 +0100 ++++ atomic-8a66e2950de23da470122980a5649f14d0f294a7/Makefile 2015-11-11 12:24:16.942917135 +0100 +@@ -7,7 +7,7 @@ PYLINT ?= /usr/bin/pylint + GO_MD2MAN ?= /usr/bin/go-md2man + + .PHONY: all +-all: python-build docs ++all: python-build docs pylint-check + + .PHONY: test + test: +@@ -16,6 +16,8 @@ test: + .PHONY: python-build + python-build: + $(PYTHON) setup.py build ++ ++pylint-check: + $(PYLINT) -E --additional-builtins=_ *.py atomic Atomic tests/unit/*.py + + MANPAGES_MD = $(wildcard docs/*.md) +diff -up atomic-8a66e2950de23da470122980a5649f14d0f294a7/Makefile.pylint atomic-8a66e2950de23da470122980a5649f14d0f294a7/Makefile +--- atomic-8a66e2950de23da470122980a5649f14d0f294a7/Makefile.pylint 2015-11-11 12:51:18.814015403 +0100 ++++ atomic-8a66e2950de23da470122980a5649f14d0f294a7/Makefile 2015-11-11 12:51:56.626414033 +0100 +@@ -33,8 +33,8 @@ clean: + $(PYTHON) setup.py clean + -rm -rf build *~ \#* *pyc .#* docs/*.1 + +-.PHONY: install +-install: all ++.PHONY: install-only ++install-only: + $(PYTHON) setup.py install --install-scripts /usr/share/atomic `test -n "$(DESTDIR)" && echo --root $(DESTDIR)` + + install -d -m 0755 $(DESTDIR)/usr/bin +@@ -50,3 +50,6 @@ install: all + install -m 644 $(basename $(MANPAGES_MD)) $(PREFIX)/share/man/man1 + + echo ".so man1/atomic-push.1" > $(PREFIX)/share/man/man1/atomic-upload.1 ++ ++.PHONY: install ++install: all install-only