Projet

Général

Profil

Autre #13515

compat Mac OS X

Ajouté par Daniel Brotsky il y a plus de 7 ans. Mis à jour il y a plus de 7 ans.

Statut:
Fermé
Priorité:
Normal
Assigné à:
-
Version cible:
-
Début:
07 octobre 2016
Echéance:
% réalisé:

0%

Temps estimé:
Patch proposed:
Oui
Planning:

Description

The Gadjo 0.26 pip setup.py (lines 99-100) invokes a local sass compiler with the command line:

sass filename.scss:filename.css

but on Mac OS X the "usual" sass compiler from homebrew is called sassc and uses this syntax:
sassc filename.scss filename.css

I was able to work around this by creating a shell script named sass (attached), but I was wondering if you folks wanted me to contribute either some setup.py and/or doc changes for Mac OS X so others on that platform could avoid this problem.

(I discovered this while trying to get authentic2 running on Mac OS X.)


Fichiers

sass.sh (158 octets) sass.sh Shell script for sass compilation on Mac OS X Daniel Brotsky, 07 octobre 2016 19:47
0001-setup-check-for-sass-compiler-using-different-names-.patch (1,73 ko) 0001-setup-check-for-sass-compiler-using-different-names-.patch Frédéric Péters, 08 octobre 2016 12:22
0001-setup-add-support-for-sassc-sass-compiler-13515.patch (1,84 ko) 0001-setup-add-support-for-sassc-sass-compiler-13515.patch Frédéric Péters, 09 octobre 2016 22:30

Révisions associées

Révision 59ac6e68 (diff)
Ajouté par Frédéric Péters il y a plus de 7 ans

setup: add support for sassc sass compiler (#13515)

Historique

#1

Mis à jour par Frédéric Péters il y a plus de 7 ans

Thanks for your report. Here's some patch to look for the sass compiler; once reviewed we can push a new version to pypi.

#2

Mis à jour par Frédéric Péters il y a plus de 7 ans

But sassc (C program using libsass) is not the same program as sass (original ruby version); this revised patch should work with both but I didn't check the libsass-compiled css files.

#3

Mis à jour par Daniel Brotsky il y a plus de 7 ans

Sorry to take so long getting back to you. Thanks for the patch; that looks great. I have one suggestion, but first an apology:

I feel like a bit of an idiot for not having just installed the ruby sass compiler when I first had the problem. The reason I didn't was that the error I got was a simple ENOENT with no explanation of what couldn't be found. By the time I had groveled through the setup source to pin it down to a missing sass compiler, all that went through my head was "wait, I have a sass compiler, installed as sassc, why wasn't that found?". I completely forgot that "sass" is the name of the "standard ruby" sass compiler recommended by the Sass project.

So, now that I've apologized for not bringing up the right bug "gadjo setup should err out when no sass compiler found with an explanation that one is needed", let me just say that I think your patch also fixes that bug :) but that the error message could probably be better, something like: "A sass compiler is required but none was found. See sass-lang.com for choices."

By the way, thanks for changing from a : separator to a separate args; that work with both compilers. FWIW, both sass and sassc use sasslib to do the compile, so their output is (in my experience) identical. So I think you are OK accepting either. Thanks for the quick work!

#4

Mis à jour par Frédéric Péters il y a plus de 7 ans

  • Statut changé de En cours à Résolu (à déployer)

Pushed with your enhanced error message. I'll get it out in a tarball someday this week.

commit 59ac6e68b8011766dcb269680ea2eb26c8d87a95
Author: Frédéric Péters <fpeters@entrouvert.com>
Date:   Sat Oct 8 12:21:29 2016 +0200

    setup: add support for sassc sass compiler (#13515)
#5

Mis à jour par Frédéric Péters il y a plus de 7 ans

  • Statut changé de Résolu (à déployer) à Fermé

Formats disponibles : Atom PDF