Пример #1
0
    def package_source(self):
        """
        :returns: this subcommand's source.
        :rtype: str
        """

        source_path = os.path.join(self._dir(), 'source')
        return util.read_file(source_path)
Пример #2
0
    def package_source(self):
        """
        :returns: this subcommand's source.
        :rtype: str
        """

        source_path = os.path.join(self._dir(), 'source')
        return util.read_file(source_path)
Пример #3
0
    def package_version(self):
        """
        :returns: this subcommand's version.
        :rtype: str
        """

        version_path = os.path.join(self._dir(), 'version')
        return util.read_file(version_path)
Пример #4
0
    def package_revision(self):
        """
        :returns: this subcommand's version.
        :rtype: str
        """

        version_path = os.path.join(self._dir(), 'version')
        return util.read_file(version_path)
Пример #5
0
    def package_revision(self):
        """
        :returns: this subcommand's revision.
        :rtype: str
        """

        revision_path = os.path.join(self._dir(), "version")
        return util.read_file(revision_path)
Пример #6
0
    def _data(self, path):
        """Returns the content of the supplied file, relative to the base path.

        :param path: The relative path to the file to read
        :type path: str
        :returns: File content of the supplied path
        :rtype: str
        """

        full_path = os.path.join(self.path, path)
        return util.read_file(full_path)
Пример #7
0
    def _data(self, revision, name):
        """Returns the content of the file named `name` in the directory named
        `revision`

        :param revision: the package revision
        :type revision: str
        :param name: file name
        :type name: str
        :returns: File content of the supplied path
        :rtype: str
        """

        path = os.path.join(revision, name)
        full_path = os.path.join(self.path, path)
        return util.read_file(full_path)
Пример #8
0
    def _data(self, revision, name):
        """Returns the content of the file named `name` in the directory named
        `revision`

        :param revision: the package revision
        :type revision: str
        :param name: file name
        :type name: str
        :returns: File content of the supplied path
        :rtype: str
        """

        path = os.path.join(revision, name)
        full_path = os.path.join(self.path, path)
        return util.read_file(full_path)