RuruX / shell_analysis_fenicsx

GNU Lesser General Public License v3.0
11 stars 2 forks source link

Cannot install shell_analysis_fenicsx package with current package/directory names #1

Closed austinherrema closed 1 year ago

austinherrema commented 1 year ago

When trying to install pip install -e . I got the following error:

  Preparing metadata (setup.py) ... error                                                                            
  error: subprocess-exited-with-error                                                                                

  × python setup.py egg_info did not run successfully.                                                               
  │ exit code: 1                                                                                                     
  ╰─> [8 lines of output]                                                                                            
      running egg_info                                                                                               
      creating /tmp/pip-pip-egg-info-_aljba9y/shell_analysis_fenicsx.egg-info                                        
      writing /tmp/pip-pip-egg-info-_aljba9y/shell_analysis_fenicsx.egg-info/PKG-INFO                                
      writing dependency_links to /tmp/pip-pip-egg-info-_aljba9y/shell_analysis_fenicsx.egg-info/dependency_links.txt
      writing requirements to /tmp/pip-pip-egg-info-_aljba9y/shell_analysis_fenicsx.egg-info/requires.txt            
      writing top-level names to /tmp/pip-pip-egg-info-_aljba9y/shell_analysis_fenicsx.egg-info/top_level.txt        
      writing manifest file '/tmp/pip-pip-egg-info-_aljba9y/shell_analysis_fenicsx.egg-info/SOURCES.txt'             
      error: package directory 'shell_analysis_fenicsx' does not exist                                               
      [end of output]                                                                                                

  note: This error originates from a subprocess, and is likely not a problem with pip.                               
error: metadata-generation-failed                                                                                    

× Encountered error while generating package metadata.                                                               
╰─> See above for output.                                                                                            

note: This is an issue with the package mentioned above, not pip.                                                    
hint: See above for details.                                                                                         

I believe this is because setup.py specifies a package name of shell_analysis_fenicsx (lowercase "x") but the directory containing the package files is currently called shell_analysis_fenicsX (capital X). I renamed shell_analysis_fenicsX to shell_analysis_fenicsx and was then able to successfully install the package.

austinherrema commented 1 year ago

Actually, I'll change my suggestion here. Various parts of the code assume that the module is called shell_analysis_fenicsX (with a capital X), so it's best to keep that convention. Thus, rather of renaming the directory as stated above, one can instead change the name of the module in setup.py from shell_analysis_fenicsx to shell_analysis_fenicsX.

image

austinherrema commented 1 year ago

Solution (went to all lowercase) discussed in #2