3 %bcond_without tests # do not perform "make test"
4 %bcond_without python2 # CPython 2.x module
5 %bcond_without python3 # CPython 3.x module
7 Summary: Python LESS Compiler
8 Summary(pl.UTF-8): Kompilator języka LESS w Pythonie
13 Group: Libraries/Python
14 #Source0Download: https://pypi.python.org/simple/lesscpy
15 Source0: https://files.pythonhosted.org/packages/source/l/lesscpy/lesscpy-%{version}.tar.gz
16 # Source0-md5: 0a5a3ca4091ad3fb62ac6f705f8463d4
17 Patch0: %{name}-tests.patch
18 URL: https://pypi.python.org/pypi/lesscpy
19 BuildRequires: rpm-pythonprov
20 BuildRequires: rpmbuild(macros) >= 1.714
22 BuildRequires: python-modules >= 1:2.6
23 BuildRequires: python-setuptools
25 BuildRequires: python-coverage
26 BuildRequires: python-flake8
27 BuildRequires: python-nose
28 BuildRequires: python-ply
29 BuildRequires: python-six
33 BuildRequires: python3-modules >= 1:3.3
34 BuildRequires: python3-setuptools
36 BuildRequires: python3-coverage
37 BuildRequires: python3-flake8
38 BuildRequires: python3-nose
39 BuildRequires: python3-six
42 Requires: python-modules >= 1:2.6
44 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
47 A compiler written in Python for the LESS language. For those of us
48 not willing or able to have node.js installed in our environment. Not
49 all features of LESS are supported (yet). Some features wil probably
50 never be supported (JavaScript evaluation). This program uses PLY
51 (Python Lex-Yacc) to tokenize / parse the input and is considerably
52 slower than the NodeJS compiler. The plan is to utilize this to build
53 in proper syntax checking and perhaps YUI compressing.
55 %description -l pl.UTF-8
56 Napisany w Pythonie kompilator języka LESS, przeznaczony głównie dla
57 tych, którzy nie chcą lub nie mogą mieć zainstalowanego środowiska
58 node.js. (Jeszcze) nie wszystkie możliwości języka LESS są
59 obsługiwane; niektóre pewnie nigdy nie będą (wykonywania JavaScriptu).
60 Ten kod do analizy wejścia wykorzystuje moduł PLY (Python Lex-Yacc) i
61 jest znacząco wolniejszy od kompilatora NodeJS. Jest plan
62 wykorzystania takiego rozwiązania do stworzenia sprawdzania właściwej
63 składni i może kompresji YUI.
65 %package -n python3-lesscpy
66 Summary: Python LESS Compiler
67 Summary(pl.UTF-8): Kompilator języka LESS w Pythonie
68 Group: Libraries/Python
69 Requires: python3-modules >= 1:3.3
71 %description -n python3-lesscpy
72 A compiler written in Python for the LESS language. For those of us
73 not willing or able to have node.js installed in our environment. Not
74 all features of LESS are supported (yet). Some features wil probably
75 never be supported (JavaScript evaluation). This program uses PLY
76 (Python Lex-Yacc) to tokenize / parse the input and is considerably
77 slower than the NodeJS compiler. The plan is to utilize this to build
78 in proper syntax checking and perhaps YUI compressing.
80 %description -n python3-lesscpy -l pl.UTF-8
81 Napisany w Pythonie kompilator języka LESS, przeznaczony głównie dla
82 tych, którzy nie chcą lub nie mogą mieć zainstalowanego środowiska
83 node.js. (Jeszcze) nie wszystkie możliwości języka LESS są
84 obsługiwane; niektóre pewnie nigdy nie będą (wykonywania JavaScriptu).
85 Ten kod do analizy wejścia wykorzystuje moduł PLY (Python Lex-Yacc) i
86 jest znacząco wolniejszy od kompilatora NodeJS. Jest plan
87 wykorzystania takiego rozwiązania do stworzenia sprawdzania właściwej
88 składni i może kompresji YUI.
91 %setup -q -n lesscpy-%{version}
96 %py_build %{?with_tests:test}
101 %py3_build %{?with_tests:test}
105 rm -rf $RPM_BUILD_ROOT
110 %{__mv} $RPM_BUILD_ROOT%{_bindir}/lesscpy{,-3}
115 # source required for ply to work
116 %py_postclean -x 'parser\.py'
118 %{__mv} $RPM_BUILD_ROOT%{_bindir}/lesscpy{,-2}
119 ln -sf lesscpy-2 $RPM_BUILD_ROOT%{_bindir}/lesscpy
123 rm -rf $RPM_BUILD_ROOT
127 %defattr(644,root,root,755)
128 %doc LICENSE README.rst
129 %attr(755,root,root) %{_bindir}/lesscpy
130 %attr(755,root,root) %{_bindir}/lesscpy-2
131 %{py_sitescriptdir}/lesscpy
132 %{py_sitescriptdir}/lesscpy-%{version}-py*.egg-info
136 %files -n python3-lesscpy
137 %defattr(644,root,root,755)
138 %doc LICENSE README.rst
139 %attr(755,root,root) %{_bindir}/lesscpy-3
140 %{py3_sitescriptdir}/lesscpy
141 %{py3_sitescriptdir}/lesscpy-%{version}-py*.egg-info