Skip to content

Commit

Permalink
Use new subprocess32 when possible
Browse files Browse the repository at this point in the history
  • Loading branch information
cyberdelia committed Dec 30, 2015
1 parent 148271b commit 7520777
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 3 deletions.
8 changes: 7 additions & 1 deletion pipeline/compilers/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
from __future__ import unicode_literals

import os
import subprocess
import sys

if os.name == 'posix' and sys.version_info[0] < 3:
import subprocess32 as subprocess
else:
import subprocess

from tempfile import NamedTemporaryFile

from django.contrib.staticfiles import finders
Expand Down
5 changes: 4 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
# -*- coding: utf-8 -*-
import io
import os
import sys

from setuptools import setup, find_packages
import sys

install_requires = []
if (sys.version_info[0], sys.version_info[1]) < (3, 2):
install_requires.append('futures>=2.1.3')
if os.name == 'posix' and sys.version_info[0] < 3:
install_requires.append('subprocess32>=3.2.7')

setup(
name='django-pipeline',
Expand Down
1 change: 0 additions & 1 deletion tests/tests/test_compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

from pipeline.collector import default_collector
from pipeline.compilers import Compiler, CompilerBase, SubProcessCompiler
from pipeline.conf import settings
from pipeline.exceptions import CompilerError

from tests.utils import _, pipeline_settings
Expand Down
1 change: 1 addition & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ basepython =
deps =
py{27,py}: mock
py{27,py}: futures
py{27,py}: subprocess32
django18: Django>=1.8,<1.9
django19: Django>=1.9,<1.10
jinja2
Expand Down

0 comments on commit 7520777

Please sign in to comment.