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


Python sdist.make_release_tree函数代码示例

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


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

示例1: make_release_tree

    def make_release_tree(self, base_dir, files):
        """
        Create the files in subdir base_dir ready for packaging
        After the normal make_release_tree ran, we insert shared_setup
        and modify the to-be-packaged setup.py
        """

        log.error("sdist make_release_tree original base_dir %s files %s" % (base_dir, files))
        log.error("sdist from shared_setup %s current dir %s" % (__file__, os.getcwd()))
        if os.path.exists(base_dir):
            # no autocleanup?
            # can be a leftover of earlier crash/raised exception
            raise Exception("base_dir %s present. Please remove it" % base_dir)

        sdist.make_release_tree(self, base_dir, files)

        if __name__ == '__main__':
            log.error('running shared_setup as main, not adding it to sdist')
        else:
            # use a new name, to avoid confusion with original
            new_shared_setup = 'shared_setup_dist_only'
            external_dir = 'external_dist_only'
            self._mod_setup_py(base_dir, external_dir, new_shared_setup)

            self._add_shared_setup(base_dir, external_dir, new_shared_setup)
开发者ID:stdweird,项目名称:vsc-install,代码行数:25,代码来源:shared_setup.py

示例2: make_release_tree

    def make_release_tree(self, base_dir, files):
        """
        Create the files in subdir base_dir ready for packaging
        After the normal make_release_tree ran, we insert shared_setup
        and modify the to-be-packaged setup.py
        """

        log.info("sdist make_release_tree original base_dir %s files %s" % (base_dir, files))
        log.info("sdist from shared_setup %s current dir %s" % (__file__, os.getcwd()))
        if os.path.exists(base_dir):
            # no autocleanup?
            # can be a leftover of earlier crash/raised exception
            raise Exception("base_dir %s present. Please remove it" % base_dir)

        sdist.make_release_tree(self, base_dir, files)

        # have to make sure setup.py is not a symlink
        dest, code = self._copy_setup_py(base_dir)

        if __name__ == '__main__':
            log.info('running shared_setup as main, not adding it to sdist')
        else:
            # use a new name, to avoid confusion with original
            self._mod_setup_py(dest, code)

            self._add_shared_setup(base_dir)

        # Add mandatory files
        for fn in [LICENSE, README]:
            self.copy_file(os.path.join(REPO_BASE_DIR, fn), os.path.join(base_dir, fn))
开发者ID:geimer,项目名称:vsc-install,代码行数:30,代码来源:shared_setup.py

示例3: make_release_tree

 def make_release_tree(self, base_dir, files):
   sdist.make_release_tree(self, base_dir, files)
   sdist_version_ini = os.path.join(base_dir, "version.ini")
   if os.path.exists(sdist_version_ini):
     os.unlink(sdist_version_ini)
   shutil.copy(
       os.path.join(THIS_DIRECTORY, "../../../version.ini"), sdist_version_ini)
开发者ID:kleopatra999,项目名称:grr,代码行数:7,代码来源:setup.py

示例4: make_release_tree

 def make_release_tree(self, basedir, files):
     clean_tables()
     build_tables()
     dirty = dirty_version()
     sdist.make_release_tree(self, basedir, files)
     if dirty:
         discard_changes()
开发者ID:kyokley,项目名称:xonsh,代码行数:7,代码来源:setup.py

示例5: make_release_tree

 def make_release_tree(self, base_dir, files):
     print("in sdist_testimages.make_release_tree")
     sdist.make_release_tree(self, base_dir, files)
     for afile in self.to_remove:
         dest = os.path.join(base_dir, afile)
         if os.path.exists(dest):
             os.unlink(dest)
开发者ID:payno,项目名称:fabio,代码行数:7,代码来源:setup.py

示例6: make_release_tree

 def make_release_tree(self, base_dir, files):
     if 'flent/build_info.py' in files and not self.dry_run:
         files = [f for f in files if f != 'flent/build_info.py']
         _sdist.make_release_tree(self, base_dir, files)
         rewrite_build_info(os.path.join(base_dir, 'flent/build_info.py'))
     else:
         _sdist.make_release_tree(self, base_dir, files)
开发者ID:dchangtw,项目名称:flent,代码行数:7,代码来源:setup.py

示例7: make_release_tree

    def make_release_tree (self, base_dir, files, ) :
        sdist_orig.make_release_tree(self, base_dir, files, )

        with file(os.path.join(base_dir, "__version__.py", ), "w", ) as f :
            f.write(
                    "VERSION = \"%s\"" % getattr(self.distribution.metadata, "version", )
                )
开发者ID:srothan,项目名称:io,代码行数:7,代码来源:_setup.py

示例8: make_release_tree

 def make_release_tree(self, basedir, files):
     clean_tables()
     build_tables()
     dirty = dirty_version()
     sdist.make_release_tree(self, basedir, files)
     if dirty:
         restore_version()
开发者ID:BlaXpirit,项目名称:xonsh,代码行数:7,代码来源:setup.py

示例9: make_release_tree

    def make_release_tree(self, *a, **kw):
        dist_path = self.distribution.get_fullname()

        sdist.make_release_tree(self, *a, **kw)

        self.reinitialize_command('build_static', work_path=dist_path,
                                  force=True)
        self.run_command('build_static')
开发者ID:nakamura41,项目名称:sentry,代码行数:8,代码来源:setup.py

示例10: make_release_tree

    def make_release_tree(self, base_dir, files):
        orig_sdist.make_release_tree(self, base_dir, files)

        # add additional dependecies in the required version
        for name, tar_src in self.contrib:
            tarball = tar_src.format(versions[name + '_version'])
            print("Downloading and adding {} sources from {}".format(name, tarball))
            subprocess.call('wget -O - -q {} | tar xz -C {} --one-top-level=contrib/{} --strip-components=1'.format(
                   tarball, base_dir, name), shell=True)
开发者ID:osmcode,项目名称:pyosmium,代码行数:9,代码来源:setup.py

示例11: make_release_tree

 def make_release_tree (self, base_dir, files):
     _sdist.make_release_tree(self, base_dir, files)
     orig = path.join('lib', 'git', '__init__.py')
     assert path.exists(orig)
     dest = path.join(base_dir, orig)
     if hasattr(os, 'link') and path.exists(dest):
         os.unlink(dest)
     self.copy_file(orig, dest)
     _stamp_version(dest)
开发者ID:directeur,项目名称:git-python,代码行数:9,代码来源:setup.py

示例12: make_release_tree

 def make_release_tree(self, base_dir, files):
     _sdist.make_release_tree(self, base_dir, files)
     orig = path.join("git", "__init__.py")
     assert path.exists(orig), orig
     dest = path.join(base_dir, orig)
     if hasattr(os, "link") and path.exists(dest):
         os.unlink(dest)
     self.copy_file(orig, dest)
     _stamp_version(dest)
开发者ID:isaacde,项目名称:rmtoo,代码行数:9,代码来源:setup.py

示例13: make_release_tree

 def make_release_tree(self, base_dir, files):
     _sdist.make_release_tree(self, base_dir, files)
     # now locate _version.py in the new base_dir directory (remembering
     # that it may be a hardlink) and replace it with an updated value
     target_versionfile = os.path.join(base_dir, versionfile_source)
     print("UPDATING %s" % target_versionfile)
     os.unlink(target_versionfile)
     with open(target_versionfile, "w") as f:
         f.write(SHORT_VERSION_PY % self._versioneer_generated_versions)
开发者ID:gobie28,项目名称:MetPy,代码行数:9,代码来源:versioneer.py

示例14: make_release_tree

 def make_release_tree(self, base_dir, files):
     root = get_root()
     cfg = get_config_from_root(root)
     _sdist.make_release_tree(self, base_dir, files)
     # now locate _version.py in the new base_dir directory
     # (remembering that it may be a hardlink) and replace it with an
     # updated value
     target_versionfile = os.path.join(base_dir, cfg.versionfile_source)
     print("UPDATING %s" % target_versionfile)
     write_to_version_file(target_versionfile,
                           self._versioneer_generated_versions)
开发者ID:cryfs,项目名称:python-versioneer,代码行数:11,代码来源:cmdclass.py

示例15: make_release_tree

    def make_release_tree(self, *a, **kw):
        dist_path = self.distribution.get_fullname()

        sdist.make_release_tree(self, *a, **kw)

        self.reinitialize_command('build_static', work_path=dist_path)
        self.run_command('build_static')

        with open(os.path.join(dist_path, 'sentry-package.json'), 'w') as fp:
            json.dump({
                'createdAt': datetime.datetime.utcnow().isoformat() + 'Z',
            }, fp)
开发者ID:stig,项目名称:sentry,代码行数:12,代码来源:setup.py


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