umvarma / pynastran

Automatically exported from code.google.com/p/pynastran
1 stars 0 forks source link

installation fails due to problem with data_files entry in setup.py #167

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Make sure you attach a *small* sample file if you have it.  Otherwise, it's
almost impossible to debug a problem.

What is the expected output? What do you see instead?

Installation fails on Windows 7 64 bit and RHEL 6 using the setup.py script.

What steps will reproduce the problem?
1. type: python setup.py install
2. fails with errors (the first of which probably doesn't cause the problem):

...
byte-compiling build\bdist.win-amd64\egg\pyNastran\op4\old\loadop4.py to 
loadop4.pyc
  File "build\bdist.win-amd64\egg\pyNastran\op4\old\loadop4.py", line 65
    int   word, type, nRead
             ^
SyntaxError: invalid syntax

...

on windows...

    byte-compiling build\bdist.win-amd64\egg\pyNastran\__init__.py to __init__.pyc
    installing package data to build\bdist.win-amd64\egg
    running install_data
    error: can't copy 'p': doesn't exist or not a regular file

on linux...

    byte-compiling build/bdist.linux-x86_64/egg/pyNastran/utils/__init__.py to __init__.pyc
    installing package data to build/bdist.linux-x86_64/egg
    running install_data
    creating build/bdist.linux-x86_64/egg/pyNastran/gui/icons
    error: can't copy 'p': doesn't exist or not a regular file

The complete output is attached (build_error.txt).

Changing line 65 in setup.py from:

      data_files=[tuple([icon_path] + icon_files2)],

to:

      data_files=tuple(icon_files2),

seems to fix the problem. Patch is attached (setup.patch.txt).

What version of the product are you using? On what operating system?  Note:
if you're using a development version, the __version__ parameter is not
accurate.  What version did you checkout from subversion?

 * Windows 7 64-bit and RHEL 6
 * Anaconda Python Distribution 2.1.0
  * numpy 1.9.0
  * scipy 0.14.0
  * docopt 0.6.1
  * vtk 5.10.1
  * pillow 2.5.1
 * pyNastran trunk (r2346)

Original issue reported on code.google.com by jeffrey....@gmail.com on 29 Oct 2014 at 12:52

Attachments:

GoogleCodeExporter commented 9 years ago
The patch did not put the files in the correct location.  Instead of putting 
the icons in the gui/icons folder, they were in the root folder.  The corrected 
code is:

data_files=[(icon_path, icon_files2)],

Another issue popped up during the process of testing the fix, but since it's 
not directly part of the ticket, see ticket #169

Original comment by mesheb82 on 29 Oct 2014 at 5:27

GoogleCodeExporter commented 9 years ago
see issue 169

Original comment by mesheb82 on 29 Oct 2014 at 5:40