コード例 #1
0
ファイル: gen_doc_api.py プロジェクト: d9pouces/StarterPyth
    def __init__(self, *args, **kwargs):
        Command.__init__(self, *args, **kwargs)

        self.api_dir = os.path.join('doc', 'source', 'api')
        self.overwrite = 0
        self.pre_rm = 0
        self.modules_to_exclude = ''
コード例 #2
0
ファイル: __init__.py プロジェクト: shakthydoss/suriyan
 def __init__(self, dist, **kw):
     """
     Construct the command for dist, updating
     vars(self) with any keyword parameters.
     """
     _Command.__init__(self, dist)
     vars(self).update(kw)
コード例 #3
0
ファイル: distutils.py プロジェクト: pypa/readme_renderer
    def check_restructuredtext(self):
        """
        Checks if the long string fields are reST-compliant.
        """
        # Warn that this command is deprecated
        # Don't use self.warn() because it will cause the check to fail.
        Command.warn(
            self,
            "This command has been deprecated. Use `twine check` instead: "
            "https://packaging.python.org/guides/making-a-pypi-friendly-readme"
            "#validating-restructuredtext-markup"
        )

        data = self.distribution.get_long_description()
        content_type = getattr(
            self.distribution.metadata, 'long_description_content_type', None)

        if content_type:
            content_type, _ = cgi.parse_header(content_type)
            if content_type != 'text/x-rst':
                self.warn(
                    "Not checking long description content type '%s', this "
                    "command only checks 'text/x-rst'." % content_type)
                return

        # None or empty string should both trigger this branch.
        if not data or data == 'UNKNOWN':
            self.warn(
                "The project's long_description is either missing or empty.")
            return

        stream = _WarningStream()
        markup = render(data, stream=stream)

        if markup is None:
            self.warn(
                "The project's long_description has invalid markup which will "
                "not be rendered on PyPI. The following syntax errors were "
                "detected:\n%s" % stream)
            return

        self.announce(
            "The project's long description is valid RST.",
            level=distutils.log.INFO)
コード例 #4
0
ファイル: gen_doc.py プロジェクト: chrmorais/StarterPyth
 def __init__(self, *args, **kwargs):
     Command.__init__(self, *args, **kwargs)
     self.doc_dir = 'doc/source'
     self.build_dir = 'doc/build'
     self.clean = 0
     self.html = None
     self.dirhtml = None
     self.singlehtml = None
     self.pickle = None
     self.json = None
     self.htmlhelp = None
     self.epub = None
     self.latex = None
     self.latexpdf = None
     self.text = None
     self.man = None
     self.changes = None
     self.linkcheck = None
     self.doctest = None
コード例 #5
0
ファイル: extract_dist.py プロジェクト: fedora-python/pyp2rpm
    def __init__(self, *args, **kwargs):
        """Metadata dictionary is created, all the metadata attributes, that were 
        not found are set to default empty values. Checks of data types are performed.
        """
        Command.__init__(self, *args, **kwargs)

        self.metadata = {}

        for attr in ['setup_requires', 'tests_require', 'install_requires',
                     'packages', 'py_modules', 'scripts']:
            self.metadata[attr] = to_list(getattr(self.distribution, attr, []))

        for attr in ['url', 'long_description', 'description', 'license']:
            self.metadata[attr] = to_str(getattr(self.distribution.metadata, attr, None))

        self.metadata['classifiers'] = to_list(getattr(self.distribution.metadata,
                                                       'classifiers', []))

        if isinstance(getattr(self.distribution, "entry_points", None), dict):
            self.metadata['entry_points'] = self.distribution.entry_points
        else:
            self.metadata['entry_points'] = None

        self.metadata['test_suite'] = getattr(self.distribution, "test_suite", None) is not None
コード例 #6
0
ファイル: setup.py プロジェクト: futuresimple/RISE
 def __init__(self, distribution, source=None):
     Command.__init__(self, distribution)
     self.source = source
コード例 #7
0
ファイル: setup.py プロジェクト: StefenYin/sympy
 def __init__(self, *args):
     self.args = args[0] # so we can pass it to other classes
     Command.__init__(self, *args)
コード例 #8
0
ファイル: setup.py プロジェクト: franckCJ/pythran
 def __init__(self, *args, **kwargs):
     Command.__init__(self, *args, **kwargs)
コード例 #9
0
ファイル: setup.py プロジェクト: irinabov/debian-qpid-python
          fdst.write(actor(fsrc.read()))
        finally:
          fsrc.close()
          fdst.close()

        if preserve_mode or preserve_times:
          st = os.stat(src)

          if preserve_times:
            os.utime(dst, (st[ST_ATIME], st[ST_MTIME]))
          if preserve_mode:
            os.chmod(dst, S_IMODE(st[ST_MODE]))

        return (dst, 1)
    else:
      return Command.copy_file(self, src, dst, preserve_mode, preserve_times,
                               link, level)

doc_option = [('build-doc', None, 'build directory for documentation')]

class build(_build):

  user_options = _build.user_options + doc_option

  def initialize_options(self):
    _build.initialize_options(self)
    self.build_doc = None

  def finalize_options(self):
    _build.finalize_options(self)
    if self.build_doc is None:
      self.build_doc = "%s/doc" % self.build_base
コード例 #10
0
ファイル: distutilscmd.py プロジェクト: AIdrifter/samba
 def __init__(self, dist):
     Command.__init__(self, dist)
     self.runner = TestToolsTestRunner(sys.stdout)
コード例 #11
0
ファイル: setup.py プロジェクト: IgnitionProject/ignition
 def __init__ (self, *args):
     self.args = args[0]
     Command.__init__(self, *args)
コード例 #12
0
ファイル: helper.py プロジェクト: ApolloVonSol/hyperion
 def __init__(self, dist):
     Command.__init__(self, dist)
     self.verbose = False  # __init__ sets verbose to True after calling initialize_options
コード例 #13
0
ファイル: __init__.py プロジェクト: Yankur/Web-application
find_packages = PackageFinder.find
>>>>>>> 54eef0be98b1b67c8507db91f4cfa90b64991027

setup = distutils.core.setup

_Command = _get_unpatched(_Command)

class Command(_Command):
    __doc__ = _Command.__doc__

    command_consumes_arguments = False

    def __init__(self, dist, **kw):
<<<<<<< HEAD
        # Add support for keyword arguments
        _Command.__init__(self,dist)
        for k,v in kw.items():
            setattr(self,k,v)

    def reinitialize_command(self, command, reinit_subcommands=0, **kw):
        cmd = _Command.reinitialize_command(self, command, reinit_subcommands)
        for k,v in kw.items():
            setattr(cmd,k,v)    # update command with keywords
        return cmd

distutils.core.Command = Command    # we can't patch distutils.cmd, alas

def findall(dir = os.curdir):
    """Find all files under 'dir' and return the list of full filenames
    (relative to 'dir').
    """
コード例 #14
0
ファイル: __init__.py プロジェクト: jancajthaml-devops/ona
 def reinitialize_command(self, command, reinit_subcommands=0, **kw):
     cmd = _Command.reinitialize_command(self, command, reinit_subcommands)
     vars(cmd).update(kw)
     return cmd
コード例 #15
0
 def __init__(self, dist):
     Command.__init__(self, dist)
     self.runner = TestToolsTestRunner(sys.stdout)
コード例 #16
0
 def __init__(self, *args, **kwargs):
     Command.__init__(self, *args, **kwargs)
コード例 #17
0
ファイル: setup.py プロジェクト: alanconway/qpid
          fdst.write(actor(fsrc.read()))
        finally:
          fsrc.close()
          fdst.close()

        if preserve_mode or preserve_times:
          st = os.stat(src)

          if preserve_times:
            os.utime(dst, (st[ST_ATIME], st[ST_MTIME]))
          if preserve_mode:
            os.chmod(dst, S_IMODE(st[ST_MODE]))

        return (dst, 1)
    else:
      return Command.copy_file(self, src, dst, preserve_mode, preserve_times,
                               link, level)

doc_option = [('build-doc', None, 'build directory for documentation')]

class build(_build):

  user_options = _build.user_options + doc_option

  def initialize_options(self):
    _build.initialize_options(self)
    self.build_doc = None

  def finalize_options(self):
    _build.finalize_options(self)
    if self.build_doc is None:
      self.build_doc = "%s/doc" % self.build_base
コード例 #18
0
 def __init__(self, dist):
     Command.__init__(self, dist)
     self.sub_commands = ['build']
コード例 #19
0
ファイル: build_ext.py プロジェクト: Bitez/GoogleMusic.bundle
 def __init__(self, dist):
     self._compiler = None
     Command.__init__(self, dist)
コード例 #20
0
ファイル: pseudo_l10n.py プロジェクト: d9pouces/StarterPyth
 def __init__(self, dist=None):
     Command.__init__(self, dist=dist)
     self.language = 'xx_XX'
     self.dest = None
コード例 #21
0
ファイル: gen_doc_api.py プロジェクト: chrmorais/StarterPyth
 def __init__(self, *args, **kwargs):
     Command.__init__(self, *args, **kwargs)
     self.api_dir = os.path.join('doc', 'source', 'api')
     self.overwrite = 0
     self.pre_rm = 0
コード例 #22
0
 def __init__(self, dist, **kw):
     # Add support for keyword arguments
     _Command.__init__(self,dist)
     for k,v in kw.items():
         setattr(self,k,v)
コード例 #23
0
ファイル: setup.py プロジェクト: UtahDave/pywinrm
 def __init__(self, dist):
     Command.__init__(self, dist)
     self.project_dir = os.path.abspath(os.path.dirname(__file__))
     self.temp_dir = os.path.join(self.project_dir, '~temp')
     self.virtualenv_dir = os.path.join(self.project_dir, 'env')
コード例 #24
0
 def reinitialize_command(self, command, reinit_subcommands=0, **kw):
     cmd = _Command.reinitialize_command(self, command, reinit_subcommands)
     for k,v in kw.items():
         setattr(cmd,k,v)    # update command with keywords
     return cmd
コード例 #25
0
ファイル: setup.py プロジェクト: vijvijay/rapidapp
 def __init__(self, *args, **kwargs):
     Command.__init__(self, *args)
     build_installer.__init__(self, dist_dir=self.dist_dir)
コード例 #26
0
 def __init__(self, dist, **kwargs):
     self.shell = None
     self.output = None
     Command.__init__(self, dist, **kwargs)
コード例 #27
0
 def __init__(self, dist):
     Command.__init__(self, dist)
     self.verbose = False  # __init__ sets verbose to True after calling initialize_options
コード例 #28
0
ファイル: __init__.py プロジェクト: shakthydoss/suriyan
 def reinitialize_command(self, command, reinit_subcommands=0, **kw):
     cmd = _Command.reinitialize_command(self, command, reinit_subcommands)
     vars(cmd).update(kw)
     return cmd
コード例 #29
0
 def __init__(self, dist=None):
     Command.__init__(self, dist=dist)
     self.language = 'fr_FR'
     self.dest = None
     self.domain = None
コード例 #30
0
ファイル: __init__.py プロジェクト: ArtRichards/tahoe-lafs
 def __init__(self, dist, **kw):
     # Add support for keyword arguments
     _Command.__init__(self,dist)
     for k,v in kw.items():
         setattr(self,k,v)
コード例 #31
0
ファイル: setup.py プロジェクト: conwayje/ase-python
 def __init__(self, dist):
     Command.__init__(self, dist)
     self.sub_commands = ['build']
コード例 #32
0
ファイル: setup.py プロジェクト: zbrdge/pywinrm
 def __init__(self, dist):
     Command.__init__(self, dist)
     self.project_dir = os.path.abspath(os.path.dirname(__file__))
     self.temp_dir = os.path.join(self.project_dir, '~temp')
     self.virtualenv_dir = os.path.join(self.project_dir, 'env')
コード例 #33
0
ファイル: setup.py プロジェクト: vchekan/sympy
 def __init__(self, *args):
     self.args = args[0]  # so we can pass it to other classes
     Command.__init__(self, *args)
コード例 #34
0
 def warn(self, msg):
     self._warnings += 1
     return Command.warn(self, msg)
コード例 #35
0
ファイル: check.py プロジェクト: AllenWeb/goagent-ios
 def warn(self, msg):
     """Counts the number of warnings that occurs."""
     self._warnings += 1
     return Command.warn(self, msg)
コード例 #36
0
 def warn(self, msg):
     """Counts the number of warnings that occurs."""
     self._warnings += 1
     return Command.warn(self, msg)
コード例 #37
0
ファイル: __init__.py プロジェクト: ArtRichards/tahoe-lafs
 def reinitialize_command(self, command, reinit_subcommands=0, **kw):
     cmd = _Command.reinitialize_command(self, command, reinit_subcommands)
     for k,v in kw.items():
         setattr(cmd,k,v)    # update command with keywords
     return cmd
コード例 #38
0
 def __init__(self, dist):
     self._compiler = None
     Command.__init__(self, dist)