15
0

Accepting request 305725 from home:benoit_monin:branches:devel:languages:python

- update to 0.10.2
- add python-setuptools and python-six as build dependencies
- add python-coverage, python-flake8 and python-nose as test dependencies
- add python-six as runtime dependency
- remove some failing tests which rely on find_and_load_cases
- run the tests via setup.py
- fix alternatives for lesscpy binary

OBS-URL: https://build.opensuse.org/request/show/305725
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-lesscpy?expand=0&rev=8
This commit is contained in:
Jan Matejek
2015-05-07 12:04:20 +00:00
committed by Git OBS Bridge
parent 5ebeaaf81a
commit e5546baf19
4 changed files with 33 additions and 9 deletions

View File

@@ -1,7 +1,7 @@
#
# spec file for package python-lesscpy
#
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -17,7 +17,7 @@
Name: python-lesscpy
Version: 0.9j
Version: 0.10.2
Release: 0
Url: https://github.com/robotis/lesscpy
Summary: Lesscss compiler
@@ -26,9 +26,15 @@ Group: Development/Languages/Python
Source: http://pypi.python.org/packages/source/l/lesscpy/lesscpy-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: python-devel
# Test requirements:
BuildRequires: python-ply
BuildRequires: python-setuptools
BuildRequires: python-six
# Test requirements:
BuildRequires: python-coverage
BuildRequires: python-flake8
BuildRequires: python-nose
Requires: python-ply
Requires: python-six
Requires(post): update-alternatives
Requires(postun): update-alternatives
%if 0%{?suse_version} && 0%{?suse_version} <= 1110
@@ -48,6 +54,8 @@ This program uses PLY (Python Lex-Yacc) to tokenize/parse the input.
%prep
%setup -q -n lesscpy-%{version}
# remove failing tests, which rely on find_and_load_cases
rm test/test_{bootstrap3,less,issues}.py
%build
python setup.py build
@@ -55,10 +63,12 @@ python setup.py build
%install
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
mv %{buildroot}%{_bindir}/lesscpy{,-%{py_ver}}
ln -s %{_bindir}/lesscpy-%{py_ver} %{buildroot}%{_bindir}/lesscpy
mkdir -p %{buildroot}%{_sysconfdir}/alternatives
touch %{buildroot}%{_sysconfdir}/alternatives/lesscpy
ln -sf %{_sysconfdir}/alternatives/lesscpy %{buildroot}%{_bindir}/lesscpy
%check
python lesscpy/test/__main__.py # Sigh!
python setup.py -q test
%pre
# Since /usr/bin/lesscpy became ghosted to be used with update-alternatives, we
@@ -77,7 +87,8 @@ fi
%files
%defattr(-,root,root,-)
%doc LICENSE README.rst
%ghost %{_bindir}/lesscpy
%ghost %{_sysconfdir}/alternatives/lesscpy
%{_bindir}/lesscpy
%{_bindir}/lesscpy-%{py_ver}
%{python_sitelib}/lesscpy
%{python_sitelib}/lesscpy-%{version}-py%{py_ver}.egg-info