From 77e323d28c913d487f37b72bcb261210671d9b39 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 26 Mar 2019 21:55:07 -0400 Subject: [PATCH] prefix option in install.py not needed --- python/install.py | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-) diff --git a/python/install.py b/python/install.py index 9f23e5a896..7f7062103a 100644 --- a/python/install.py +++ b/python/install.py @@ -23,11 +23,8 @@ parser.add_argument("-l", "--lib", required=True, parser.add_argument("-v", "--version", required=True, help="path to the LAMMPS version.h header file") -pgroup = parser.add_mutually_exclusive_group() -pgroup.add_argument("-d","--dir", - help="Legacy custom installation folder for module and library") -pgroup.add_argument("-p","--prefix", - help="Installation prefix for module and library") +parser.add_argument("-d","--dir", + help="Legacy custom installation folder selection for module and library") args = parser.parse_args() @@ -65,14 +62,6 @@ if args.dir: else: args.dir = os.path.abspath(args.dir) -if args.prefix: - if not os.path.isdir(args.prefix): - print( "ERROR: Installation prefix folder %s does not exist" % args.prefix) - parser.print_help() - sys.exit(1) - else: - args.prefix = os.path.abspath(args.prefix) - # if a custom directory is given, we copy the files directly # without any special processing or additional steps to that folder @@ -108,10 +97,7 @@ import site tryuser=False try: - if args.prefix: - sys.argv = ["setup.py","install","--prefix=%s" % args.prefix] # as if had run "python setup.py install --prefix=XXX" - else: - sys.argv = ["setup.py","install"] # as if had run "python setup.py install" + sys.argv = ["setup.py","install"] # as if had run "python setup.py install" setup(name = "lammps", version = verstr, author = "Steve Plimpton", @@ -120,7 +106,7 @@ try: description = "LAMMPS Molecular Dynamics Python module", license = "GPL", py_modules = ["lammps"], - data_files = [(get_python_lib(prefix=args.prefix), [args.lib])]) + data_files = [(get_python_lib(), [args.lib])]) except: tryuser=True print ("Installation into global site-packages folder failed.\nTrying user folder %s now." % site.USER_SITE)