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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scipy build is broken #3816

Closed
hoodmane opened this issue May 1, 2023 · 10 comments
Closed

Scipy build is broken #3816

hoodmane opened this issue May 1, 2023 · 10 comments
Labels
bug Something isn't working

Comments

@hoodmane
Copy link
Member

hoodmane commented May 1, 2023

馃悰 Bug

Scipy build seems to have been broken by some upstream change. Traceback is inside Pytran? Maybe a recent Pythran release caused a build regression?

Running from SciPy source directory.                                            
Traceback (most recent call last):                                              
  File                                                                          
"/usr/local/lib/python3.11/site-packages/pep517/in_process/_in_process.py", line
351, in <module>                                                                
    main()                                                                      
  File                                                                          
"/usr/local/lib/python3.11/site-packages/pep517/in_process/_in_process.py", line
333, in main                                                                    
    json_out['return_val'] = hook(**hook_input['kwargs'])                       
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^                       
  File                                                                          
"/usr/local/lib/python3.11/site-packages/pep517/in_process/_in_process.py", line
249, in build_wheel                                                             
    return _build_backend().build_wheel(wheel_directory, config_settings,       
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^       
  File                                                                          
"/tmp/build-env-nv3mavpb/lib/python3.11/site-packages/setuptools/build_meta.py",
line 230, in build_wheel                                                        
    return self._build_with_temp_dir(['bdist_wheel'], '.whl',                   
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                   
  File                                                                          
"/tmp/build-env-nv3mavpb/lib/python3.11/site-packages/setuptools/build_meta.py",
line 215, in _build_with_temp_dir                                               
    self.run_setup()                                                            
  File                                                                          
"/tmp/build-env-nv3mavpb/lib/python3.11/site-packages/setuptools/build_meta.py",
line 268, in run_setup                                                          
    self).run_setup(setup_script=setup_script)                                  
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                  
  File                                                                          
"/tmp/build-env-nv3mavpb/lib/python3.11/site-packages/setuptools/build_meta.py",
line 158, in run_setup                                                          
    exec(compile(code, __file__, 'exec'), locals())                             
  File "setup.py", line 532, in <module>                                        
    setup_package()                                                             
  File "setup.py", line 509, in setup_package                                   
    cmdclass['build_ext'] = get_build_ext_override()                            
                            ^^^^^^^^^^^^^^^^^^^^^^^^                            
  File "setup.py", line 139, in get_build_ext_override                          
    import pythran                                                              
  File                                                                          
"/tmp/build-env-nv3mavpb/lib/python3.11/site-packages/pythran/__init__.py", line
42, in <module>                                                                 
    from pythran.toolchain import (generate_cxx, compile_cxxfile,               
compile_cxxcode,                                                                
  File                                                                          
"/tmp/build-env-nv3mavpb/lib/python3.11/site-packages/pythran/toolchain.py",    
line 12, in <module>                                                            
    from pythran.middlend import refine, mark_unexported_functions              
  File                                                                          
"/tmp/build-env-nv3mavpb/lib/python3.11/site-packages/pythran/middlend.py", line
4, in <module>                                                                  
    from pythran.optimizations import (ComprehensionPatterns, ListCompToGenexp, 
  File                                                                          
"/tmp/build-env-nv3mavpb/lib/python3.11/site-packages/pythran/optimizations/__in
it__.py", line 21, in <module>                                                  
    from .pattern_transform import PatternTransform                             
  File                                                                          
"/tmp/build-env-nv3mavpb/lib/python3.11/site-packages/pythran/optimizations/patt
ern_transform.py", line 346, in <module>                                        
    getattr(PatternTransform, attr_name) + (known_pattern,))                    
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                        
AttributeError: type object 'PatternTransform' has no attribute 'typePatterns'. 
Did you mean: 'CallPatterns'?                         
@hoodmane hoodmane added the bug Something isn't working label May 1, 2023
@hoodmane
Copy link
Member Author

hoodmane commented May 1, 2023

Most recent pythran release was in January so it's not pythran.

@hoodmane hoodmane mentioned this issue May 1, 2023
3 tasks
@rth
Copy link
Member

rth commented May 1, 2023

Yep, serge-sans-paille/pythran#2101 they should have probably pinned this as a build requirement.

@rth
Copy link
Member

rth commented May 1, 2023

As a temporary workaround, we can probably set SCIPY_USE_PYTHRAN=0 to disable pythran: scipy/scipy#18390.

@ryanking13
Copy link
Member

ryanking13 commented May 2, 2023

As a temporary workaround, we can probably set SCIPY_USE_PYTHRAN=0 to disable pythran: scipy/scipy#18390

What would be the side effect of disabling pythran? Maybe we can pin gast instead?

@hoodmane
Copy link
Member Author

hoodmane commented May 2, 2023

Let's put a != for the specific bad version of gast.

@ryanking13
Copy link
Member

pythran released a new version, but sadly scipy 1.10.1 pins pythran version <0.13.0.

@hoodmane
Copy link
Member Author

hoodmane commented May 2, 2023

Can we force it to accept the new version anyways by dropping pythran caps?

@tupui
Copy link

tupui commented May 2, 2023

The new version of Pythran does not solve the issue. This is still under investigation.

@hoodmane
Copy link
Member Author

hoodmane commented May 2, 2023

Looks like it's working again?

@ryanking13
Copy link
Member

Closing as resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants