Same package and version, but why pacman's python-setuptools differ from pip?

This is the content of pacman’s python-setuptools package at /usr/lib/python3.8/site-packages/setuptools. As you can see, the extern sub-package/folder is missing.            'script (dev).tmpl'         script.tmpl
command                   _distutils                __pycache__

Now this is pip’s setuptools in my virtual environment at /.local/share/virtualenvs/ros2_foxy-8tYMXHqm/lib/python3.8/site-packages/setuptools. You can see it has extern item.   gui-32.exe                 gui-64.exe    
 cli-32.exe                   gui.exe        _vendor
 cli-64.exe        _distutils      
 command               extern                'script (dev).tmpl'            script.tmpl

Both package version is 50.3.0. Any ideas why this happen?

looks also some windows libs in between?

This is the list from apt’s python3-setuptools 45.2.0 package in my Ubuntu which also has extern:                         extern      __pycache__
 cli-32.exe           _vendor
 cli-64.exe               gui-32.exe     'script (dev).tmpl'
 cli.exe                    gui-64.exe      script.tmpl
 command                  gui.exe

Why python3-setuptools only missing extern when installed from pacman? This problem breaks my application. What is the best place to report this issue?

As you can see, the version numbers are quite different on Arch and Ubuntu.
That leads to believe that the new version has replaced ‘extern’ functionality with something else.

With command

  LANG=C pacman -Si python-setuptools

you can see more information about the package. Look for the line starting with URL:, that gives you the address where to find more details.

Or if there are some python gurus here, maybe they can help you more.

also this is kinda scattered i think.

sure arch has there reasons probably. Debian packaging is also a Different power house then Arch packagaging for sure

just for sneakpeak !

[ringo@Godofhighschool ~]$ pkgfile gui-32.exe
[ringo@Godofhighschool ~]$

is like also a part of another package.

jython /opt/jython/Lib/site-packages/setuptools/gui-32.exe
jython /opt/jython/Lib/site-packages/setuptools/gui-64.exe
jython /opt/jython/Lib/site-packages/setuptools/gui.exe

thats also again related more to java jython…


I don’t understand. setuptools.extern should be available on all setuptools library no matter if it is ubuntu/arch/windows. I have already check the source at setuptools github and setuptools.extern indeed available at least from tag 45.2.0 . So the fact that trouble me are:

  • installing latest setuptools 50.3.0 from pip provide setuptools.extern. Good
  • installing python3-setuptools 45.2.0 from apt provide setuptools.extern. Good
  • installing latest python-setuptools 50.3.0 from pacman doesn’t provide setuptools.extern. Why?

actually i dont know, but in arch is more in parted then pieces i think… i really dont know. Arch moves fast also thats reason to part for debian is more LTS they patch it also and other parts they splitted for there own thing but i dont know why… :slight_smile:
mayby someone can answer.

Well, I found out why, this is the PKGBUILD script

prepare() {
  rm -r setuptools-$pkgver/{pkg_resources,setuptools}/{extern,_vendor}

  # Upstream devendoring logic is badly broken, see:
  # 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__('/" \
          {} +

One question remain: according to this script, where they move the ‘extern’ package? I don’t understand bash script.

like in

Yeah, that is me, next time I have trouble with Arch I will ask in Arch newbie corner. I just create Arch forum account few hours ago.

yeah im not so python but cannot find any extern module…ether