Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace Distutils in Preparation for Python 3.12 #642

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import os
from packaging import version
from setuptools import setup, find_packages
from distutils import log
import warnings
import sys

BUILD_CUAEV_ALL_SM = '--cuaev-all-sms' in sys.argv
Expand All @@ -18,7 +18,7 @@
sys.argv.remove('--only-sm80')

if not BUILD_CUAEV_ALL_SM and not FAST_BUILD_CUAEV:
log.warn("Will not install cuaev") # type: ignore
warnings.warn("Will not install cuaev") # type: ignore

with open("README.md", "r") as fh:
long_description = fh.read()
Expand Down
6 changes: 3 additions & 3 deletions torchani/neurochem/parse_resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import io
import requests
import zipfile
from distutils import dir_util
import shutil
from pathlib import Path


Expand Down Expand Up @@ -47,8 +47,8 @@ def parse_neurochem_resources(info_file_path):
resource_zip.extractall(local_dir)
resource_path = local_dir
source = os.path.join(resource_path, extracted_name, "resources")
dir_util.copy_tree(source, resource_path)
dir_util.remove_tree(os.path.join(resource_path, extracted_name))
shutil.copytree(source, resource_path, dirs_exist_ok=True)
shutil.rmtree(os.path.join(resource_path, extracted_name))

else:
raise ValueError('File {0} could not be found either in {1} or {2}\n'
Expand Down
Loading