[packages/python-lesscpy] - new - added tests patch for paths containing version (as used with build-base)

qboosh qboosh at pld-linux.org
Sat Oct 15 18:16:15 CEST 2016


commit 4edceab92ca45346085452c775567b28aee115dd
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Sat Oct 15 18:18:10 2016 +0200

    - new
    - added tests patch for paths containing version (as used with build-base)

 python-lesscpy-tests.patch |  11 ++++
 python-lesscpy.spec        | 141 +++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 152 insertions(+)
---
diff --git a/python-lesscpy.spec b/python-lesscpy.spec
new file mode 100644
index 0000000..c1c0d2c
--- /dev/null
+++ b/python-lesscpy.spec
@@ -0,0 +1,141 @@
+#
+# Conditional build:
+%bcond_without	tests	# do not perform "make test"
+%bcond_without	python2 # CPython 2.x module
+%bcond_without	python3 # CPython 3.x module
+
+Summary:	Python LESS Compiler
+Summary(pl.UTF-8):	Kompilator języka LESS w Pythonie
+Name:		python-lesscpy
+Version:	0.12.0
+Release:	1
+License:	MIT
+Group:		Libraries/Python
+#Source0Download: https://pypi.python.org/simple/lesscpy
+Source0:	https://files.pythonhosted.org/packages/source/l/lesscpy/lesscpy-%{version}.tar.gz
+# Source0-md5:	0a5a3ca4091ad3fb62ac6f705f8463d4
+Patch0:		%{name}-tests.patch
+URL:		https://pypi.python.org/pypi/lesscpy
+BuildRequires:	rpm-pythonprov
+BuildRequires:	rpmbuild(macros) >= 1.714
+%if %{with python2}
+BuildRequires:	python-modules >= 1:2.6
+BuildRequires:	python-setuptools
+%if %{with tests}
+BuildRequires:	python-coverage
+BuildRequires:	python-flake8
+BuildRequires:	python-nose
+BuildRequires:	python-ply
+BuildRequires:	python-six
+%endif
+%endif
+%if %{with python3}
+BuildRequires:	python3-modules >= 1:3.3
+BuildRequires:	python3-setuptools
+%if %{with tests}
+BuildRequires:	python3-coverage
+BuildRequires:	python3-flake8
+BuildRequires:	python3-nose
+BuildRequires:	python3-six
+%endif
+%endif
+Requires:	python-modules >= 1:2.6
+BuildArch:	noarch
+BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+A compiler written in Python for the LESS language. For those of us
+not willing or able to have node.js installed in our environment. Not
+all features of LESS are supported (yet). Some features wil probably
+never be supported (JavaScript evaluation). This program uses PLY
+(Python Lex-Yacc) to tokenize / parse the input and is considerably
+slower than the NodeJS compiler. The plan is to utilize this to build
+in proper syntax checking and perhaps YUI compressing.
+
+%description -l pl.UTF-8
+Napisany w Pythonie kompilator języka LESS, przeznaczony głównie dla
+tych, którzy nie chcą lub nie mogą mieć zainstalowanego środowiska
+node.js. (Jeszcze) nie wszystkie możliwości języka LESS są
+obsługiwane; niektóre pewnie nigdy nie będą (wykonywania JavaScriptu).
+Ten kod do analizy wejścia wykorzystuje moduł PLY (Python Lex-Yacc) i
+jest znacząco wolniejszy od kompilatora NodeJS. Jest plan
+wykorzystania takiego rozwiązania do stworzenia sprawdzania właściwej
+składni i może kompresji YUI.
+
+%package -n python3-lesscpy
+Summary:	Python LESS Compiler
+Summary(pl.UTF-8):	Kompilator języka LESS w Pythonie
+Group:		Libraries/Python
+Requires:	python3-modules >= 1:3.3
+
+%description -n python3-lesscpy
+A compiler written in Python for the LESS language. For those of us
+not willing or able to have node.js installed in our environment. Not
+all features of LESS are supported (yet). Some features wil probably
+never be supported (JavaScript evaluation). This program uses PLY
+(Python Lex-Yacc) to tokenize / parse the input and is considerably
+slower than the NodeJS compiler. The plan is to utilize this to build
+in proper syntax checking and perhaps YUI compressing.
+
+%description -n python3-lesscpy -l pl.UTF-8
+Napisany w Pythonie kompilator języka LESS, przeznaczony głównie dla
+tych, którzy nie chcą lub nie mogą mieć zainstalowanego środowiska
+node.js. (Jeszcze) nie wszystkie możliwości języka LESS są
+obsługiwane; niektóre pewnie nigdy nie będą (wykonywania JavaScriptu).
+Ten kod do analizy wejścia wykorzystuje moduł PLY (Python Lex-Yacc) i
+jest znacząco wolniejszy od kompilatora NodeJS. Jest plan
+wykorzystania takiego rozwiązania do stworzenia sprawdzania właściwej
+składni i może kompresji YUI.
+
+%prep
+%setup -q -n lesscpy-%{version}
+%patch0 -p1
+
+%build
+%if %{with python2}
+%py_build %{?with_tests:test}
+%endif
+
+%if %{with python3}
+LC_ALL=en_US.UTF-8 \
+%py3_build %{?with_tests:test}
+%endif
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%if %{with python3}
+%py3_install
+
+%{__mv} $RPM_BUILD_ROOT%{_bindir}/lesscpy{,-3}
+%endif
+
+%if %{with python2}
+%py_install
+%py_postclean
+
+%{__mv} $RPM_BUILD_ROOT%{_bindir}/lesscpy{,-2}
+ln -sf lesscpy-3 $RPM_BUILD_ROOT%{_bindir}/lesscpy
+%endif
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%if %{with python2}
+%files
+%defattr(644,root,root,755)
+%doc LICENSE README.rst
+%attr(755,root,root) %{_bindir}/lesscpy
+%attr(755,root,root) %{_bindir}/lesscpy-2
+%{py_sitescriptdir}/lesscpy
+%{py_sitescriptdir}/lesscpy-%{version}-py*.egg-info
+%endif
+
+%if %{with python3}
+%files -n python3-lesscpy
+%defattr(644,root,root,755)
+%doc LICENSE README.rst
+%attr(755,root,root) %{_bindir}/lesscpy-3
+%{py3_sitescriptdir}/lesscpy
+%{py3_sitescriptdir}/lesscpy-%{version}-py*.egg-info
+%endif
diff --git a/python-lesscpy-tests.patch b/python-lesscpy-tests.patch
new file mode 100644
index 0000000..5681f0a
--- /dev/null
+++ b/python-lesscpy-tests.patch
@@ -0,0 +1,11 @@
+--- lesscpy-0.12.0/test/core.py.orig	2016-10-04 11:49:17.000000000 +0200
++++ lesscpy-0.12.0/test/core.py	2016-10-15 10:19:40.728402647 +0200
+@@ -24,7 +24,7 @@
+     else:
+         LESS = glob.glob(os.path.join(_less_path, '*.less'))
+     for less in LESS:
+-        lessf = less.split('.')[0].split('/')[-1]
++        lessf = less.split('/')[-1].split('.')[0]
+         css = os.path.join(_css_path, lessf + '.css')
+         if css_minimized:
+             mincss = os.path.join(_css_path, lessf + '.min.css')
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/python-lesscpy.git/commitdiff/4edceab92ca45346085452c775567b28aee115dd



More information about the pld-cvs-commit mailing list