def run(self):
     # add in requirements for testing only when using the develop command
     self.distribution.install_requires.extend([
         'mock',
         'nose',
     ])
     STDevelopCmd.run(self)
Example #2
0
    def run(self):
        develop.run(self)

        if self.uninstall:
            package_path = find_package_path("pyaudio_wrapper")
            if package_path is not None:
                print("[Info] Detecting import hook in easy-install.pth")
                print("[Info] Clean import hook.")

                pth = os.path.join(os.path.dirname(easy_install.__file__), 'easy-install.pth')

                try:
                    pth_file = open(pth, "r")
                    lines = pth_file.readlines()
                    pth_file.close()
                    to_write = []
                    for line in lines:
                        if not 'pyaudio_wrapper' in line:
                            to_write.append(line)
                    pth_file = open(pth, "w")
                    pth_file.write(''.join(to_write))
                    pth_file.close()
                except Exception as e:
                    print(e)
                    print("[Error] Cannot clean the import hook.")
                    sys.exit(1)
Example #3
0
 def run(self):
     try:
         from enaml.core.parser import write_tables
         write_tables()
     except ImportError:
         pass
     develop.run(self)
Example #4
0
 def run(self, *args, **kwargs):
     print "MODIFIED RUN: %s" % self.__class__
     if self.minimal:
         self.distribution.install_requires = parse_requirements(["minimal-requirements.txt"])
         print "SELF.MINIMAL"
     print "install requires: %s" % (self.distribution.install_requires)
     develop_command.run(self, *args, **kwargs)
Example #5
0
 def run(self):
     # versioneer:
     versions = versioneer.get_versions(verbose=True)
     self._versioneer_generated_versions = versions
     # unless we update this, the command will keep using the old version
     self.distribution.metadata.version = versions["version"]
     _cmd_develop.run(self)
Example #6
0
 def run(self):
     clean_tables()
     build_tables()
     dirty = dirty_version()
     develop.run(self)
     if dirty:
         restore_version()
Example #7
0
 def run(self):
     if not skip_npm:
         if not which('node'):
             log.error('Please install nodejs and npm before continuing installation. nodejs may be installed using conda or directly from the nodejs website.')
             return
         run(npm, cwd=HERE)
     develop.run(self)
Example #8
0
File: setup.py Project: jvb/Rested
 def run(self):
     develop.run(self)
     try:
         self.run_command('build_docs')
     except:
         log.warn("Couldn't build documentation:\n%s" %
                  traceback.format_exception(*sys.exc_info()))
Example #9
0
File: setup.py Project: iquaba/salt
        def run(self):
            if IS_WINDOWS_PLATFORM:
                if __saltstack_version__.info < (2015, 8):  # pylint: disable=undefined-variable
                    # Install M2Crypto first
                    self.distribution.salt_installing_m2crypto_windows = True
                    self.run_command('install-m2crypto-windows')
                    self.distribution.salt_installing_m2crypto_windows = None

                # Install PyCrypto
                self.distribution.salt_installing_pycrypto_windows = True
                self.run_command('install-pycrypto-windows')
                self.distribution.salt_installing_pycrypto_windows = None

                # Download the required DLLs
                self.distribution.salt_download_windows_dlls = True
                self.run_command('download-windows-dlls')
                self.distribution.salt_download_windows_dlls = None

            if self.write_salt_version is True:
                self.distribution.running_salt_install = True
                self.distribution.salt_version_hardcoded_path = SALT_VERSION_HARDCODED
                self.run_command('write_salt_version')

            if self.generate_salt_syspaths:
                self.distribution.salt_syspaths_hardcoded_path = SALT_SYSPATHS_HARDCODED
                self.run_command('generate_salt_syspaths')

            # Resume normal execution
            develop.run(self)
Example #10
0
    def run(self):
        develop.run(self)

        # Install the dev requirements
        print('>>> Install dev requirements')
        self.spawn('pip install --upgrade --requirement requirements-dev.txt'.split(' '))
        print('<<< Instell dev requirements')
Example #11
0
    def run(self):
        if not self.dry_run:
            target_dir = os.path.join(self.setup_path, MODEL_TARGET_DIR)
            self.mkpath(target_dir)
            build_stan_model(target_dir)

        develop.run(self)
Example #12
0
 def run(self):
     clean_tables()
     build_tables()
     dirty = dirty_version()
     develop.run(self)
     if dirty:
         discard_changes()
Example #13
0
def _run_develop(self):
    """
    The definition of the "run" method for the CustomDevelopCommand metaclass.
    """
    # Get paths
    tethysapp_dir = get_tethysapp_directory()
    destination_dir = os.path.join(tethysapp_dir, self.app_package)

    # Notify user
    print('Creating Symbolic Link to App Package: {0} to {1}'.format(self.app_package_dir, destination_dir))

    # Create symbolic link
    try:
        os.symlink(self.app_package_dir, destination_dir)

    except:
        try:
            shutil.rmtree(destination_dir)
        except:
            os.remove(destination_dir)

        os.symlink(self.app_package_dir, destination_dir)

    # Install dependencies
    for dependency in self.dependencies:
        subprocess.call(['pip', 'install', dependency])

    # Run the original develop command
    develop.run(self)
Example #14
0
File: setup.py Project: gipit/gippy
 def run(self):
     log.debug('_develop run')
     develop.run(self)
     # move lib files into gippy directory
     [shutil.move(f, 'gippy/') for f in glob.glob('*.so')]
     if sysconfig.get_config_var('SOABI') is not None:
         # rename libgip if Python 3.2+
         os.rename(gip_module._file_name, 'gippy/libgip.so')
Example #15
0
    def run(self):
        """
        Execute command pip for development requirements.
        """

        assert os.getenv('VIRTUAL_ENV'), 'You should be in a virtualenv!'
        develop.run(self)
        self.spawn(('pip', 'install', '--upgrade', '--requirement', 'requirements-dev.txt'))
Example #16
0
    def run(self):
        level = logging.getLevelName("INFO")
        logging.basicConfig(level=level,
            format='%(levelname)-8s : %(message)s')

        _develop.run(self)
        install_requirements(self.user)
        _post_install(self)
Example #17
0
    def run(self):
        """ Overwriting the existing command.
        """
        os.chdir('respy')

        os.system('./waf distclean; ./waf configure build')

        os.chdir('../')

        develop.run(self)
Example #18
0
File: setup.py Project: Mr19/rekall
    def run(self):
        path = os.path.abspath(
            os.path.join(os.path.dirname(__file__), "rekall-core", "setup.py"))

        if os.access(path, os.F_OK):
            print "Installing rekall-core from local directory."

            subprocess.check_call([sys.executable, "setup.py", "develop"],
                                  cwd="rekall-core")

        _develop.run(self)
Example #19
0
        def run(self):

            subprocess.check_call(['make', '-C', 'external/samtools'])
            subprocess.check_call(['./configure'], cwd='external/samtools/htslib-1.2.1')
            subprocess.check_call(['make'], cwd='external/samtools/htslib-1.2.1')
            
            develop.run(self)
            import shutil
            shutil.copy2('external/samtools/samtools', 'transvar/')
            shutil.copy2('external/samtools/htslib-1.2.1/tabix', 'transvar/')
            shutil.copy2('external/samtools/htslib-1.2.1/bgzip', 'transvar/')
Example #20
0
    def run(self):
        old_develop.run(self)

        # Redirect namespace
        if (self.create_namespaces):
            for namespace in self.namespaces:
                self.create_fake_namespace(namespace)

        # Set environment (i.e. copy libraries and env vars).
        # For develop, the libraries stay in place.
        set_env()
Example #21
0
    def run(self):
        # augment our requirements to include testing requirements
        tests_require = getattr(self.distribution, 'tests_require', [])
        if tests_require:
            install_requires = self.distribution.install_requires or []
            self.distribution.install_requires = install_requires +\
                 tests_require

        # super only works on new style objects
        # setuptools is behind the times
        develop.run(self)
Example #22
0
    def run(self):
        if not skip_npm:
            if not which('node'):
                error_message = """
Please install nodejs and npm before continuing installation.
nodejs may be installed using conda or directly from: https://nodejs.org/
"""
                log.error(error_message)
                return
            run(npm, cwd=HERE)
        develop.run(self)
Example #23
0
 def run(self):
     _develop.run(self)
     install_nbextension(
         extension_dir,
         symlink=True,
         overwrite=True,
         user=False,
         sys_prefix=True,  # to install it inside virtualenv
         destination="robomission")
     cm = ConfigManager()
     cm.update('notebook', {"load_extensions": {"robomission/index": True } })
Example #24
0
 def run(self):
     # for some reason we must get build_dir this way, which is available
     # to the install class, but not to the develop class (but install
     # options are called by develop options so global can be set there)
     global build_dir
     log.debug('_develop run')
     develop.run(self)
     update_lib_path_mac(
         os.path.join(build_dir, gip_module._file_name),
     )
     # move lib files into gippy directory
     [shutil.move(f, 'gippy/') for f in glob.glob('*.so')]
     # rename libgip if it has crazy python3 extension
     f = glob.glob(os.path.join('gippy', 'libgip.*.so'))
     if len(f) > 0:
         os.rename(f[0], os.path.join('gippy', 'libgip.so'))
Example #25
0
def _run_develop(self):
    """
    The definition of the "run" method for the CustomDevelopCommand metaclass.
    """
    # Get paths
    tethysapp_dir = get_tethysapp_directory()
    destination_dir = os.path.join(tethysapp_dir, self.app_package)

    # Notify user
    with pretty_output(FG_BLACK) as p:
        p.write('Creating Symbolic Link to App Package: {0} to {1}'.format(self.app_package_dir, destination_dir))

    # Create symbolic link
    try:
        os_symlink = getattr(os, "symlink", None)
        if callable(os_symlink):
            os.symlink(self.app_package_dir, destination_dir)
        else:
            def symlink_ms(source, dest):
                csl = ctypes.windll.kernel32.CreateSymbolicLinkW
                csl.argtypes = (ctypes.c_wchar_p, ctypes.c_wchar_p, ctypes.c_uint32)
                csl.restype = ctypes.c_ubyte
                flags = 1 if os.path.isdir(source) else 0
                if csl(dest, source.replace('/', '\\'), flags) == 0:
                    raise ctypes.WinError()

            os.symlink = symlink_ms
            symlink_ms(self.app_package_dir, destination_dir)
    except Exception as e:
        with pretty_output(FG_BLACK) as p:
            p.write(e)
        try:
            shutil.rmtree(destination_dir)
        except Exception:
            os.remove(destination_dir)

        os.symlink(self.app_package_dir, destination_dir)

    # Install dependencies
    for dependency in self.dependencies:
        subprocess.call(['pip', 'install', dependency])

    # Run the original develop command
    develop.run(self)
Example #26
0
 def run(self):
     log.info("\nBuilding for develop...")
     develop.run(self)
Example #27
0
 def run(self):
     self.execute(_configure_z3, (), msg="Configuring Z3")
     self.execute(_build_z3, (), msg="Building Z3")
     self.execute(_copy_bins, (), msg="Copying binaries")
     _develop.run(self)
Example #28
0
 def run(self):
     print("Installing Python module...")
     develop.run(self)
     print("Installing nbextension ...")
     run_nbextension_install(True)
Example #29
0
 def run(self):
     if not has_system_lib():
         raise DistutilsError(
             "This library is not usable in 'develop' mode when using the "
             "bundled libsecp256k1. See README for details.")
     _develop.run(self)
Example #30
0
 def run(self):
     make_git_file()
     clean_jupyter_notebooks()
     develop.run(self)
Example #31
0
 def run(self):
     _develop.run(self)
     self.execute(_hooks, (self.install_lib,), msg="Running develop preparation task")
Example #32
0
 def run(self):
         self.execute(_clone_cgc_qemu, (), msg="Cloning CGC QEMU")
         self.execute(_clone_linux_qemu, (), msg="Cloning Linux QEMU")
         self.execute(_build_qemus, (), msg="Building Tracer QEMU")
         _develop.run(self)
Example #33
0
File: setup.py Project: wlcx/sentry
 def run(self):
     DevelopCommand.run(self)
     if not IS_LIGHT_BUILD:
         self.run_command('build_js')
Example #34
0
 def run(self):
     develop.run(self)
Example #35
0
 def run(self):
     develop.run(self)
     _post()
Example #36
0
 def run(self):
     DevelopCommand.run(self)
     if not IS_LIGHT_BUILD:
         self.run_command("build_integration_docs")
         self.run_command("build_assets")
         self.run_command("build_js_sdk_registry")
Example #37
0
 def run(self):
     develop.run(self)
     remove_cache()
Example #38
0
 def run(self):
     self.execute(compile_ssu, [], 'Compiling SSU')
     self.copy_file(os.path.join(SUCPP, 'libssu.so'),
                    os.path.join(CONDA_PREFIX, 'lib/'))
     develop.run(self)
Example #39
0
 def run(self, *args):
     self.execute(_build_native, (), msg='Building angr_native')
     _develop.run(self, *args)
Example #40
0
 def run(self):
     develop.run(self)
     path = join(dirname(__file__), 'src', 'pytest-cov.pth')
     dest = join(self.install_dir, basename(path))
     self.copy_file(path, dest)
Example #41
0
 def run(self):
     # Dummy directory for copying build plugins.
     if not path.isdir('bitshuffle/plugin'):
         os.mkdir('bitshuffle/plugin')
     develop_.run(self)
Example #42
0
 def run(self):
     self.run_command('build_ui')
     return develop.run(self)
Example #43
0
 def run(self):
     self.execute(_setup_other_arch, (), msg="Setting up AFL-other-arch")
     self.execute(_setup_cgc, (), msg="Setting up AFL-cgc")
     self.execute(_setup_libs, (), msg="Getting libraries")
     _datafiles()
     _develop.run(self)
Example #44
0
 def run(self):
     self._install_matlab_engine()
     self._install_git_submodules()
     develop.run(self)
Example #45
0
 def run(self):
     self.run_command("build")
     return _develop.run(self)
Example #46
0
 def run(self):
     develop.run(self)
     install_dependencies(develop_mode=True)
Example #47
0
 def run(self):
     _build_geoviewsjs()
     develop.run(self)
Example #48
0
 def run(self):
     snake_module.deploy_module()
     develop.run(self)
Example #49
0
    def run(self):
        sync_artifacts()

        develop.run(self)
Example #50
0
 def run(self):
     develop.run(self)
     self.execute(_post_install, [], msg="Running post installation tasks")
Example #51
0
 def run(self):
     generate_tfma_protos()
     _develop.run(self)
Example #52
0
 def run(self):
     subprocess.check_call([find_make(), 'dist'], shell=True)
     _develop.run(self)
Example #53
0
 def run(self):
     if not self.dry_run:
         compile_protobuf()
     develop.run(self)
Example #54
0
 def run(self):
     develop.run(self)
     self.install_helpers()
Example #55
0
 def run(self):
     develop.run(self)
     install_udev_rules(False)
Example #56
0
 def run(self):
     develop.run(self)
     print("Post-develop: create Unicode categories JSON file")
     codepoints_module = importlib.import_module('xmlschema.codepoints')
     codepoints_module.save_unicode_categories()
Example #57
0
 def run(self):
     self.run_command('build_proto')
     develop.run(self)
 def run(self):
     develop.run(self)
     from montreal_forced_aligner.thirdparty.download import download_binaries
     download_binaries()
Example #59
0
 def run(self):
     DevelopCommand.run(self)
     rebuild_catalogs()
Example #60
0
 def run(self):
     try:
         DownloadNuget()
     except:
         pass
     develop.run(self)