예제 #1
0
def save(package):
    """Save Package changes to disk. The package _must_ already exist on disk. That is, it must be created with dpm.lib.init before.

    :param package:
        - The package that will be updated on disk
    :type package: :py:class:`Package <dpm.package.Package>`

    :return:
        - :py:class:`Package <dpm.package.Package>` -- The Package object stored at package_path
    """
    try:
        dpm.load_package("file://" + package.installed_path)
    except (IOError, TypeError):
        raise ValueError(
            "No valid installation path at " + str(package.installed_path) + ". Have you inited the package before?")

    package.dist.write(package.installed_path)
    package.name = os.path.basename(package.installed_path)
    return package
예제 #2
0
 def _test_load_package(self):
     pkg = dpm.load_package(self.file_spec)
예제 #3
0
파일: test_misc.py 프로젝트: robmyers/dpm
 def _test_load_package(self):
     pkg = dpm.load_package(self.file_spec)