Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • pypy pypy
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 676
    • Issues 676
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 13
    • Merge requests 13
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar

April 05-07 - Mercurial Paris Conference 2023 - One day of workshop dedicated to Heptapod and Mercurial usage and workflow. There are still places available for both workshops and talks!

  • PyPyPyPy
  • pypypypy
  • Issues
  • #3703
Closed
Open
Issue created Mar 12, 2022 by Chris Burr@chrisburrDeveloper

Use shutil instead of distutils.spawn?

Currently setuptools is broken with PyPy on macOS x86_64 if pkg_resources is imported first:

> conda create -c conda-forge --name test setuptools pypy
> conda activate test
> python -c 'import setuptools, pkg_resources; print("All good")'
All good
> python -c 'import pkg_resources, setuptools; print("All good")'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/Users/cburr/mambaforge/envs/test/site-packages/setuptools/__init__.py", line 35, in <module>
    __version__ = setuptools.version.__version__
AttributeError: module 'setuptools' has no attribute 'version'

I reported it in pypa/setuptools#3165 and the issue seems to be caused by the interaction between PyPy importing distutils in _sysconfigdata and the fragility of _distutils_hack. A possible workaround would be to avoid importing distutils in _sysconfigdata by applying:

- from distutils.spawn import find_executable
+ from shutil import which as find_executable

Would this be acceptable from PyPy's perspective? (for Python 3 at least)

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking