Package Details: python2-setuptools 2:44.1.1-2

Git Clone URL: https://aur.archlinux.org/python2-setuptools.git (read-only, click to copy)
Package Base: python2-setuptools
Description: Easily download, build, install, upgrade, and uninstall Python packages
Upstream URL: https://pypi.org/project/setuptools
Licenses: PSF
Provides: python2-distribute
Replaces: python2-distribute
Submitter: jelly
Maintainer: tallero (truocolo)
Last Packager: truocolo
Votes: 29
Popularity: 2.73
First Submitted: 2022-09-22 16:43 (UTC)
Last Updated: 2024-01-27 13:32 (UTC)

Latest Comments

« First ‹ Previous 1 2 3 Next › Last »

superyu1337 commented on 2022-11-18 00:22 (UTC)

I keep getting this error:

Could not find platform independent libraries <prefix>
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
ImportError: No module named site

drws commented on 2022-10-31 03:53 (UTC) (edited on 2022-10-31 03:53 (UTC) by drws)

I have been able to build the package by fixing the PKGBUILD with @emceebois's solution:

build() {
  cd setuptools-$pkgver
  python2 bootstrap.py || true
  echo "Version:$pkgver" > setuptools.egg-info/PKG-INFO
  python2 bootstrap.py
  python2 setup.py build
}

However, this appears to be a bug in bootstrap.py we are working around. This should be only a temporary solution. Has anybody reported or find it reported yet?

emceebois commented on 2022-10-26 19:21 (UTC)

I'm not familiar with the PKGBUILD system to be honest but if there's some way to inject arbitrary terminal commands in the PKGBUILD and bootstrap.py doesn't do anything weird with folder ownership or permissions when it creates the .egg-info folder then you should be able to create the .egg-info folder, create the PKG-INFO file, and inject the correct string into it before trying to run the bootstrap.py command.

gnaggnoyil commented on 2022-10-26 17:55 (UTC)

@emceebois Thanks for your workaround. Do you know how can we modify PKGBUILD so that we can apply your workaround and then run makepkg to build the package?

emceebois commented on 2022-10-25 16:59 (UTC)

Hey @gnaggnoyil, @jester, @kamazeuci, et al. It seems like the bootstrap.py process is trying and failing to infer the version number of the package which it's supposed to put into the setuptools.egg-info folder it creates. I was able to get around this error by doing the following:

  1. Clone the repo
  2. Go into the src/setuptools-44.1.1 folder
  3. Manually run the command python2 bootstrap.py (this will fail and generate the error, but it creates the setuptools.egg-info folder)
  4. Manually create the PKG-INFO file inside of setuptools.egg-info
  5. Edit PKG-INFO to read the following: Version:44.1.1
  6. From the src/setuptools-44.1.1 folder, re-run python2 bootstrap.py. This should succeed
  7. Finally, run sudo python2 setup.py install

chowbok commented on 2022-10-24 07:12 (UTC)

This package doesn't compile with python2-bin. You need to compile and install the regular python2 AUR package.

ak2021 commented on 2022-10-10 09:48 (UTC)

Any help with this?

Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
Traceback (most recent call last):
  File "bootstrap.py", line 13, in <module>
    import subprocess
  File "/usr/lib/python2.7/subprocess.py", line 72, in <module>
    import select
ImportError: No module named select
==> ERROR: A failure occurred in build().
    Aborting...
error: failed to build 'python2-setuptools-2:44.1.1-2': 
error: packages failed to build: python2-setuptools-2:44.1.1-2

kamazeuci commented on 2022-10-04 19:43 (UTC)

I am having same problem. seems to have to do with PYTHONPATH and PYTHONHOME variables? How should they be set?

jester commented on 2022-10-01 19:48 (UTC)

I have the same problem

gnaggnoyil commented on 2022-09-29 16:14 (UTC)

I've met the following error when building with yay:

==> Starting build()...
adding minimal entry_points
Regenerating egg_info
Traceback (most recent call last):
  File "setup.py", line 155, in <module>
    dist = setuptools.setup(**setup_params)
  File "/home/gnaggnoyil-wsl/.cache/yay/python2-setuptools/src/setuptools-44.1.1/setuptools/__init__.py", line 162, in setup
    return distutils.core.setup(**attrs)
  File "/usr/lib/python2.7/distutils/core.py", line 111, in setup
    _setup_distribution = dist = klass(attrs)
  File "/home/gnaggnoyil-wsl/.cache/yay/python2-setuptools/src/setuptools-44.1.1/setuptools/dist.py", line 448, in __init__
    k: v for k, v in attrs.items()
  File "/usr/lib/python2.7/distutils/dist.py", line 287, in __init__
    self.finalize_options()
  File "/home/gnaggnoyil-wsl/.cache/yay/python2-setuptools/src/setuptools-44.1.1/setuptools/dist.py", line 739, in finalize_options
    for ep in sorted(eps, key=by_order):
  File "/home/gnaggnoyil-wsl/.cache/yay/python2-setuptools/src/setuptools-44.1.1/setuptools/dist.py", line 738, in <lambda>
    eps = map(lambda e: e.load(), pkg_resources.iter_entry_points(group))
  File "/home/gnaggnoyil-wsl/.cache/yay/python2-setuptools/src/setuptools-44.1.1/pkg_resources/__init__.py", line 2442, in load
    self.require(*args, **kwargs)
  File "/home/gnaggnoyil-wsl/.cache/yay/python2-setuptools/src/setuptools-44.1.1/pkg_resources/__init__.py", line 2465, in require
    items = working_set.resolve(reqs, env, installer, extras=self.extras)
  File "/home/gnaggnoyil-wsl/.cache/yay/python2-setuptools/src/setuptools-44.1.1/pkg_resources/__init__.py", line 769, in resolve
    if dist is None or (dist not in req and replace_conflicting):
  File "/home/gnaggnoyil-wsl/.cache/yay/python2-setuptools/src/setuptools-44.1.1/pkg_resources/__init__.py", line 3133, in __contains__
    item = item.version
  File "/home/gnaggnoyil-wsl/.cache/yay/python2-setuptools/src/setuptools-44.1.1/pkg_resources/__init__.py", line 2689, in version
    raise ValueError(msg, self)
ValueError: ("Missing 'Version:' header and/or PKG-INFO file at path: /home/gnaggnoyil-wsl/.cache/yay/python2-setuptools/src/setuptools-44.1.1/setuptools.egg-info/PKG-INFO", setuptools [unknown version] (/home/gnaggnoyil-wsl/.cache/yay/python2-setuptools/src/setuptools-44.1.1))
Traceback (most recent call last):
  File "bootstrap.py", line 64, in <module>
    __name__ == '__main__' and main()
  File "bootstrap.py", line 61, in main
    run_egg_info()
  File "bootstrap.py", line 54, in run_egg_info
    subprocess.check_call(cmd)
  File "/usr/lib/python2.7/subprocess.py", line 190, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/usr/sbin/python2', u'setup.py', u'egg_info']' returned non-zero exit status 1
==> ERROR: A failure occurred in build().
    Aborting...
 -> error making: python2-setuptools

Is there anyone facing the same problem here?