Skip to content

support python 3.12 -> PEP 632, Remove the distutils package. #696

@raphaelauv

Description

@raphaelauv
  • I am on the latest Pendulum version.

  • I have searched the issues of this repo and believe that this is not a duplicate.

  • OS version and name: bullseye

  • Pendulum version: pendulum==2.1.2

Issue

× Building wheel for pendulum (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [27 lines of output]
   Traceback (most recent call last):
     File "/tmp/pip-install-wpyylaf5/pendulum_41fb4accb1eb497eb3f79d80659881b4/build.py", line 5, in <module>
       from distutils.command.build_ext import build_ext
   ModuleNotFoundError: No module named 'distutils'
   Traceback (most recent call last):
     File "/usr/local/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
       main()
     File "/usr/local/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
       json_out['return_val'] = hook(**hook_input['kwargs'])
                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     File "/usr/local/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 251, in build_wheel
       return _build_backend().build_wheel(wheel_directory, config_settings,
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     File "/tmp/pip-build-env-iee1xdz5/overlay/lib/python3.12/site-packages/poetry/core/masonry/api.py", line 56, in build_wheel
       return WheelBuilder.make_in(
              ^^^^^^^^^^^^^^^^^^^^^
     File "/tmp/pip-build-env-iee1xdz5/overlay/lib/python3.12/site-packages/poetry/core/masonry/builders/wheel.py", line 85, in make_in
       wb.build(target_dir=directory)
     File "/tmp/pip-build-env-iee1xdz5/overlay/lib/python3.12/site-packages/poetry/core/masonry/builders/wheel.py", line 120, in build
       self._build(zip_file)
     File "/tmp/pip-build-env-iee1xdz5/overlay/lib/python3.12/site-packages/poetry/core/masonry/builders/wheel.py", line 169, in _build
       self._run_build_script(self._package.build_script)
     File "/tmp/pip-build-env-iee1xdz5/overlay/lib/python3.12/site-packages/poetry/core/masonry/builders/wheel.py", line 229, in _run_build_script
       subprocess.check_call([self.executable.as_posix(), build_script])
     File "/usr/local/lib/python3.12/subprocess.py", line 413, in check_call
       raise CalledProcessError(retcode, cmd)
   subprocess.CalledProcessError: Command '['/usr/local/bin/python3', 'build.py']' returned non-zero exit status 1.
   [end of output]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions