File python-libsass.spec of Package python-libsass

# spec file for package python-libsass
# Copyright (c) 2016 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
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via

%define _name   libsass

Name:           python-libsass
Version:        0.10.0
Release:        0
Summary:        Python binding for libsass
License:        MIT
Group:          Development/Languages/Python
Source:         %{_name}-%{version}.tar.gz
Patch0:         89d03d50-allow-t-for-style.patch

BuildRequires:  fdupes
BuildRequires:  gcc-c++
BuildRequires:  python-Cython
BuildRequires:  python-devel
BuildRequires:  python-setuptools

# sassc installation required setuptools
Requires:       python-setuptools
Requires:       python-six
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

A straightforward binding of libsass for Python. Compile Sass/SCSS in Python
with no Ruby stack at all!

%setup -n %{_name}-%{version}
%patch0 -p1

env CFLAGS="$RPM_OPT_FLAGS" python build

python install --single-version-externally-managed -O1 --root=%{buildroot} --record=INSTALLED_FILES

%fdupes %{buildroot}%{py_sitedir}

rm -rf %{buildroot}

%dir %{py_sitedir}/sassutils