Projet

Général

Profil

0001-misc-replace-deprecated-distutils-by-setuptols-or-st.patch

Benjamin Dauvergne, 07 octobre 2022 13:19

Télécharger (1,42 ko)

Voir les différences:

Subject: [PATCH 1/2] misc: replace deprecated distutils by setuptols or stdlib
 (#69991)

 setup.py | 16 +++++++++++-----
 1 file changed, 11 insertions(+), 5 deletions(-)
setup.py
6 6

  
7 7
import glob
8 8
import os
9
import shutil
9 10
import subprocess
10 11
import sys
11
from distutils.cmd import Command
12
from distutils.command.build import build as _build
13
from distutils.errors import CompileError
14
from distutils.spawn import find_executable
12

  
13
try:
14
    from setuptools import Command
15
    from setuptools.command.build import build as _build
16
    from setuptools.errors import CompileError
17
except ImportError:
18
    from distutils.cmd import Command
19
    from distutils.command.build import build as _build
20
    from distutils.errors import CompileError
15 21

  
16 22
from setuptools import find_packages, setup
17 23
from setuptools.command.install_lib import install_lib as _install_lib
......
62 68
    def run(self):
63 69
        sass_bin = None
64 70
        for program in ('sassc', 'sass'):
65
            sass_bin = find_executable(program)
71
            sass_bin = shutil.which(program)
66 72
            if sass_bin:
67 73
                break
68 74
        if not sass_bin:
69
-