Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use libsass-python's CLI instead of Python API #31637

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions pavelib/assets.py
Original file line number Diff line number Diff line change
Expand Up @@ -555,11 +555,13 @@ def _compile_sass(system, theme, debug, force, timing_info):
sass_dir=sass_source_dir,
))
else:
sass.compile(
dirname=(sass_source_dir, css_dir),
include_paths=COMMON_LOOKUP_PATHS + lookup_paths,
source_comments=source_comments,
output_style=output_style,
all_lookup_paths = COMMON_LOOKUP_PATHS + lookup_paths
sh(
"sassc"
+ "".join(f" --include-path={path}" for path in all_lookup_paths)
+ (" --source-comments" if source_comments else "")
+ f" --output-style={output_style}"
+ f" {sass_source_dir} {css_dir}"
)

# For Sass files without explicit RTL versions, generate
Expand Down
4 changes: 2 additions & 2 deletions requirements/edx-sandbox/py38.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#
# This file is autogenerated by pip-compile with Python 3.8
# by the following command:
# This file is autogenerated by pip-compile with python 3.8
# To update, run:
#
# make upgrade
#
Expand Down
6 changes: 3 additions & 3 deletions requirements/edx/base.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#
# This file is autogenerated by pip-compile with Python 3.8
# by the following command:
# This file is autogenerated by pip-compile with python 3.8
# To update, run:
#
# make upgrade
#
Expand Down Expand Up @@ -657,7 +657,7 @@ learner-pathway-progress==1.3.3
# via -r requirements/edx/base.in
levenshtein==0.20.9
# via python-levenshtein
libsass==0.10.0
libsass==0.11.0
# via
# -r requirements/edx/paver.txt
# ora2
Expand Down
4 changes: 2 additions & 2 deletions requirements/edx/coverage.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#
# This file is autogenerated by pip-compile with Python 3.8
# by the following command:
# This file is autogenerated by pip-compile with python 3.8
# To update, run:
#
# make upgrade
#
Expand Down
6 changes: 3 additions & 3 deletions requirements/edx/development.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#
# This file is autogenerated by pip-compile with Python 3.8
# by the following command:
# This file is autogenerated by pip-compile with python 3.8
# To update, run:
#
# make upgrade
#
Expand Down Expand Up @@ -881,7 +881,7 @@ levenshtein==0.20.9
# via
# -r requirements/edx/testing.txt
# python-levenshtein
libsass==0.10.0
libsass==0.11.0
# via
# -r requirements/edx/testing.txt
# ora2
Expand Down
4 changes: 2 additions & 2 deletions requirements/edx/doc.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#
# This file is autogenerated by pip-compile with Python 3.8
# by the following command:
# This file is autogenerated by pip-compile with python 3.8
# To update, run:
#
# make upgrade
#
Expand Down
3 changes: 2 additions & 1 deletion requirements/edx/paver.in
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@

edx-opaque-keys # Create and introspect course and xblock identities
lazy # Lazily-evaluated attributes for Python objects
libsass==0.10.0 # Python bindings for the LibSass CSS compiler
libsass==0.11.0 # Provides `sassc` CLI for compiling SCSS. Not referenced in our Python code directly.
# Note for maintainers: In libsass>=0.15, the CLI has been renamed to `pysassc`.
markupsafe # XML/HTML/XHTML Markup safe strings
mock # Stub out code with mock objects and make assertions about how they have been used
path # Easier manipulation of filesystem paths
Expand Down
6 changes: 3 additions & 3 deletions requirements/edx/paver.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#
# This file is autogenerated by pip-compile with Python 3.8
# by the following command:
# This file is autogenerated by pip-compile with python 3.8
# To update, run:
#
# make upgrade
#
Expand All @@ -16,7 +16,7 @@ idna==3.4
# via requests
lazy==1.5
# via -r requirements/edx/paver.in
libsass==0.10.0
libsass==0.11.0
# via -r requirements/edx/paver.in
markupsafe==2.1.2
# via -r requirements/edx/paver.in
Expand Down
4 changes: 2 additions & 2 deletions requirements/edx/pip-tools.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#
# This file is autogenerated by pip-compile with Python 3.8
# by the following command:
# This file is autogenerated by pip-compile with python 3.8
# To update, run:
#
# make upgrade
#
Expand Down
10 changes: 6 additions & 4 deletions requirements/edx/pip.txt
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
#
# This file is autogenerated by pip-compile with Python 3.8
# by the following command:
# This file is autogenerated by pip-compile with python 3.8
# To update, run:
#
# make upgrade
#
wheel==0.38.4
# via -r requirements/edx/pip.in

# The following packages are considered to be unsafe in a requirements file:
pip==22.3.1
# via -r requirements/edx/pip.in
setuptools==59.8.0
# via
# -c requirements/edx/../common_constraints.txt
# -r requirements/edx/pip.in
wheel==0.38.4
# via -r requirements/edx/pip.in
7 changes: 3 additions & 4 deletions requirements/edx/testing.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#
# This file is autogenerated by pip-compile with Python 3.8
# by the following command:
# This file is autogenerated by pip-compile with python 3.8
# To update, run:
#
# make upgrade
#
Expand Down Expand Up @@ -63,7 +63,6 @@ attrs==22.2.0
# jsonschema
# lti-consumer-xblock
# openedx-events
# outcome
# pytest
babel==2.11.0
# via
Expand Down Expand Up @@ -839,7 +838,7 @@ levenshtein==0.20.9
# via
# -r requirements/edx/base.txt
# python-levenshtein
libsass==0.10.0
libsass==0.11.0
# via
# -r requirements/edx/base.txt
# ora2
Expand Down
4 changes: 2 additions & 2 deletions scripts/xblock/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#
# This file is autogenerated by pip-compile with Python 3.8
# by the following command:
# This file is autogenerated by pip-compile with python 3.8
# To update, run:
#
# make upgrade
#
Expand Down