当前位置: 首页>>代码示例>>Python>>正文


Python install.install方法代码示例

本文整理汇总了Python中setuptools.command.install.install方法的典型用法代码示例。如果您正苦于以下问题:Python install.install方法的具体用法?Python install.install怎么用?Python install.install使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在setuptools.command.install的用法示例。


在下文中一共展示了install.install方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: findArgcompletePath

# 需要导入模块: from setuptools.command import install [as 别名]
# 或者: from setuptools.command.install import install [as 别名]
def findArgcompletePath(command):
    proc = Popen("which " + command, stdout=PIPE, stderr=PIPE, shell=True, universal_newlines=True)
    command1Path, __ = proc.communicate()

    proc = Popen("which " + command + "3", stdout=PIPE, stderr=PIPE, shell=True, universal_newlines=True)
    command2Path, __ = proc.communicate()

    if command1Path:
        finalCommandPath = command1Path
    elif command2Path:
        finalCommandPath = command2Path
    else:
        print("ERROR: python3-argcomplete is not installed, install it with your package manager to activate autocompletion")
        exit(1)

    return finalCommandPath[:-1] 
开发者ID:Bashfuscator,项目名称:Bashfuscator,代码行数:18,代码来源:setup.py

示例2: run

# 需要导入模块: from setuptools.command import install [as 别名]
# 或者: from setuptools.command.install import install [as 别名]
def run(self):
        if self.extcap_path:
            _copy_script('extcap_ot.py', self.extcap_path)
            if sys.platform == 'win32':
                _copy_script('extcap_ot.bat', self.extcap_path)
        else:
            print('WARNING: Wireshark extcap is not installed. To install:',
                  file=sys.stderr)
            print(
                '1. Get Wireshark extcap path from Wireshark -> About -> Folders -> Extcap path',
                file=sys.stderr)
            print(
                '2. Run setup.py with --extcap-path=<extcap path> if you are installing by executing setup.py',
                file=sys.stderr)
            print('   or', file=sys.stderr)
            print(
                '   Provide --install-option="--extcap-path=<extcap path>" if you are installing by pip',
                file=sys.stderr)
        super(_InstallCommand, self).run() 
开发者ID:openthread,项目名称:pyspinel,代码行数:21,代码来源:setup.py

示例3: run

# 需要导入模块: from setuptools.command import install [as 别名]
# 或者: from setuptools.command.install import install [as 别名]
def run(self):
        super().run()
        print('[INFO] install bluescan_prompt.bash')
        shutil.copy(
            'src/bluescan/bluescan_prompt.bash', '/etc/bash_completion.d'
        ) 
开发者ID:fO-000,项目名称:bluescan,代码行数:8,代码来源:setup.py

示例4: setuptools_run

# 需要导入模块: from setuptools.command import install [as 别名]
# 或者: from setuptools.command.install import install [as 别名]
def setuptools_run(self):
        """ The setuptools version of the .run() method.

        We must pull in the entire code so we can override the level used in the
        _getframe() call since we wrap this call by one more level.
        """
        from distutils.command.install import install as distutils_install

        # Explicit request for old-style install?  Just do it
        if self.old_and_unmanageable or self.single_version_externally_managed:
            return distutils_install.run(self)

        # Attempt to detect whether we were called from setup() or by another
        # command.  If we were called by setup(), our caller will be the
        # 'run_command' method in 'distutils.dist', and *its* caller will be
        # the 'run_commands' method.  If we were called any other way, our
        # immediate caller *might* be 'run_command', but it won't have been
        # called by 'run_commands'.  This is slightly kludgy, but seems to
        # work.
        #
        caller = sys._getframe(3)
        caller_module = caller.f_globals.get('__name__', '')
        caller_name = caller.f_code.co_name

        if caller_module != 'distutils.dist' or caller_name!='run_commands':
            # We weren't called from the command line or setup(), so we
            # should run in backward-compatibility mode to support bdist_*
            # commands.
            distutils_install.run(self)
        else:
            self.do_egg_install() 
开发者ID:Frank-qlu,项目名称:recruit,代码行数:33,代码来源:install.py

示例5: run

# 需要导入模块: from setuptools.command import install [as 别名]
# 或者: from setuptools.command.install import install [as 别名]
def run(self):
        global path, version, initVersion, forcedVersion, installVersion
        
        name = self.config_vars['dist_name']
        path = os.path.join(self.install_libbase, 'pyqtgraph')
        if os.path.exists(path):
            raise Exception("It appears another version of %s is already "
                            "installed at %s; remove this before installing." 
                            % (name, path))
        print("Installing to %s" % path)
        rval = install.install.run(self)

        
        # If the version in __init__ is different from the automatically-generated
        # version string, then we will update __init__ in the install directory
        if initVersion == version:
            return rval
        
        try:
            initfile = os.path.join(path, '__init__.py')
            data = open(initfile, 'r').read()
            open(initfile, 'w').write(re.sub(r"__version__ = .*", "__version__ = '%s'" % version, data))
            installVersion = version
        except:
            sys.stderr.write("Warning: Error occurred while setting version string in build path. "
                             "Installation will use the original version string "
                             "%s instead.\n" % (initVersion)
                             )
            if forcedVersion:
                raise
            installVersion = initVersion
            sys.excepthook(*sys.exc_info())
    
        return rval 
开发者ID:SrikanthVelpuri,项目名称:tf-pose,代码行数:36,代码来源:setup.py

示例6: run

# 需要导入模块: from setuptools.command import install [as 别名]
# 或者: from setuptools.command.install import install [as 别名]
def run(self):
        _from_git(self.distribution)
        return install.install.run(self) 
开发者ID:abhisuri97,项目名称:auto-alt-text-lambda-api,代码行数:5,代码来源:packaging.py

示例7: setuptools_run

# 需要导入模块: from setuptools.command import install [as 别名]
# 或者: from setuptools.command.install import install [as 别名]
def setuptools_run(self):
        """ The setuptools version of the .run() method.

        We must pull in the entire code so we can override the level used in the
        _getframe() call since we wrap this call by one more level.
        """
        # Explicit request for old-style install?  Just do it
        if self.old_and_unmanageable or self.single_version_externally_managed:
            return old_install_mod._install.run(self)

        # Attempt to detect whether we were called from setup() or by another
        # command.  If we were called by setup(), our caller will be the
        # 'run_command' method in 'distutils.dist', and *its* caller will be
        # the 'run_commands' method.  If we were called any other way, our
        # immediate caller *might* be 'run_command', but it won't have been
        # called by 'run_commands'.  This is slightly kludgy, but seems to
        # work.
        #
        caller = sys._getframe(3)
        caller_module = caller.f_globals.get('__name__', '')
        caller_name = caller.f_code.co_name

        if caller_module != 'distutils.dist' or caller_name!='run_commands':
            # We weren't called from the command line or setup(), so we
            # should run in backward-compatibility mode to support bdist_*
            # commands.
            old_install_mod._install.run(self)
        else:
            self.do_egg_install() 
开发者ID:ktraunmueller,项目名称:Computable,代码行数:31,代码来源:install.py

示例8: run

# 需要导入模块: from setuptools.command import install [as 别名]
# 或者: from setuptools.command.install import install [as 别名]
def run(self):
        subprocess.check_call(['pipenv', 'install', '--dev', '--deploy', '--system'])
        develop.run(self) 
开发者ID:pawelzny,项目名称:dotty_dict,代码行数:5,代码来源:setup.py

示例9: run

# 需要导入模块: from setuptools.command import install [as 别名]
# 或者: from setuptools.command.install import install [as 别名]
def run(self):
        reqs = " ".join(["'%s'" % r for r in PKG_INFO["install_requires"]])
        os.system("pip install " + reqs)
        # XXX: py27 compatible
        return super(PipInstallCommand, self).run() 
开发者ID:nicfit,项目名称:eyeD3,代码行数:7,代码来源:setup.py

示例10: install_package

# 需要导入模块: from setuptools.command import install [as 别名]
# 或者: from setuptools.command.install import install [as 别名]
def install_package(package):
    import pip
    from pip._internal import main
    main.main(['install', package]) 
开发者ID:joelibaceta,项目名称:video-to-ascii,代码行数:6,代码来源:setup.py

示例11: build_extensions

# 需要导入模块: from setuptools.command import install [as 别名]
# 或者: from setuptools.command.install import install [as 别名]
def build_extensions(self):
        self.debug = True
        try:
            for ext in self.extensions:
                src = os.path.join(ext.lib)
                dest = self.get_ext_fullpath(ext.name)
                if not os.path.isfile(dest) and not os.path.isfile(src):
                    check_python_version()
                    print("building {}".format(ext.target))
                    build_v8(ext.target)
                if not os.path.isfile(dest):
                    dest_dir = os.path.dirname(dest)
                    if not os.path.exists(dest_dir):
                        os.makedirs(dest_dir)
                    copy_file(src, dest)
                else:
                    print("extension was already built")
        except Exception as e:
            traceback.print_exc()

            # Alter message
            err_msg = """py_mini_racer failed to build, ensure you have an up-to-date pip (>= 8.1) to use the wheel instead
            To update pip: 'pip install -U pip'
            See also: https://github.com/sqreen/PyMiniRacer#binary-builds-availability

            Original error: %s"""

            raise Exception(err_msg % repr(e)) 
开发者ID:sqreen,项目名称:PyMiniRacer,代码行数:30,代码来源:setup.py

示例12: run

# 需要导入模块: from setuptools.command import install [as 别名]
# 或者: from setuptools.command.install import install [as 别名]
def run(self):
        try:
            import pep8

            pep8
        except ImportError:
            print ('Missing "pep8" library. You can install it using pip: '
                   'pip install pep8')
            sys.exit(1)

        cwd = os.getcwd()
        retcode = call(('pep8 %s/parinx/ %s/tests/' %
                        (cwd, cwd)).split(' '))
        sys.exit(retcode) 
开发者ID:npsolve,项目名称:parinx,代码行数:16,代码来源:setup.py

示例13: run

# 需要导入模块: from setuptools.command import install [as 别名]
# 或者: from setuptools.command.install import install [as 别名]
def run(self):
        for req in reqs:
            pip._internal.main(["install", req]) 
开发者ID:DRL,项目名称:blobtools,代码行数:5,代码来源:setup.py

示例14: _post_install

# 需要导入模块: from setuptools.command import install [as 别名]
# 或者: from setuptools.command.install import install [as 别名]
def _post_install():
	os.system('pip install docutils pygments pypiwin32 kivy.deps.sdl2 kivy.deps.glew')
	os.system('pip install kivy')
	os.system('garden install --kivy matplotlib')
	print('FINISHED') 
开发者ID:deepdiy,项目名称:deepdiy,代码行数:7,代码来源:setup.py

示例15: get_setuptools_script_dir

# 需要导入模块: from setuptools.command import install [as 别名]
# 或者: from setuptools.command.install import install [as 别名]
def get_setuptools_script_dir():
    # Run the above class just to get paths
    dist = Distribution({'cmdclass': {'install': GetPaths}})
    dist.dry_run = True
    dist.parse_config_files()
    command = dist.get_command_obj('install')
    command.ensure_finalized()
    command.run()

    src_dir = glob(os.path.join(dist.install_libbase, 'pomoxis-*', 'exes'))[0]
    for exe in (os.path.join(src_dir, x) for x in os.listdir(src_dir)):
        print("Copying", os.path.basename(exe), '->', dist.install_scripts)
        shutil.copy(exe, dist.install_scripts)
    return dist.install_libbase, dist.install_scripts 
开发者ID:nanoporetech,项目名称:pomoxis,代码行数:16,代码来源:setup.py


注:本文中的setuptools.command.install.install方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。