def to_copy(self):
    'Create a copy of the package'
    descriptor = self.to_dict()
    descriptor.pop('resources', None)
    resources = []
    for resource in self.resources:
        resources.append(resource.to_copy())
    return Package(descriptor, resources=resources, basepath=self.__basepath, onerror=self.__onerror, trusted=self.__trusted)
Create a copy of the package
def to_copy(self):
    
    descriptor = self.to_dict()
    descriptor.pop('resources', None)
    resources = []
    for resource in self.resources:
        resources.append(resource.to_copy())
    return Package(descriptor, resources=resources, basepath=self.__basepath, onerror=self.__onerror, trusted=self.__trusted)