You are not logged in.
I just try to run python line:
import setuptools.extern
using pacman's python-setuptools package and it returns ModuleNotFoundError. After investigation, I found out that extern library folder is missing from python-setuptools package content hence it doesn't provide `setuptools.extern`. After trying the line above using setuptools package from different source, I get this result:
installing latest setuptools 50.3.0 from pip in virtual environment in Arch provides `setuptools.extern`. Good
installing python3-setuptools 45.2.0 from apt in Ubuntu provides `setuptools.extern`. Good
installing latest python-setuptools 50.3.0 from pacman doesn’t provide `setuptools.extern`. Why?
Last edited by xeromycota (2020-10-06 20:39:55)
Offline
prepare() { rm -r setuptools-$pkgver/{pkg_resources,setuptools}/{extern,_vendor} # Upstream devendoring logic is badly broken, see: # https://bugs.archlinux.org/task/58670 # https://github.com/pypa/pip/issues/5429 # https://github.com/pypa/setuptools/issues/1383 # The simplest fix is to simply rewrite import paths to use the canonical # location in the first place for _module in setuptools pkg_resources '' ; do find setuptools-$pkgver -name \*.py -exec sed -i \ -e 's/from '$_module.extern' import/import/' \ -e 's/from '$_module.extern'./from /' \ -e 's/import '$_module.extern'./import /' \ -e "s/__import__('$_module.extern./__import__('/" \ {} + done
Inofficial first vice president of the Rust Evangelism Strike Force
Offline
Import the modules you need, don't rely on things bundled with pip. It would be pretty stupid to use them outside of pip anyway.
Offline
PKGBUILD wrote:prepare() { rm -r setuptools-$pkgver/{pkg_resources,setuptools}/{extern,_vendor} # Upstream devendoring logic is badly broken, see: # https://bugs.archlinux.org/task/58670 # https://github.com/pypa/pip/issues/5429 # https://github.com/pypa/setuptools/issues/1383 # The simplest fix is to simply rewrite import paths to use the canonical # location in the first place for _module in setuptools pkg_resources '' ; do find setuptools-$pkgver -name \*.py -exec sed -i \ -e 's/from '$_module.extern' import/import/' \ -e 's/from '$_module.extern'./from /' \ -e 's/import '$_module.extern'./import /' \ -e "s/__import__('$_module.extern./__import__('/" \ {} + done
I don't understand bash script, but I know what the comment says. Two questions remain, where they move the `extern` package? How do I import it?
Offline
I don't understand bash script, but I know what the comment says. Two questions remain, where they move the `extern` package? How do I import it?
Do not use it. It is not public API. You are not permitted to assume it exists, even if it does coincidentally happen to exist on Ubuntu -- future versions of setuptools may drop it at any time. In fact, setuptools versions 34.0.0 up until 36.0.0 actually did drop it, before reintroducing it due to bootstrapping issues, but they have stated for the record as soon as the bootstrappping issue is fixed, they will drop it once more.
For the modules vendored in setuptools.extern you MUST depend on them like normal modules, and import them like normal modules. There are no ifs, ands, or buts.
Managing AUR repos The Right Way -- aurpublish (now a standalone tool)
Offline