Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

setuptools win32 breakage #2033

Closed
totaam opened this issue Nov 12, 2018 · 2 comments
Closed

setuptools win32 breakage #2033

totaam opened this issue Nov 12, 2018 · 2 comments
Labels

Comments

@totaam
Copy link
Collaborator

totaam commented Nov 12, 2018

It's not a bug, it's a feature: Drop support for self upgrade/installation.

And here what it looks like:

$ PYTHON=python2 sh win32/MINGW_BUILD.sh
Python 2.7.15
Python2 version

Xpra 2.5-[r20978](../commit/7adb5ba59d887834589ab965cbcb1282bbeae93c) (64-bit)


- Cleaning ./dist output directory
* Building Python 2 Cython modules
* Generating installation directory
ERROR: build failed, see win32/cx_freeze-install.log:
    self.run_command(cmd)
  File "C:/msys64/mingw64/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "C:/msys64/mingw64/lib/python2.7/site-packages/cx_Freeze/dist.py", line 305, in run
    self.run_command('build_exe')
  File "C:/msys64/mingw64/lib/python2.7/distutils/cmd.py", line 326, in run_command
    self.distribution.run_command(command)
  File "C:/msys64/mingw64/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "C:/msys64/mingw64/lib/python2.7/site-packages/cx_Freeze/dist.py", line 219, in run
    freezer.Freeze()
  File "C:/msys64/mingw64/lib/python2.7/site-packages/cx_Freeze/freezer.py", line 621, in Freeze
    self.finder = self._GetModuleFinder()
  File "C:/msys64/mingw64/lib/python2.7/site-packages/cx_Freeze/freezer.py", line 340, in _GetModuleFinder
    finder.IncludeModule(name)
  File "C:/msys64/mingw64/lib/python2.7/site-packages/cx_Freeze/finder.py", line 651, in IncludeModule
    namespace = namespace)
  File "C:/msys64/mingw64/lib/python2.7/site-packages/cx_Freeze/finder.py", line 351, in _ImportModule
    raise ImportError("No module named %r" % name)
ImportError: No module named 'pkg_resources._vendor.packaging'
@totaam
Copy link
Collaborator Author

totaam commented Nov 12, 2018

Workaround is to use pip to re-install setuptools, which fixes whatever got wedged in there:

pacman -S mingw-w64-x86_64-python2-pip mingw-w64-x86_64-python3-pip
pip2 install --upgrade setuptools --force-reinstall
pip3 install --upgrade setuptools --force-reinstall

Hopefully they'll fix setuptools and we can then remember to remove pip and the dozen dependencies it installed..

@totaam totaam closed this as completed Nov 12, 2018
@totaam totaam added the v2.4.x label Jan 22, 2021
This was referenced Jan 22, 2021
@totaam
Copy link
Collaborator Author

totaam commented Jul 12, 2024

Happened again for some unknown reason.
Hacked around it by removing pkg_resources, setuptools and pyparsing from site-packages, then re-installing them using pip, finally copying pyparsing into pkg_resources/_vendor/, because reasons.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant