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 the pathlib2 when it's available #374

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
2 changes: 1 addition & 1 deletion conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
from __future__ import print_function

import logging
from pathlib import Path

import pytest

Expand All @@ -17,6 +16,7 @@
from scss.extension.extra import ExtraExtension
from scss.extension.fonts import FontsExtension
from scss.extension.compass import CompassExtension
from scss.util import Path

try:
import fontforge
Expand Down
2 changes: 1 addition & 1 deletion scss/compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from collections import defaultdict
from enum import Enum
import logging
from pathlib import Path
from .util import Path
import re
import sys
import warnings
Expand Down
2 changes: 1 addition & 1 deletion scss/extension/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from itertools import product
import math
import os.path
from pathlib import PurePosixPath
from ..util import PurePosixPath

from six.moves import xrange

Expand Down
2 changes: 1 addition & 1 deletion scss/legacy.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from __future__ import division

import os
from pathlib import Path
from .util import Path
from collections import namedtuple

import six
Expand Down
2 changes: 1 addition & 1 deletion scss/source.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

import hashlib
import logging
from pathlib import Path
from .util import Path
import re

import six
Expand Down
5 changes: 5 additions & 0 deletions scss/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@

from scss import config

try:
from pathlib2 import Path, PurePosixPath
except ImportError:
from pathlib import Path, PurePosixPath

BASE_DIR = os.path.dirname(__file__)


Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
install_requires = ['six']
if sys.version_info < (3, 4):
install_requires.append('enum34')
install_requires.append('pathlib')
install_requires.append('pathlib2')
if sys.version_info < (2, 7):
install_requires.append('ordereddict')

Expand Down