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

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

Closed
2 tasks done
raphaelauv opened this issue Mar 2, 2023 · 13 comments
Closed
2 tasks done

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

raphaelauv opened this issue Mar 2, 2023 · 13 comments

Comments

@raphaelauv
Copy link

  • 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]

@sswam
Copy link

sswam commented Mar 31, 2023

Any workaround for this? It also doesn't work with latest python 3.10.10 for me in a venv on Debian bullseye. I tried to work around, eventually gave up and copied the installed package across from another system!

@Secrus
Copy link
Collaborator

Secrus commented May 8, 2023

We are currently working towards releasing Pendulum 3.0, which will address this issue.

@OleguerG
Copy link

Any idea on when Pendulum 3.0 will be released?

@LecrisUT
Copy link

Could you please add the 3.12 CI tests to main? Currently this is blocking a few packages in Fedora due to dependency chain

@edgarrmondragon
Copy link
Contributor

Could you please add the 3.12 CI tests to main? Currently this is blocking a few packages in Fedora due to dependency chain

@LecrisUT see #728

@amotl
Copy link

amotl commented Aug 23, 2023

Dear Sébastien,

thanks a stack for your work on Pendulum. We are running into the same issue on Python 3.12 at https://github.com/panodata/aika.

We see it already has been fixed on the main branch, so may we humbly ask for a new release? There is no pressure though, Python 3.12 will only be released on 2023-10-02, so there are a few weeks left to support it properly.

With kind regards,
Andreas.

@tharwan
Copy link

tharwan commented Oct 13, 2023

Is there a plan to release a fixed version?

@blueskyjunkie
Copy link

The error in pendulum still occurs after Python 3.12 has been released.

Here's the error message for your reference.

pip install pendulum     
Collecting pendulum
  Using cached pendulum-2.1.2.tar.gz (81 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting python-dateutil<3.0,>=2.6 (from pendulum)
  Using cached python_dateutil-2.8.2-py2.py3-none-any.whl (247 kB)
Collecting pytzdata>=2020.1 (from pendulum)
  Using cached pytzdata-2020.1-py2.py3-none-any.whl (489 kB)
Collecting six>=1.5 (from python-dateutil<3.0,>=2.6->pendulum)
  Using cached six-1.16.0-py2.py3-none-any.whl (11 kB)
Building wheels for collected packages: pendulum
  Building wheel for pendulum (pyproject.toml) ... error
  error: subprocess-exited-with-error
  
  × Building wheel for pendulum (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [27 lines of output]
      Traceback (most recent call last):
        File "/private/var/folders/00/d8c5mq757qsd67rc5vdjzxfh0000gn/T/pip-install-_095_z76/pendulum_7c7e5588adb64891ac55f26a7321c809/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 "lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
          main()
        File "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 "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 "/private/var/folders/00/d8c5mq757qsd67rc5vdjzxfh0000gn/T/pip-build-env-a1sh4src/overlay/lib/python3.12/site-packages/poetry/core/masonry/api.py", line 57, in build_wheel
          return WheelBuilder.make_in(
                 ^^^^^^^^^^^^^^^^^^^^^
        File "/private/var/folders/00/d8c5mq757qsd67rc5vdjzxfh0000gn/T/pip-build-env-a1sh4src/overlay/lib/python3.12/site-packages/poetry/core/masonry/builders/wheel.py", line 87, in make_in
          wb.build(target_dir=directory)
        File "/private/var/folders/00/d8c5mq757qsd67rc5vdjzxfh0000gn/T/pip-build-env-a1sh4src/overlay/lib/python3.12/site-packages/poetry/core/masonry/builders/wheel.py", line 122, in build
          self._build(zip_file)
        File "/private/var/folders/00/d8c5mq757qsd67rc5vdjzxfh0000gn/T/pip-build-env-a1sh4src/overlay/lib/python3.12/site-packages/poetry/core/masonry/builders/wheel.py", line 171, in _build
          self._run_build_script(self._package.build_script)
        File "/private/var/folders/00/d8c5mq757qsd67rc5vdjzxfh0000gn/T/pip-build-env-a1sh4src/overlay/lib/python3.12/site-packages/poetry/core/masonry/builders/wheel.py", line 231, in _run_build_script
          subprocess.check_call([self.executable.as_posix(), build_script])
        File ".pyenv/versions/3.12.0/lib/python3.12/subprocess.py", line 413, in check_call
          raise CalledProcessError(retcode, cmd)
      subprocess.CalledProcessError: Command '['python3', 'build.py']' returned non-zero exit status 1.
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for pendulum
Failed to build pendulum

@edgarrmondragon
Copy link
Contributor

@blueskyjunkie have you tried the 3.0.0b1 release?

@blueskyjunkie
Copy link

Thanks @edgarrmondragon . My transitive dependency had constrained the pendulum releases to exclude v3. I was able to widen the constraints and the project now installs correctly for Python 3.12 using pendulum 3.0.0b1.

@andreas-vester
Copy link

I can confirm that pendulum 3.0.0b1 can be installed with Python 3.12.

@Secrus
Copy link
Collaborator

Secrus commented Dec 17, 2023

Pendulum 3.0 was released, removing the dependency on distutils

@Secrus Secrus closed this as completed Dec 17, 2023
@jasttfan
Copy link

does not appear to be resolved with latest 3.0.0 build.

Building wheels for collected packages: pendulum
Building wheel for pendulum (pyproject.toml) ... error
error: subprocess-exited-with-error

× Building wheel for pendulum (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [27 lines of output]
Traceback (most recent call last):
File "C:\Users\mcb1456\AppData\Local\Temp\pip-install-x5n1poc2\pendulum_14453bd4c39946d08bed23215a926a89\build.py", line 5, in
from distutils.command.build_ext import build_ext
ModuleNotFoundError: No module named 'distutils'
Traceback (most recent call last):
File "C:\Users\mcb1456\AppData\Local\Programs\Python\Python312\Lib\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py", line 353, in
main()
File "C:\Users\mcb1456\AppData\Local\Programs\Python\Python312\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:\Users\mcb1456\AppData\Local\Programs\Python\Python312\Lib\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 "C:\Users\mcb1456\AppData\Local\Temp\pip-build-env-3uu84twf\overlay\Lib\site-packages\poetry\core\masonry\api.py", line 58, in build_wheel
return WheelBuilder.make_in(
^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\mcb1456\AppData\Local\Temp\pip-build-env-3uu84twf\overlay\Lib\site-packages\poetry\core\masonry\builders\wheel.py", line 88, in make_in
wb.build(target_dir=directory)
File "C:\Users\mcb1456\AppData\Local\Temp\pip-build-env-3uu84twf\overlay\Lib\site-packages\poetry\core\masonry\builders\wheel.py", line 123, in build
self._build(zip_file)
File "C:\Users\mcb1456\AppData\Local\Temp\pip-build-env-3uu84twf\overlay\Lib\site-packages\poetry\core\masonry\builders\wheel.py", line 172, in _build
self._run_build_script(self._package.build_script)
File "C:\Users\mcb1456\AppData\Local\Temp\pip-build-env-3uu84twf\overlay\Lib\site-packages\poetry\core\masonry\builders\wheel.py", line 266, in _run_build_script
subprocess.check_call([self.executable.as_posix(), build_script])
File "C:\Users\mcb1456\AppData\Local\Programs\Python\Python312\Lib\subprocess.py", line 413, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['C:/Users/mcb1456/AppData/Local/Programs/Python/Python312/python.exe', 'build.py']' returned non-zero exit status 1.
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for pendulum
Failed to build pendulum

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

No branches or pull requests