Closed AchmadFathoni closed 3 years ago
Please do not cross post: https://answers.ros.org/question/362883/fail-building-foxy-modulenotfounderror-no-module-named-setuptoolsextern/ Especially without referencing the duplicate posts.
Well, somehow installing setuptools
from arch package manager doesn't include extern
sub-package. Here is the content of /usr/lib/python3.8/site-packages/setuptools
which missing extern
archive_util.py dist.py installer.py py34compat.py version.py
build_meta.py _distutils launch.py __pycache__ wheel.py
command errors.py lib2to3_ex.py sandbox.py windows_support.py
config.py extension.py monkey.py 'script (dev).tmpl'
depends.py glob.py msvc.py script.tmpl
_deprecation_warning.py _imp.py namespaces.py ssl_support.py
dep_util.py __init__.py package_index.py unicode_utils.py
Here is my setuptools
that I installed from virtual environment from /.local/share/virtualenvs/ros2_foxy-8tYMXHqm/lib/python3.8/site-packages/setuptools
which has extern
.
archive_util.py _deprecation_warning.py gui-32.exe monkey.py ssl_support.py
build_meta.py dep_util.py gui-64.exe msvc.py unicode_utils.py
cli-32.exe dist.py gui.exe namespaces.py _vendor
cli-64.exe _distutils _imp.py package_index.py version.py
cli.exe errors.py __init__.py py34compat.py wheel.py
command extension.py installer.py sandbox.py windows_support.py
config.py extern launch.py 'script (dev).tmpl'
depends.py glob.py lib2to3_ex.py script.tmpl
I am done, you can close my issue and pull request now.
somehow installing
setuptools
from arch package manager doesn't includeextern
sub-package.
@AchmadFathoni Can you file a ticket with Arch about this problem and post the link here for future readers?
somehow installing
setuptools
from arch package manager doesn't includeextern
sub-package.@AchmadFathoni Can you file a ticket with Arch about this problem and post the link here for future readers?
This is Arch's python-setuptools
PKGBUILD. I don't understands advanced bash script. If you know bash @dirk-thomas, do you know where they remove extern
package? and what python line should I use?
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
do you know where they remove extern package?
rm -r setuptools-$pkgver/{pkg_resources,setuptools}/{extern,_vendor}
do you know where they remove extern package?
rm -r setuptools-$pkgver/{pkg_resources,setuptools}/{extern,_vendor}
So according to that PKGBUILD. what line should is use to import extern
now? Or specifiacally Specifier
object.
I am sorry, I don't understand the question.
I am sorry, I don't understand the question.
Sorry I just woke up and it is 3AM here. Let me repeat my question.
So according to that PKGBUILD, what line should I is use to import extern
package now? Or specially Specifier
object.
Anyway, This is my thread on Arch's newbie corner. The post number 5 explains a lot about this problem.
I don't know anything about PKGBUILD
. I would assume removing the line starting with rm -r
would be a start.
This is my thread on Arch's newbie corner. The post number 5 explains a lot about this problem.
It sounds like Arch did drop those modules intentionally and doesn't want to readd them.
Please see my comment / question on https://github.com/colcon/colcon-python-setup-py/pull/42#issuecomment-704408599 to instead try a fix I proposed.
Hello what's the solution for ros2 humble? It's still happening apparently
I have tried to compile ros2 rolling on my Arch Linux but got this error:
Fixed by changing
python_setup_py.py
line 251:'from setuptools.extern.packaging.specifiers import SpecifierSet',
to'from packaging.specifiers import SpecifierSet',