Пример #1
0
 def get_cmd(self, metadata=None):
     """Returns a cmd"""
     if metadata is None:
         metadata = {'name': 'fake', 'version': '1.0',
                     'url': 'xxx', 'author': 'xxx',
                     'author_email': 'xxx'}
     dist = Distribution(metadata)
     dist.script_name = 'setup.py'
     dist.packages = ['somecode']
     dist.include_package_data = True
     cmd = sdist(dist)
     cmd.dist_dir = 'dist'
     def _warn(*args):
         pass
     cmd.warn = _warn
     return dist, cmd
Пример #2
0
    def get_cmd(self, metadata=None):
        """Returns a cmd"""
        if metadata is None:
            metadata = {"name": "fake", "version": "1.0", "url": "xxx", "author": "xxx", "author_email": "xxx"}
        dist = Distribution(metadata)
        dist.script_name = "setup.py"
        dist.packages = ["somecode"]
        dist.include_package_data = True
        cmd = sdist(dist)
        cmd.dist_dir = "dist"

        def _warn(*args):
            pass

        cmd.warn = _warn
        return dist, cmd