diff --git a/bin/omero b/bin/omero index 3aee86190..b597bd284 100755 --- a/bin/omero +++ b/bin/omero @@ -69,19 +69,10 @@ top = os.path.join(exe, os.pardir, os.pardir) # This list needs to be kept in line with omero.cli.CLI._env # top = os.path.normpath(top) -lib = os.path.join(top, "lib") -lpy = os.path.join(top, "lib","python") -ipy = os.path.join(top, "lib","fallback") var = os.path.join(top, "var") vlb = os.path.join(var, "lib") -sys.path.append(lpy); sys.path.append(vlb); -sys.path.append(ipy) -if not os.path.exists(lib): - print("WARN: %s does not exist. It is unlikely that OMERO will run properly" % lib) - -# # Testing shortcut. If the first argument is an # empty string, exit sucessfully. # diff --git a/src/omero/cli.py b/src/omero/cli.py index 147bdfba1..3c04502a6 100755 --- a/src/omero/cli.py +++ b/src/omero/cli.py @@ -1394,10 +1394,8 @@ def _env(self): This list needs to be kept in line with omero-py/bin/omero """ - lpy = str(self.dir / "lib" / "python") - ipy = str(self.dir / "lib" / "fallback") vlb = str(self.dir / "var" / "lib") - paths = os.path.pathsep.join([lpy, vlb, ipy]) + paths = os.path.pathsep.join([vlb]) env = dict(os.environ) pypath = env.get("PYTHONPATH", None) diff --git a/src/omero_setup.py b/src/omero_setup.py deleted file mode 100755 index 09d692e8d..000000000 --- a/src/omero_setup.py +++ /dev/null @@ -1,93 +0,0 @@ -#!/usr/bin/env python -# -*- coding: utf-8 -*- -""" - PyTest command class - - setup.py files in each package should include a cmdclass mapping - from "test" to PyTest. - - Copyright 2007-2013 Glencoe Software, Inc. All rights reserved. - Use is subject to license terms supplied in LICENSE.txt - -""" -from __future__ import print_function - -import os -import sys - -from setuptools.command.test import test as TestCommand - -LIB = os.path.join("..", "..", "tests", "python") -sys.path.insert(0, LIB) - - -class PyTest(TestCommand): - - user_options = [ - ('test-path=', 't', "base dir for test collection"), - ('test-pythonpath=', 'p', "prepend 'pythonpath' to PYTHONPATH"), - ('test-ice-config=', 'i', - "use specified 'ice config' file instead of default"), - ('test-string=', 'k', "only run tests including 'string'"), - ('test-marker=', 'm', "only run tests including 'marker'"), - ('test-no-capture', 's', "don't suppress test output"), - ('test-failfast', 'x', "Exit on first error"), - ('test-verbose', 'v', "more verbose output"), - ('test-quiet', 'q', "less verbose output"), - ('junitxml=', None, "create junit-xml style report file at 'path'"), - ('pdb', None, "fallback to pdb on error"), - ('markers', None, "list available markers'"), - ] - - def initialize_options(self): - TestCommand.initialize_options(self) - self.test_pythonpath = None - self.test_ice_config = None - self.test_string = None - self.test_marker = None - self.test_path = None - self.test_no_capture = False - self.test_failfast = False - self.test_quiet = False - self.test_verbose = False - self.junitxml = None - self.pdb = False - self.markers = False - - def finalize_options(self): - TestCommand.finalize_options(self) - if self.test_path is None: - self.test_path = 'test' - self.test_args = [self.test_path] - if self.test_string is not None: - self.test_args.extend(['-k', self.test_string]) - if self.test_marker is not None: - self.test_args.extend(['-m', self.test_marker]) - if self.test_no_capture: - self.test_args.extend(['-s']) - if self.test_failfast: - self.test_args.extend(['-x']) - if self.test_verbose: - self.test_args.extend(['-v']) - if self.test_quiet: - self.test_args.extend(['-q']) - if self.junitxml is not None: - self.test_args.extend(['--junitxml', self.junitxml]) - if self.pdb: - self.test_args.extend(['--pdb']) - print(self.test_failfast) - self.test_suite = True - if self.markers: - self.test_args = "--markers" - if self.test_ice_config is None: - self.test_ice_config = os.path.abspath('ice.config') - if 'ICE_CONFIG' not in os.environ: - os.environ['ICE_CONFIG'] = self.test_ice_config - - def run_tests(self): - if self.test_pythonpath is not None: - sys.path.insert(0, self.test_pythonpath) - # import here, cause outside the eggs aren't loaded - import pytest - errno = pytest.main(self.test_args) - sys.exit(errno)