Unverified Commit 76be194c authored by Peter Eastman's avatar Peter Eastman Committed by GitHub
Browse files

Replace distutils with setuptools (#4245)

* Replace distutils with setuptools

* Replace more uses of distutils
parent b247e7d8
......@@ -42,7 +42,7 @@ import openmm as mm
import math
import os
import re
import distutils.spawn
import shutil
from collections import OrderedDict, defaultdict
from itertools import combinations, combinations_with_replacement
from copy import deepcopy
......@@ -1327,11 +1327,11 @@ def _defaultGromacsIncludeDir():
if 'GMXBIN' in os.environ:
return os.path.abspath(os.path.join(os.environ['GMXBIN'], '..', 'share', 'gromacs', 'top'))
pdb2gmx_path = distutils.spawn.find_executable('pdb2gmx')
pdb2gmx_path = shutil.which('pdb2gmx')
if pdb2gmx_path is not None:
return os.path.abspath(os.path.join(os.path.dirname(pdb2gmx_path), '..', 'share', 'gromacs', 'top'))
else:
gmx_path = distutils.spawn.find_executable('gmx')
gmx_path = shutil.which('gmx')
if gmx_path is not None:
return os.path.abspath(os.path.join(os.path.dirname(gmx_path), '..', 'share', 'gromacs', 'top'))
......
......@@ -7,7 +7,7 @@ import os
import sys
import platform
import numpy
from distutils.core import setup
from setuptools import setup
from Cython.Build import cythonize
MAJOR_VERSION_NUM='@OPENMM_MAJOR_VERSION@'
......@@ -125,7 +125,7 @@ if not release:
def buildKeywordDictionary(major_version_num=MAJOR_VERSION_NUM,
minor_version_num=MINOR_VERSION_NUM,
build_info=BUILD_INFO):
from distutils.core import Extension
from setuptools import Extension
setupKeywords = {}
setupKeywords["name"] = "OpenMM"
setupKeywords["version"] = "%s.%s.%s" % (major_version_num,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment