Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[BUG] cygwin C compiler fails to respect source file extension casing #5130

Open
Labels
Needs TriageIssues that need to be evaluated for severity and status.bug
@Morilli

Description

@Morilli

setuptools version

setuptools==80.9.0

Python version

Python 3.12.12

OS

Windows

Additional environment information

I'm usingmingw-w64-ucrt-x86_64-python from msys2/ucrt64.

Description

Trying to compile source files with custom/non-default extensions after appending them tosrc_extensions does not work when the extension is uppercase due to the unconditional usage ofos.path.normcase in_make_out_path:

def_make_out_path(self,output_dir,strip_dir,src_name):
# use normcase to make sure '.rc' is really '.rc' and not '.RC'
norm_src_name=os.path.normcase(src_name)
returnsuper()._make_out_path(output_dir,strip_dir,norm_src_name)

For example, trying to compile.S files after runningsrc_extensions.append(".S") will throw an exception, only `src_extensions.append(".s") will work.

Expected behavior

I expect compilation of files with extensions specified insrc_extensions to work without having to transform them to lowercase, similar to how behavior is on unix.

How to Reproduce

I encountered this problem when trying to compilebackports.zstd, so I'll use it as an example.

  1. Clonebackports.zstd:git clone --recursive https://github.com/Rogdham/backports.zstd
  2. Checkout a revision with this issue:git checkout v1.2.0
  3. Try to build/install the package:pip install .

Output

warning: externally-managed-environment× This environment is externally managed╰─> To install Python packages system-wide, try 'pacman -S    $MINGW_PACKAGE_PREFIX-python-xyz', where xyz is the package you    are trying to install.    If you wish to install a non-MSYS2-packaged Python package,    create a virtual environment using 'python -m venv path/to/venv'.    Then use path/to/venv/bin/python and path/to/venv/bin/pip.    If you wish to install a non-MSYS2 packaged Python application,    it may be easiest to use 'pipx install xyz', which will manage a    virtual environment for you. Make sure you have $MINGW_PACKAGE_PREFIX-python-pipx    installed via pacman.note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.hint: See PEP 668 for the detailed specification.Processing d:\github\backports.zstd  Installing build dependencies ... done  Getting requirements to build wheel ... done  Preparing metadata (pyproject.toml) ... doneBuilding wheels for collected packages: backports.zstd  Building wheel for backports.zstd (pyproject.toml) ... error  error: subprocess-exited-with-error  × Building wheel for backports.zstd (pyproject.toml) did not run successfully.  │ exit code: 1  ╰─> [44 lines of output]      running bdist_wheel      running build      running build_py      creating build\lib.mingw_x86_64_ucrt_gnu-cpython-312\backports      copying src\python\backports\__init__.py -> build\lib.mingw_x86_64_ucrt_gnu-cpython-312\backports      creating build\lib.mingw_x86_64_ucrt_gnu-cpython-312\backports\zstd      copying src\python\backports\zstd\tarfile.py -> build\lib.mingw_x86_64_ucrt_gnu-cpython-312\backports\zstd      copying src\python\backports\zstd\_shutil.py -> build\lib.mingw_x86_64_ucrt_gnu-cpython-312\backports\zstd      copying src\python\backports\zstd\_streams.py -> build\lib.mingw_x86_64_ucrt_gnu-cpython-312\backports\zstd      copying src\python\backports\zstd\_zstd.py -> build\lib.mingw_x86_64_ucrt_gnu-cpython-312\backports\zstd      copying src\python\backports\zstd\_zstdfile.py -> build\lib.mingw_x86_64_ucrt_gnu-cpython-312\backports\zstd      copying src\python\backports\zstd\__init__.py -> build\lib.mingw_x86_64_ucrt_gnu-cpython-312\backports\zstd      creating build\lib.mingw_x86_64_ucrt_gnu-cpython-312\backports\zstd\zipfile      copying src\python\backports\zstd\zipfile\__init__.py -> build\lib.mingw_x86_64_ucrt_gnu-cpython-312\backports\zstd\zipfile      copying src\python\backports\zstd\zipfile\__main__.py -> build\lib.mingw_x86_64_ucrt_gnu-cpython-312\backports\zstd\zipfile      creating build\lib.mingw_x86_64_ucrt_gnu-cpython-312\backports\zstd\_cffi      copying src\python\backports\zstd\_cffi\buffer.py -> build\lib.mingw_x86_64_ucrt_gnu-cpython-312\backports\zstd\_cffi      copying src\python\backports\zstd\_cffi\compressor.py -> build\lib.mingw_x86_64_ucrt_gnu-cpython-312\backports\zstd\_cffi      copying src\python\backports\zstd\_cffi\decompressor.py -> build\lib.mingw_x86_64_ucrt_gnu-cpython-312\backports\zstd\_cffi      copying src\python\backports\zstd\_cffi\zstddict.py -> build\lib.mingw_x86_64_ucrt_gnu-cpython-312\backports\zstd\_cffi      copying src\python\backports\zstd\_cffi\_blocks_output_buffer.py -> build\lib.mingw_x86_64_ucrt_gnu-cpython-312\backports\zstd\_cffi      copying src\python\backports\zstd\_cffi\_common.py -> build\lib.mingw_x86_64_ucrt_gnu-cpython-312\backports\zstd\_cffi      copying src\python\backports\zstd\_cffi\__init__.py -> build\lib.mingw_x86_64_ucrt_gnu-cpython-312\backports\zstd\_cffi      creating build\lib.mingw_x86_64_ucrt_gnu-cpython-312\backports\zstd\zipfile\_path      copying src\python\backports\zstd\zipfile\_path\glob.py -> build\lib.mingw_x86_64_ucrt_gnu-cpython-312\backports\zstd\zipfile\_path      copying src\python\backports\zstd\zipfile\_path\__init__.py -> build\lib.mingw_x86_64_ucrt_gnu-cpython-312\backports\zstd\zipfile\_path      running egg_info      writing src/python\backports.zstd.egg-info\PKG-INFO      writing dependency_links to src/python\backports.zstd.egg-info\dependency_links.txt      writing top-level names to src/python\backports.zstd.egg-info\top_level.txt      reading manifest file 'src/python\backports.zstd.egg-info\SOURCES.txt'      reading manifest template 'MANIFEST.in'      adding license file 'LICENSE.txt'      adding license file 'LICENSE_zstd.txt'      writing manifest file 'src/python\backports.zstd.egg-info\SOURCES.txt'      copying src\python\backports\zstd\__init__.pyi -> build\lib.mingw_x86_64_ucrt_gnu-cpython-312\backports\zstd      copying src\python\backports\zstd\py.typed -> build\lib.mingw_x86_64_ucrt_gnu-cpython-312\backports\zstd      copying src\python\backports\zstd\tarfile.pyi -> build\lib.mingw_x86_64_ucrt_gnu-cpython-312\backports\zstd      copying src\python\backports\zstd\zipfile\__init__.pyi -> build\lib.mingw_x86_64_ucrt_gnu-cpython-312\backports\zstd\zipfile      copying src\python\backports\zstd\zipfile\_path\__init__.pyi -> build\lib.mingw_x86_64_ucrt_gnu-cpython-312\backports\zstd\zipfile\_path      copying src\python\backports\zstd\zipfile\_path\glob.pyi -> build\lib.mingw_x86_64_ucrt_gnu-cpython-312\backports\zstd\zipfile\_path      running build_ext      building 'backports.zstd._zstd' extension      error: unknown file type '.s' (from 'src\c\zstd\lib\decompress\huf_decompress_amd64.s')      [end of output]  note: This error originates from a subprocess, and is likely not a problem with pip.  ERROR: Failed building wheel for backports.zstdFailed to build backports.zstdwarning: externally-managed-environment× This environment is externally managed╰─> To install Python packages system-wide, try 'pacman -S    $MINGW_PACKAGE_PREFIX-python-xyz', where xyz is the package you    are trying to install.    If you wish to install a non-MSYS2-packaged Python package,    create a virtual environment using 'python -m venv path/to/venv'.    Then use path/to/venv/bin/python and path/to/venv/bin/pip.    If you wish to install a non-MSYS2 packaged Python application,    it may be easiest to use 'pipx install xyz', which will manage a    virtual environment for you. Make sure you have $MINGW_PACKAGE_PREFIX-python-pipx    installed via pacman.note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.hint: See PEP 668 for the detailed specification.error: failed-wheel-build-for-install× Failed to build installable wheels for some pyproject.toml based projects╰─> backports.zstd

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs TriageIssues that need to be evaluated for severity and status.bug

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp