Closed nokados closed 2 months ago
Since PDM-backend 2.4.0, installing my package causes the following error:
File "/home/nokados/myproject/setup.py", line 5 <Requirement('gensim')>, SyntaxError: invalid syntax
The project includes a pdm_build.py:
pdm_build.py
"""Compiling the entire code with Cython.""" from setuptools import Extension, setup from Cython.Build import cythonize def pdm_build_update_setup_kwargs(context, setup_kwargs): extensions = cythonize( [ Extension("*", sources=["src/**/*.py"]), ], language_level="3", nthreads=1 ) setup_kwargs['ext_modules'] = extensions
It works without errors on pdm-backend==2.3.3.
pdm-backend==2.3.3
The build section of Pyproject.toml:
Pyproject.toml
[build-system] requires = ["setuptools>=61", "wheel", "Cython", "pdm-backend"] build-backend = "pdm.backend"
Thanks, 2.4.0 has been yanked for now and it will be fixed in the next release.
Fixed by https://github.com/pdm-project/pdm-backend/commit/856d8499aa4acdf603b895fdcb6a31cbc8bda357
Since PDM-backend 2.4.0, installing my package causes the following error:
The project includes a
pdm_build.py
:It works without errors on
pdm-backend==2.3.3
.The build section of
Pyproject.toml
:More logs:
``` STATUS: Resolving packages from lockfile... unearth.preparer: The file . is a local directory, use it directly pdm.termui: Running PEP 517 backend to get metadata for pdm.termui: Preparing environment(Isolated mode) for PEP 517 build... pdm.termui: ======== Start resolving requirements ======== pdm.termui: Adding requirement Cython pdm.termui: Adding requirement setuptools>=61 pdm.termui: Adding requirement pdm-backend pdm.termui: Adding requirement wheel pdm.termui: Adding requirement python==3.9.19 pdm.termui: Adding requirement importlib-metadata>=3.6; python_version < "3.10"(from pdm-backend 2.4.0) pdm.termui: Adding requirement zipp>=3.20(from importlib-metadata 8.5.0) pdm.termui: ======== Resolution Result ======== pdm.termui: python None pdm.termui: setuptools 75.1.0 pdm.termui: cython 3.0.11 pdm.termui: pdm-backend 2.4.0 pdm.termui: wheel 0.44.0 pdm.termui: importlib-metadata 8.5.0 pdm.termui: zipp 3.20.2 pdm.termui: Installing cython@3.0.11... ... pdm.termui: Synchronization complete. All packages are synced to date, nothing to do. Installing the project as an editable package... pdm.termui: Overwriting distribution myproject pdm.termui: Preparing environment(Isolated mode) for PEP 517 build... pdm.termui: Running PEP 517 backend to build a wheel for pdm.termui: File "/home/nokados/myproject/setup.py", line 5 pdm.termui: