Skip to content

Commit ce4f09b

Browse files
authored
chore: Remove distutils (#4356)
* remove distutils Signed-off-by: tokoko <togurg14@freeuni.edu.ge> * fix formatting Signed-off-by: tokoko <togurg14@freeuni.edu.ge> --------- Signed-off-by: tokoko <togurg14@freeuni.edu.ge>
1 parent cdeab48 commit ce4f09b

File tree

2 files changed

+8
-15
lines changed

2 files changed

+8
-15
lines changed

sdk/python/feast/repo_operations.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -384,8 +384,8 @@ def cli_check_repo(repo_path: Path, fs_yaml_file: Path):
384384

385385
def init_repo(repo_name: str, template: str):
386386
import os
387-
from distutils.dir_util import copy_tree
388387
from pathlib import Path
388+
from shutil import copytree
389389

390390
from colorama import Fore, Style
391391

@@ -412,7 +412,7 @@ def init_repo(repo_name: str, template: str):
412412
template_path = str(Path(Path(__file__).parent / "templates" / template).absolute())
413413
if not os.path.exists(template_path):
414414
raise IOError(f"Could not find template {template}")
415-
copy_tree(template_path, str(repo_path))
415+
copytree(template_path, str(repo_path), dirs_exist_ok=True)
416416

417417
# Seed the repository
418418
bootstrap_path = repo_path / "bootstrap.py"

setup.py

+6-13
Original file line numberDiff line numberDiff line change
@@ -18,21 +18,14 @@
1818
import shutil
1919
import subprocess
2020
import sys
21-
from distutils.cmd import Command
22-
from pathlib import Path
23-
24-
from setuptools import find_packages
2521

26-
try:
27-
from setuptools import setup
28-
from setuptools.command.build_ext import build_ext as _build_ext
29-
from setuptools.command.build_py import build_py
30-
from setuptools.command.develop import develop
31-
from setuptools.command.install import install
22+
from pathlib import Path
3223

33-
except ImportError:
34-
from distutils.command.build_py import build_py
35-
from distutils.core import setup
24+
from setuptools import find_packages, setup, Command
25+
from setuptools.command.build_ext import build_ext as _build_ext
26+
from setuptools.command.build_py import build_py
27+
from setuptools.command.develop import develop
28+
from setuptools.command.install import install
3629

3730
NAME = "feast"
3831
DESCRIPTION = "Python SDK for Feast"

0 commit comments

Comments
 (0)