removing dependency on distutils from setup.py

This commit is contained in:
csine-nflx 2020-09-01 16:07:47 -07:00
parent 0077452e10
commit 77b67f613f
1 changed files with 14 additions and 14 deletions

View File

@ -9,20 +9,20 @@ Is a TLS management and orchestration tool.
""" """
from __future__ import absolute_import from __future__ import absolute_import
import sys
import json
import os.path
import datetime import datetime
import json
from setuptools.command.develop import develop import logging
from setuptools.command.install import install import os.path
from setuptools.command.sdist import sdist import sys
from setuptools import setup, find_packages
from distutils import log
from distutils.core import Command
from subprocess import check_output from subprocess import check_output
import pip import pip
from setuptools import Command
from setuptools import setup, find_packages
from setuptools.command.develop import develop
from setuptools.command.install import install
from setuptools.command.sdist import sdist
if tuple(map(int, pip.__version__.split('.'))) >= (19, 3, 0): if tuple(map(int, pip.__version__.split('.'))) >= (19, 3, 0):
from pip._internal.network.session import PipSession from pip._internal.network.session import PipSession
from pip._internal.req import parse_requirements from pip._internal.req import parse_requirements
@ -105,16 +105,16 @@ class BuildStatic(Command):
pass pass
def run(self): def run(self):
log.info("running [npm install --quiet] in {0}".format(ROOT)) logging.info("running [npm install --quiet] in {0}".format(ROOT))
try: try:
check_output(['npm', 'install', '--quiet'], cwd=ROOT) check_output(['npm', 'install', '--quiet'], cwd=ROOT)
log.info("running [gulp build]") logging.info("running [gulp build]")
check_output([os.path.join(ROOT, 'node_modules', '.bin', 'gulp'), 'build'], cwd=ROOT) check_output([os.path.join(ROOT, 'node_modules', '.bin', 'gulp'), 'build'], cwd=ROOT)
log.info("running [gulp package]") logging.info("running [gulp package]")
check_output([os.path.join(ROOT, 'node_modules', '.bin', 'gulp'), 'package'], cwd=ROOT) check_output([os.path.join(ROOT, 'node_modules', '.bin', 'gulp'), 'package'], cwd=ROOT)
except Exception as e: except Exception as e:
log.warn("Unable to build static content") logging.warn("Unable to build static content")
setup( setup(