def package_url(self):
        """Return the package URL associated with this metadata"""

        if self.resource_file == DEFAULT_METATAB_FILE or self.target_format in ('txt','ipynb'):
            u = self.inner.clone().clear_fragment()
            u.path = dirname(self.path) + '/'
            u.scheme_extension = 'metapack'
        else:
            u = self

        return MetapackPackageUrl(str(u.clear_fragment()), downloader=self._downloader)