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

pip install mercurial is broken on Windows CI #640

Closed
straight-shoota opened this issue Sep 4, 2024 · 1 comment · Fixed by #645
Closed

pip install mercurial is broken on Windows CI #640

straight-shoota opened this issue Sep 4, 2024 · 1 comment · Fixed by #645

Comments

@straight-shoota
Copy link
Member

https://github.com/crystal-lang/shards/actions/runs/10661704235/job/29547633885

Run pip install mercurial
  pip install mercurial
  shell: C:\Program Files\PowerShell\7\pwsh.EXE -command ". '{0}'"
Collecting mercurial
  Downloading mercurial-6.8.1.tar.gz (8.3 MB)
     ---------------------------------------- 8.3/8.3 MB 74.0 MB/s eta 0:00:00
  Installing build dependencies: started
  Installing build dependencies: finished with status 'done'
  Getting requirements to build wheel: started
  Getting requirements to build wheel: finished with status 'error'
  error: subprocess-exited-with-error
  
  Getting requirements to build wheel did not run successfully.
  exit code: 1
  
  [17 lines of output]
  Traceback (most recent call last):
    File "C:\hostedtoolcache\windows\Python\3.9.13\x64\lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 353, in <module>
      main()
    File "C:\hostedtoolcache\windows\Python\3.9.13\x64\lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 335, in main
      json_out['return_val'] = hook(**hook_input['kwargs'])
    File "C:\hostedtoolcache\windows\Python\3.9.13\x64\lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 118, in get_requires_for_build_wheel
      return hook(config_settings)
    File "C:\Users\runneradmin\AppData\Local\Temp\pip-build-env-f47lhb64\overlay\Lib\site-packages\setuptools\build_meta.py", line 332, in get_requires_for_build_wheel
      return self._get_build_requires(config_settings, requirements=[])
    File "C:\Users\runneradmin\AppData\Local\Temp\pip-build-env-f47lhb64\overlay\Lib\site-packages\setuptools\build_meta.py", line 302, in _get_build_requires
      self.run_setup()
    File "C:\Users\runneradmin\AppData\Local\Temp\pip-build-env-f47lhb64\overlay\Lib\site-packages\setuptools\build_meta.py", line 503, in run_setup
      super().run_setup(setup_script=setup_script)
    File "C:\Users\runneradmin\AppData\Local\Temp\pip-build-env-f47lhb64\overlay\Lib\site-packages\setuptools\build_meta.py", line 318, in run_setup
      exec(code, locals())
    File "<string>", line 1665, in <module>
  ImportError: cannot import name 'msvccompiler' from 'distutils' (C:\Users\runneradmin\AppData\Local\Temp\pip-build-env-f47lhb64\overlay\Lib\site-packages\setuptools\_distutils\__init__.py)
  [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

Getting requirements to build wheel did not run successfully.
exit code: 1

See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.
Error: Process completed with exit code 1.

The error reproduces with pip install mercurial on my local machine, so it's not specific to the CI environment.

@straight-shoota
Copy link
Member Author

straight-shoota commented Oct 6, 2024

So apparently the distutils package has been deprecated since Python 3.10 (https://docs.python.org/3.10/whatsnew/3.10.html#distutils-deprecated). It was eventually removed in 3.12.
But mercurial depends on this package, so it fails to install. There is an upstream issue about this: https://bz.mercurial-scm.org/show_bug.cgi?id=6910 But so far mercurial seems to be unusalbe with Python 3.12+.

I tried pinning the Python version to 3.9 but it still fails for the same reason: https://github.com/crystal-lang/shards/actions/runs/11201431779/job/31136340697. I have no idea why.

Until we get this working again, I suppose we should disable mercurial tests on Windows or find a different way to install a working mercurial.

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

Successfully merging a pull request may close this issue.

1 participant