8000 BUG: Failed to build with setuptools 61.3.1 · Issue #21288 · numpy/numpy · GitHub
[go: up one dir, main page]

Skip to content
BUG: Failed to build with setuptools 61.3.1 #21288
Closed
@xkszltl

Description

@xkszltl

Describe the issue:

This could be related:
pypa/setuptools#3197 (comment)

Latest numpy release (1.22.3) cannot build from source when using latest setuptools.

Reproduce the code example:

python3 -m pip install -Uv setuptools==61.3.1
python3 -m pip install -Uv git+https://github.com/numpy/numpy.git@v1.22.3

Error message:

#9 529.2 Using pip 22.0.4 from /usr/local/lib/python3.9/dist-packages/pip (python 3.9)                                                                                                                                                                        
#9 529.3 Looking in indexes: https://mirrors.aliyun.com/pypi/simple                                                                                                                                                                                           
#9 529.3 Processing ./mirrored-pip-GRCQUK/numpy                                                                                                                                                                                                               
#9 529.5   Installing build dependencies: started                                                                                                                                                                                                             
#9 529.5   Running command pip subprocess to install build dependencies                                                                                                                                                                                       
#9 531.1   Looking in indexes: https://mirrors.aliyun.com/pypi/simple                                                                                                                                                                                         
#9 531.1   Ignoring packaging: markers 'platform_machine == "arm64"' don't match your environment                                                                                                                                                             
#9 531.7   Collecting setuptools==59.2.0                                                                                                                                                                                                                      
#9 531.8     Downloading https://mirrors.aliyun.com/pypi/packages/18/ad/ec41343a49a0371ea40daf37b1ba2c11333cdd121cb378161635d14b9750/setuptools-59.2.0-py3-none-any.whl (952 kB)                                                                              
#9 533.1        ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 952.0/952.0 KB 734.9 kB/s eta 0:00:00                                                                                                                                                                   
#9 533.2   Collecting wheel==0.37.0                                                                                                                                                                                                                           
#9 533.2     Downloading https://mirrors.aliyun.com/pypi/packages/04/80/cad93b40262f5d09f6de82adbee452fd43cdff60830b56a74c5930f7e277/wheel-0.37.0-py2.py3-none-any.whl (35 kB)                                                                                
#9 534.0   Collecting Cython<3.0,>=0.29.24                                                                                                                                                                                                                    
#9 534.0     Downloading https://mirrors.aliyun.com/pypi/packages/9a/26/d2b6bc4cb7d716c82ebc89690cbd5ba0f547db364809cd42dad34d593182/Cython-0.29.28-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl (1.9 MB)                   
#9 536.6        ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.9/1.9 MB 761.3 kB/s eta 0:00:00                                                                                                                                                                    
#9 536.9   Installing collected packages: wheel, setuptools, Cython                                                                                                                                                                                           
#9 537.8   Successfully installed Cython-0.29.28 setuptools-59.2.0 wheel-0.37.0                                                                                                                                                                               
#9 537.8   WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv                      
#9 537.9   Installing build dependencies: finished with status 'done'                                                                                                                                                                                         
#9 537.9   Getting requirements to build wheel: started                                                                                                                                                                                                       
#9 537.9   Running command Getting requirements to build wheel                                                                                                                                                                                                
#9 538.3   Running from numpy source directory.                                                                                                                                                                                                               
#9 539.2   error: Multiple top-level packages discovered in a flat-layout: ['numpy', 'branding'].                                                                                                                                                             
#9 539.2                                                                                                                                                                                                                                                      
#9 539.2   To avoid accidental inclusion of unwanted files or directories,                                                                                                                                                                                    
#9 539.2   setuptools will not proceed with this build.                                                                                                                                                                                                       
#9 539.2                                                                                                                                                                                                                                                      
#9 539.2   If you are trying to create a single distribution with multiple packages                                                                                                                                                                           
#9 539.2   on purpose, you should not rely on automatic discovery.                                                                                                                                                                                            
#9 539.2   Instead, consider the following options:                                                                                                                                                                                                           
#9 539.2                                                                                                                                                                                                                                                      
#9 539.2   1. set up custom discovery (`find` directive with `include` or `exclude`)                                                                                                                                                                          
#9 539.2   2. use a `src-layout`                                                                                                                                                                                                                              
#9 539.2   3. explicitly set `py_modules` or `packages` with a list of names                                                                                                                                                                                  
#9 539.2                                                                                                                                                                                                                                                      
#9 539.2   To find more information, look for "package discovery" on setuptools docs.                                                                                                                                                                         
#9 539.3   error: subprocess-exited-with-error                                                                                                                                                                                                                
#9 539.3                                                                                                                                                                                                                                                      
#9 539.3   × Getting requirements to build wheel did not run successfully.                                                                                                                                                                                    
#9 539.3   │ exit code: 1                                                                                                                                                                                                                                     
#9 539.3   ╰─> See above for output.                                                                                                                                                                                                                          
#9 539.3                                                                                                                                                                                                                                                      
#9 539.3   note: This error originates from a subprocess, and is likely not a problem with pip.                                                                                                                                                               
#9 539.3   full command: /usr/bin/python3 /usr/local/lib/python3.9/dist-packages/pip/_vendor/pep517/in_process/_in_process.py get_requires_for_build_wheel /tmp/tmpis1s8vl8                                                                                   
#9 539.3   cwd: /tmp/scratch/mirrored-pip-GRCQUK/numpy                                                                                                                                                                                                        
#9 539.3   Getting requirements to build wheel: finished with status 'error'                                                                                                                                                                                  
#9 539.3 error: subprocess-exited-with-error                                                                                                                                                                                                                  
#9 539.3                                                                                                                                                                                                                                                      
#9 539.3 × Getting requirements to build wheel did not run successfully.                                                                                                                                                                                      
#9 539.3 │ exit code: 1                                                                                                                                                                                                                                       
#9 539.3 ╰─> See above for output.                                                                                                                                                                                                                            
#9 539.3                                                                                                                                                                                                                                                      
#9 539.3 note: This error originates from a subprocess, and is likely not a problem with pip.

NumPy/Python version information:

Numpy 1.22.3
Python 3.9
Debian 11
Setuptools 61.3.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      2928
      0