]> git.pld-linux.org Git - packages/python-lesscpy.git/blame - python-lesscpy.spec
- typo, release 2
[packages/python-lesscpy.git] / python-lesscpy.spec
CommitLineData
4edceab9
JB
1#
2# Conditional build:
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
6
7Summary: Python LESS Compiler
8Summary(pl.UTF-8): Kompilator języka LESS w Pythonie
9Name: python-lesscpy
10Version: 0.12.0
cb1eee43 11Release: 2
4edceab9
JB
12License: MIT
13Group: Libraries/Python
14#Source0Download: https://pypi.python.org/simple/lesscpy
15Source0: https://files.pythonhosted.org/packages/source/l/lesscpy/lesscpy-%{version}.tar.gz
16# Source0-md5: 0a5a3ca4091ad3fb62ac6f705f8463d4
17Patch0: %{name}-tests.patch
18URL: https://pypi.python.org/pypi/lesscpy
19BuildRequires: rpm-pythonprov
20BuildRequires: rpmbuild(macros) >= 1.714
21%if %{with python2}
22BuildRequires: python-modules >= 1:2.6
23BuildRequires: python-setuptools
24%if %{with tests}
25BuildRequires: python-coverage
26BuildRequires: python-flake8
27BuildRequires: python-nose
28BuildRequires: python-ply
29BuildRequires: python-six
30%endif
31%endif
32%if %{with python3}
33BuildRequires: python3-modules >= 1:3.3
34BuildRequires: python3-setuptools
35%if %{with tests}
36BuildRequires: python3-coverage
37BuildRequires: python3-flake8
38BuildRequires: python3-nose
39BuildRequires: python3-six
40%endif
41%endif
42Requires: python-modules >= 1:2.6
43BuildArch: noarch
44BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
45
46%description
47A compiler written in Python for the LESS language. For those of us
48not willing or able to have node.js installed in our environment. Not
49all features of LESS are supported (yet). Some features wil probably
50never be supported (JavaScript evaluation). This program uses PLY
51(Python Lex-Yacc) to tokenize / parse the input and is considerably
52slower than the NodeJS compiler. The plan is to utilize this to build
53in proper syntax checking and perhaps YUI compressing.
54
55%description -l pl.UTF-8
56Napisany w Pythonie kompilator języka LESS, przeznaczony głównie dla
57tych, którzy nie chcą lub nie mogą mieć zainstalowanego środowiska
58node.js. (Jeszcze) nie wszystkie możliwości języka LESS są
59obsługiwane; niektóre pewnie nigdy nie będą (wykonywania JavaScriptu).
60Ten kod do analizy wejścia wykorzystuje moduł PLY (Python Lex-Yacc) i
61jest znacząco wolniejszy od kompilatora NodeJS. Jest plan
62wykorzystania takiego rozwiązania do stworzenia sprawdzania właściwej
63składni i może kompresji YUI.
64
65%package -n python3-lesscpy
66Summary: Python LESS Compiler
67Summary(pl.UTF-8): Kompilator języka LESS w Pythonie
68Group: Libraries/Python
69Requires: python3-modules >= 1:3.3
70
71%description -n python3-lesscpy
72A compiler written in Python for the LESS language. For those of us
73not willing or able to have node.js installed in our environment. Not
74all features of LESS are supported (yet). Some features wil probably
75never be supported (JavaScript evaluation). This program uses PLY
76(Python Lex-Yacc) to tokenize / parse the input and is considerably
77slower than the NodeJS compiler. The plan is to utilize this to build
78in proper syntax checking and perhaps YUI compressing.
79
80%description -n python3-lesscpy -l pl.UTF-8
81Napisany w Pythonie kompilator języka LESS, przeznaczony głównie dla
82tych, którzy nie chcą lub nie mogą mieć zainstalowanego środowiska
83node.js. (Jeszcze) nie wszystkie możliwości języka LESS są
84obsługiwane; niektóre pewnie nigdy nie będą (wykonywania JavaScriptu).
85Ten kod do analizy wejścia wykorzystuje moduł PLY (Python Lex-Yacc) i
86jest znacząco wolniejszy od kompilatora NodeJS. Jest plan
87wykorzystania takiego rozwiązania do stworzenia sprawdzania właściwej
88składni i może kompresji YUI.
89
90%prep
91%setup -q -n lesscpy-%{version}
92%patch0 -p1
93
94%build
95%if %{with python2}
96%py_build %{?with_tests:test}
97%endif
98
99%if %{with python3}
100LC_ALL=en_US.UTF-8 \
101%py3_build %{?with_tests:test}
102%endif
103
104%install
105rm -rf $RPM_BUILD_ROOT
106
107%if %{with python3}
108%py3_install
109
110%{__mv} $RPM_BUILD_ROOT%{_bindir}/lesscpy{,-3}
111%endif
112
113%if %{with python2}
114%py_install
115%py_postclean
116
117%{__mv} $RPM_BUILD_ROOT%{_bindir}/lesscpy{,-2}
cb1eee43 118ln -sf lesscpy-2 $RPM_BUILD_ROOT%{_bindir}/lesscpy
4edceab9
JB
119%endif
120
121%clean
122rm -rf $RPM_BUILD_ROOT
123
124%if %{with python2}
125%files
126%defattr(644,root,root,755)
127%doc LICENSE README.rst
128%attr(755,root,root) %{_bindir}/lesscpy
129%attr(755,root,root) %{_bindir}/lesscpy-2
130%{py_sitescriptdir}/lesscpy
131%{py_sitescriptdir}/lesscpy-%{version}-py*.egg-info
132%endif
133
134%if %{with python3}
135%files -n python3-lesscpy
136%defattr(644,root,root,755)
137%doc LICENSE README.rst
138%attr(755,root,root) %{_bindir}/lesscpy-3
139%{py3_sitescriptdir}/lesscpy
140%{py3_sitescriptdir}/lesscpy-%{version}-py*.egg-info
141%endif
This page took 0.14496 seconds and 4 git commands to generate.