mirror of
https://github.com/python/cpython.git
synced 2025-11-02 03:01:58 +00:00
bpo-40334: Allow to run make regen-pegen without distutils (GH-19684)
This commit is contained in:
parent
3e89251ba8
commit
50f28dea32
2 changed files with 12 additions and 11 deletions
|
|
@ -6,12 +6,6 @@ import sysconfig
|
|||
|
||||
from typing import Optional, Tuple
|
||||
|
||||
import distutils.log
|
||||
from distutils.core import Distribution, Extension
|
||||
from distutils.command.clean import clean # type: ignore
|
||||
from distutils.command.build_ext import build_ext # type: ignore
|
||||
from distutils.tests.support import fixup_build_ext
|
||||
|
||||
from pegen.c_generator import CParserGenerator
|
||||
from pegen.grammar import Grammar
|
||||
from pegen.grammar_parser import GeneratedParser as GrammarParser
|
||||
|
|
@ -47,6 +41,12 @@ def compile_c_extension(
|
|||
If *build_dir* is provided, that path will be used as the temporary build directory
|
||||
of distutils (this is useful in case you want to use a temporary directory).
|
||||
"""
|
||||
import distutils.log
|
||||
from distutils.core import Distribution, Extension
|
||||
from distutils.command.clean import clean # type: ignore
|
||||
from distutils.command.build_ext import build_ext # type: ignore
|
||||
from distutils.tests.support import fixup_build_ext
|
||||
|
||||
if verbose:
|
||||
distutils.log.set_verbosity(distutils.log.DEBUG)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue