Skip to content

Commit 8c5b183

Browse files
committed
Packaging
1 parent 102706e commit 8c5b183

File tree

3 files changed

+101
-1
lines changed

3 files changed

+101
-1
lines changed

README.rst

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
libsass: SASS_ for Python
2+
=========================
3+
4+
This package provides a simple Python extension module `sass` which is
5+
binding Libsass_ (written in C/C++ by Hampton Catlin and Aaron Leung).
6+
It's very straightforward and there isn't any headache related Python
7+
distribution/deployment. That means you can add just ``libsass`` into
8+
your ``setup.py``'s ``install_requires`` list or ``requirements.txt`` file.
9+
10+
It currently supports CPython 2.5, 2.6, 2.7, and PyPy 1.9!
11+
12+
.. _SASS: http://sass-lang.com/
13+
.. _Libsass: https://github.com/hcatlin/libsass
14+
15+
16+
Install
17+
-------
18+
19+
Use ``easy_install`` or ``pip``::
20+
21+
$ easy_install libsass
22+
23+
24+
``sass.compile()``
25+
------------------
26+
27+
It takes a source ``string`` or a ``filename`` and returns the compiled
28+
CSS string.
29+
30+
``string`` (required)
31+
The string of SASS source code to compile. It's exclusive to ``filename``
32+
parameter.
33+
34+
``filename`` (required)
35+
The filename of SASS source code to compile. It's exclusive to ``string``
36+
parameter.
37+
38+
``output_style`` (optional)
39+
The coding style of the compiled result. Choose one in:
40+
41+
- ``'nested'`` (default)
42+
- ``'expanded'``
43+
- ``'compact'``
44+
- ``'compressed'``
45+
46+
``includes_paths`` (optional)
47+
The list of paths to find ``@import``\ ed SASS/CSS source files.
48+
49+
``image_path`` (optional)
50+
The path to find images.
51+
52+
53+
Credit
54+
------
55+
56+
Hong Minhee wrote this Python binding of Libsass_.
57+
58+
Hampton Catlin and Aaron Leung wrote Libsass_, which is portable C/C++
59+
implementation of SASS_.
60+
61+
Hampton Catlin originally designed SASS_ language and wrote the first
62+
reference implementation of it in Ruby.
63+
64+
The above three softwares are all distributed under `MIT license`_.
65+
66+
.. _MIT licence: http://mit-license.org/

setup.py

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
from __future__ import with_statement
2+
3+
import os.path
4+
15
try:
26
from setuptools import Extension, setup
37
except ImportError:
@@ -29,8 +33,16 @@
2933
extra_link_args=['-fPIC'],
3034
)
3135

36+
37+
def readme():
38+
with open(os.path.join(os.path.dirname(__file__), 'README.rst')) as f:
39+
return f.read()
40+
3241
setup(
3342
name='libsass',
43+
description='SASS for Python: '
44+
'A straightforward binding of libsass for Python.',
45+
long_description=readme(),
3446
version=version,
3547
ext_modules=[sass_extension],
3648
py_modules=['sasstests'],
@@ -41,5 +53,22 @@
4153
url='https://github.com/dahlia/libsass-python',
4254
tests_require=['Attest'],
4355
test_loader='attest:auto_reporter.test_loader',
44-
test_suite='sasstests.suite'
56+
test_suite='sasstests.suite',
57+
classifiers=[
58+
'Development Status :: 4 - Beta',
59+
'Environment :: Web Environment',
60+
'Intended Audience :: Developers',
61+
'License :: OSI Approved :: MIT License',
62+
'Operating System :: OS Independent',
63+
'Programming Language :: C',
64+
'Programming Language :: C++',
65+
'Programming Language :: Python :: 2.5',
66+
'Programming Language :: Python :: 2.6',
67+
'Programming Language :: Python :: 2.7',
68+
'Programming Language :: Python :: 2 :: Only',
69+
'Topic :: Internet :: WWW/HTTP',
70+
'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
71+
'Topic :: Software Development :: Code Generators',
72+
'Topic :: Software Development :: Compilers'
73+
]
4574
)

test/b.sass

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
b {
2+
i {
3+
font-size: 20px;
4+
}
5+
}

0 commit comments

Comments
 (0)