fusionbox / django-pyscss

Makes it easier to use PyScss in Django
https://pypi.python.org/pypi/django-pyscss
BSD 2-Clause "Simplified" License
19 stars 13 forks source link

handle_import breaks sub-imports with relative filenames #34

Closed r1chardj0n3s closed 9 years ago

r1chardj0n3s commented 9 years ago

For example, in bootstrap.scss there's a number of imports with a relative directory path. For example, in bootstrap/scss/bootstrap.scss there is "@import bootstrap/variables". This is currently broken in handle_import:

    if original_path.is_absolute():
        # Remove the beginning slash
        search_path = original_path.relative_to('/').parent
    elif rule.source_file.origin:
        search_path = rule.source_file.origin
    else:
        search_path = original_path.parent

    basename = original_path.stem

The removal of the original_path parent information in the second case means the file cannot be located.

r1chardj0n3s commented 9 years ago

This issue is now a blocker for https://review.openstack.org/#/c/178504/

rockymeza commented 9 years ago

Hi @r1chardj0n3s, thanks for bringing this up. I'm going to close this in favor of your PR.

closed in favor of #35