Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: sass/libsass-python
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 0.14.3
Choose a base ref
...
head repository: sass/libsass-python
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref
Loading
Showing with 1,652 additions and 1,108 deletions.
  1. +1 −3 .coveragerc
  2. +37 −0 .github/workflows/main.yml
  3. +0 −1 .gitignore
  4. +1 −1 .gitmodules
  5. +38 −0 .pre-commit-config.yaml
  6. +0 −20 .travis.yml
  7. +10 −0 CODE_OF_CONDUCT.md
  8. +9 −12 CONTRIBUTING.rst
  9. +0 −44 Makefile
  10. +10 −16 README.rst
  11. +70 −43 pysass.cpp → _sass.c
  12. +0 −30 appveyor.yml
  13. +42 −0 bin/build-manylinux-wheels
  14. +0 −51 build_manylinux_wheels.py
  15. +203 −4 docs/changes.rst
  16. +73 −63 docs/conf.py
  17. +34 −34 docs/frameworks/flask.rst
  18. +9 −26 docs/index.rst
  19. +5 −0 docs/pysassc.rst
  20. +0 −5 docs/sassc.rst
  21. +1 −1 libsass
  22. +102 −28 sassc.py → pysassc.py
  23. +1 −2 requirements-dev.txt
  24. +179 −92 sass.py
  25. +492 −215 sasstests.py
  26. +115 −45 sassutils/builder.py
  27. +29 −15 sassutils/distutils.py
  28. +28 −21 sassutils/wsgi.py
  29. +45 −4 setup.cfg
  30. +101 −196 setup.py
  31. +3 −0 test/h.sass
  32. +2 −2 testpkg/setup.py
  33. +12 −3 tox.ini
  34. +0 −131 upload_appveyor_builds.py
4 changes: 1 addition & 3 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -4,11 +4,9 @@ branch = True
source = $PWD
data_file = $PWD/.coverage
omit =
.tox/*
*/.tox/*
/usr/*
*/setup.py
*/build_manylinux_wheels.py
*/upload_appveyor_builds.py

[report]
show_missing = True
37 changes: 37 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: main

on:
push:
branches: [main, test-me-*]
tags: '*'
pull_request:

jobs:
main-windows:
uses: asottile/workflows/.github/workflows/tox.yml@v1.8.1
with:
env: '["py39"]'
os: windows-latest
arch: '["x64", "x86"]'
wheel-tags: true
submodules: true
main-macos:
uses: asottile/workflows/.github/workflows/tox.yml@v1.8.1
with:
env: '["py39"]'
os: macos-latest
wheel-tags: true
submodules: true
main-macos-intel:
uses: asottile/workflows/.github/workflows/tox.yml@v1.8.1
with:
env: '["py39"]'
os: macos-13
wheel-tags: true
submodules: true
main-linux:
uses: asottile/workflows/.github/workflows/tox.yml@v1.8.1
with:
env: '["py39", "py310", "py311"]'
os: ubuntu-latest
submodules: true
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -6,7 +6,6 @@
.*.swp
.DS_Store
._.DS_Store
.pytest_cache/
.coverage
.tox
/.libsass-upstream-version
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[submodule "libsass"]
path = libsass
url = git://github.com/sass/libsass.git
url = https://github.com/sass/libsass
38 changes: 38 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: debug-statements
- id: double-quote-string-fixer
- id: name-tests-test
- id: requirements-txt-fixer
- repo: https://github.com/asottile/setup-cfg-fmt
rev: v2.8.0
hooks:
- id: setup-cfg-fmt
- repo: https://github.com/asottile/reorder-python-imports
rev: v3.15.0
hooks:
- id: reorder-python-imports
args: [--py39-plus]
- repo: https://github.com/asottile/add-trailing-comma
rev: v3.2.0
hooks:
- id: add-trailing-comma
- repo: https://github.com/asottile/pyupgrade
rev: v3.20.0
hooks:
- id: pyupgrade
args: [--py39-plus]
- repo: https://github.com/hhatto/autopep8
rev: v2.3.2
hooks:
- id: autopep8
- repo: https://github.com/PyCQA/flake8
rev: 7.2.0
hooks:
- id: flake8
exclude: ^docs/conf.py
20 changes: 0 additions & 20 deletions .travis.yml

This file was deleted.

10 changes: 10 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Sass is more than a technology; Sass is driven by the community of individuals
that power its development and use every day. As a community, we want to embrace
the very differences that have made our collaboration so powerful, and work
together to provide the best environment for learning, growing, and sharing of
ideas. It is imperative that we keep Sass a fun, welcoming, challenging, and
fair place to play.

[The full community guidelines can be found on the Sass website.][link]

[link]: https://sass-lang.com/community-guidelines
21 changes: 9 additions & 12 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
@@ -23,12 +23,10 @@ Tests
- All code patches should contain one or more unit tests or regression tests.
- All code patches have to successfully run tests on every Python version
we aim to support. tox_ would help.
- All commits will be tested by Travis_ (Linux) and
AppVeyor_ (Windows).
- All commits will be tested by `GitHub Actions`_ (Linux and Windows).

.. _tox: https://tox.readthedocs.io/
.. _Travis: https://travis-ci.org/sass/libsass-python
.. _AppVeyor: https://ci.appveyor.com/project/asottile/libsass-python
.. _`GitHub Actions`: https://github.com/sass/libsass-python/actions


Maintainer's guide
@@ -52,20 +50,19 @@ Here's a brief check list for releasing a new version:
- Make a source distribution and upload it to PyPI
(``python3 setup.py sdist upload``).
If it's successful the new version must appear on PyPI_.
- AppVeyor_ automatically makes binary wheels for Windows, but each CI build
takes longer than an hour. These wheels are not automatically uploaded,
but there's upload_appveyor_builds.py script that downloads built wheels and
uploads them to PyPI.
- Run build_manylinux_wheels.py to build linux wheels and upload them to
PyPI (takes ~10 minutes).
- `GitHub Actions`_ automatically makes binary wheels for Windows, but each
CI build takes a while. These wheels are not automatically uploaded,
you can retreive them from the build's artifacts.
- Run ``./bin/build-manylinux-wheels`` to build linux wheels and upload them to
PyPI (takes ~5 minutes).
- The `docs website`__ also has to be updated.
It's currently a static website deployed on GitHub Pages.
Use ``python setup.py upload_doc`` command.
Although it seems possible to be automated using Travis.
Although it seems possible to be automated using Github Actions.
- Manually create a release through https://github.com/sass/libsass-python/releases/

Ping Hong Minhee (hongminhee@member.fsf.org, @dahlia on GitHub) if you need
any help!

.. _PyPI: https://pypi.python.org/pypi/libsass
.. _PyPI: https://pypi.org/pypi/libsass/
__ https://sass.github.io/libsass-python/
44 changes: 0 additions & 44 deletions Makefile

This file was deleted.

26 changes: 10 additions & 16 deletions README.rst
Original file line number Diff line number Diff line change
@@ -3,28 +3,22 @@ libsass-python: Sass_/SCSS for Python

.. image:: https://badge.fury.io/py/libsass.svg
:alt: PyPI
:target: https://pypi.python.org/pypi/libsass
:target: https://pypi.org/pypi/libsass/

.. image:: https://travis-ci.org/sass/libsass-python.svg
:target: https://travis-ci.org/sass/libsass-python
.. image:: https://github.com/sass/libsass-python/actions/workflows/main.yml/badge.svg
:target: https://github.com/sass/libsass-python/actions/workflows/main.yml
:alt: Build Status

.. image:: https://ci.appveyor.com/api/projects/status/asgquaxlffnuryoq/branch/master?svg=true
:target: https://ci.appveyor.com/project/asottile/libsass-python
:alt: Build Status (Windows)

.. image:: https://coveralls.io/repos/github/sass/libsass-python/badge.svg?branch=master
:target: https://coveralls.io/github/sass/libsass-python?branch=master
:alt: Coverage Status
.. image:: https://results.pre-commit.ci/badge/github/sass/libsass-python/main.svg
:target: https://results.pre-commit.ci/latest/github/sass/libsass-python/main
:alt: pre-commit.ci status

This package provides a simple Python extension module ``sass`` which is
binding LibSass_ (written in C/C++ by Hampton Catlin and Aaron Leung).
It's very straightforward and there isn't any headache related Python
It's very straightforward and there isn't any headache related to Python
distribution/deployment. That means you can add just ``libsass`` into
your ``setup.py``'s ``install_requires`` list or ``requirements.txt`` file.
Need no Ruby nor Node.js.

It currently supports CPython 2.7, 3.4--3.6, and PyPy 2.3+!
No need for Ruby nor Node.js.

.. _Sass: https://sass-lang.com/
.. _LibSass: https://github.com/sass/libsass
@@ -67,7 +61,7 @@ It's available on PyPI_, so you can install it using ``pip`` (or
You need a C++ compiler that support those features.
See also libsass project's README_ file.

.. _PyPI: https://pypi.python.org/pypi/libsass
.. _PyPI: https://pypi.org/pypi/libsass/
.. _README: https://github.com/sass/libsass#readme


@@ -112,6 +106,6 @@ implementation of Sass_.
Hampton Catlin originally designed Sass_ language and wrote the first
reference implementation of it in Ruby.

The above three softwares are all distributed under `MIT license`_.
The above three are all distributed under `MIT license`_.

.. _MIT license: https://mit-license.org/
Loading