Accepting request 352169 from home:cbosdonnat:branches:Virtualization
python binding for libsass C implementation. Doesn't need libsass as it is already in the release tarball. OBS-URL: https://build.opensuse.org/request/show/352169 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-libsass?expand=0&rev=1
This commit is contained in:
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
## Default LFS
|
||||
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||
*.bsp filter=lfs diff=lfs merge=lfs -text
|
||||
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.gem filter=lfs diff=lfs merge=lfs -text
|
||||
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||
*.jar filter=lfs diff=lfs merge=lfs -text
|
||||
*.lz filter=lfs diff=lfs merge=lfs -text
|
||||
*.lzma filter=lfs diff=lfs merge=lfs -text
|
||||
*.obscpio filter=lfs diff=lfs merge=lfs -text
|
||||
*.oxt filter=lfs diff=lfs merge=lfs -text
|
||||
*.pdf filter=lfs diff=lfs merge=lfs -text
|
||||
*.png filter=lfs diff=lfs merge=lfs -text
|
||||
*.rpm filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||
*.ttf filter=lfs diff=lfs merge=lfs -text
|
||||
*.txz filter=lfs diff=lfs merge=lfs -text
|
||||
*.whl filter=lfs diff=lfs merge=lfs -text
|
||||
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||
*.zst filter=lfs diff=lfs merge=lfs -text
|
||||
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
.osc
|
||||
72
89d03d50-allow-t-for-style.patch
Normal file
72
89d03d50-allow-t-for-style.patch
Normal file
@@ -0,0 +1,72 @@
|
||||
From 89d03d50e9ca953871c62511dca328922ab0ba01 Mon Sep 17 00:00:00 2001
|
||||
From: Anthony Sottile <asottile@umich.edu>
|
||||
Date: Sat, 19 Dec 2015 12:48:41 -0800
|
||||
Subject: [PATCH] Allow -t for style like sassc
|
||||
|
||||
---
|
||||
sassc.py | 24 +++++++++++++++++-------
|
||||
1 file changed, 17 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/sassc.py b/sassc.py
|
||||
index 1305444..eac88f5 100755
|
||||
--- a/sassc.py
|
||||
+++ b/sassc.py
|
||||
@@ -11,11 +11,17 @@ This provides SassC_ compliant CLI executable named :program:`sassc`:
|
||||
|
||||
There are options as well:
|
||||
|
||||
-.. option:: -s <style>, --output-style <style>
|
||||
+.. option:: -t <style>, --style <style>
|
||||
|
||||
Coding style of the compiled result. The same as :func:`sass.compile()`
|
||||
function's ``output_style`` keyword argument. Default is ``nested``.
|
||||
|
||||
+.. option:: -s <style>, --output-style <style>
|
||||
+
|
||||
+ Alias for -t / --style.
|
||||
+
|
||||
+ .. deprecated:: 0.11.0
|
||||
+
|
||||
.. option:: -I <dir>, --include-path <dir>
|
||||
|
||||
Optional directory path to find ``@import``\ ed (S)CSS files.
|
||||
@@ -72,10 +78,14 @@ def main(argv=sys.argv, stdout=sys.stdout, stderr=sys.stderr):
|
||||
)
|
||||
output_styles = list(OUTPUT_STYLES)
|
||||
output_styles = ', '.join(output_styles[:-1]) + ', or ' + output_styles[-1]
|
||||
- parser.add_option('-s', '--output-style', metavar='STYLE', type='choice',
|
||||
- choices=list(OUTPUT_STYLES), default='nested',
|
||||
- help='Coding style of the compiled result. Choose one '
|
||||
- 'of ' + output_styles + '. [default: %default]')
|
||||
+ parser.add_option(
|
||||
+ '-t', '--style', '-s', '--output-style', metavar='STYLE',
|
||||
+ type='choice', choices=list(OUTPUT_STYLES), default='nested',
|
||||
+ help=(
|
||||
+ 'Coding style of the compiled result. Choose one of ' +
|
||||
+ output_styles + '. [default: %default]'
|
||||
+ ),
|
||||
+ )
|
||||
parser.add_option('-m', '-g', '--sourcemap', dest='source_map',
|
||||
action='store_true', default=False,
|
||||
help='Emit source map. Requires the second argument '
|
||||
@@ -123,7 +133,7 @@ def main(argv=sys.argv, stdout=sys.stdout, stderr=sys.stderr):
|
||||
source_map_filename = args[1] + '.map' # FIXME
|
||||
css, source_map = compile(
|
||||
filename=filename,
|
||||
- output_style=options.output_style,
|
||||
+ output_style=options.style,
|
||||
source_map_filename=source_map_filename,
|
||||
include_paths=options.include_paths,
|
||||
precision=options.precision
|
||||
@@ -133,7 +143,7 @@ def main(argv=sys.argv, stdout=sys.stdout, stderr=sys.stderr):
|
||||
source_map = None
|
||||
css = compile(
|
||||
filename=filename,
|
||||
- output_style=options.output_style,
|
||||
+ output_style=options.style,
|
||||
include_paths=options.include_paths,
|
||||
precision=options.precision
|
||||
)
|
||||
--
|
||||
2.6.2
|
||||
|
||||
3
libsass-0.10.0.tar.gz
Normal file
3
libsass-0.10.0.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:0a06f16a048fe347d8b7276b2478fc23fcea0a2fdcf65f6819c6065d067f804e
|
||||
size 272872
|
||||
6
python-libsass.changes
Normal file
6
python-libsass.changes
Normal file
@@ -0,0 +1,6 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Dec 29 10:34:25 UTC 2015 - cbosdonnat@suse.com
|
||||
|
||||
- 0.10.0 Release
|
||||
- Use -t for style like ruby sassc
|
||||
89d03d50-allow-t-for-style.patch
|
||||
64
python-libsass.spec
Normal file
64
python-libsass.spec
Normal file
@@ -0,0 +1,64 @@
|
||||
#
|
||||
# spec file for package python-sass
|
||||
#
|
||||
# Copyright (c) 2015 SUSE LINUX Products 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 http://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
%define _name libsass
|
||||
|
||||
Name: python-libsass
|
||||
Version: 0.10.0
|
||||
Release: 0
|
||||
License: MIT
|
||||
Summary: Python binding for libsass
|
||||
Url: https://github.com/dahlia/libsass-python
|
||||
Group: Development/Languages/Python
|
||||
Source: %{_name}-%{version}.tar.gz
|
||||
Patch0: 89d03d50-allow-t-for-style.patch
|
||||
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: python-Cython
|
||||
BuildRequires: python-devel
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: python-setuptools
|
||||
|
||||
# sassc installation required setuptools
|
||||
Requires: python-setuptools
|
||||
Requires: python-six
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
|
||||
%description
|
||||
A straightforward binding of libsass for Python. Compile Sass/SCSS in Python
|
||||
with no Ruby stack at all!
|
||||
|
||||
%prep
|
||||
%setup -n %{_name}-%{version}
|
||||
%patch0 -p1
|
||||
|
||||
%build
|
||||
env CFLAGS="$RPM_OPT_FLAGS" python setup.py build
|
||||
|
||||
%install
|
||||
python setup.py install --single-version-externally-managed -O1 --root=%{buildroot} --record=INSTALLED_FILES
|
||||
|
||||
%fdupes %{buildroot}%{py_sitedir}
|
||||
|
||||
%clean
|
||||
rm -rf %{buildroot}
|
||||
|
||||
%files -f INSTALLED_FILES
|
||||
%defattr(-,root,root)
|
||||
%dir %{py_sitedir}/sassutils
|
||||
|
||||
%changelog
|
||||
Reference in New Issue
Block a user