Menu

#146 setup.py (distutils) installation does not work (attached patch)

closed
None
attached patch file
normal
2.4.7
bug
2019-10-28
2016-01-19
No

Hello,

the site-package installation does not work.
genx.py will be installed for example to /usr/local/bin and the genx will be installed in the site-package directory, e.g. /usr/local/lib/python2.7/site-packages/genx/

genx.py imports version.py and model.py which is ok if you run the software from checkout.
Otherwise this leads to an ImportError because version.py and model.py resides in the site-package.

To make matters worse you cannot import the genx site-package from genx.py (naming convention) directly.

The attached patch imports version.py and model.py from genx site-package on ImportError exception.
This fixes this error.

Nevertheless it would be nice to rename genx.py to something different from the site-package name and to restructure the project that you do not need to distinguish between imports in the checkout version and imports in a installed package version.

Best
Christian

1 Attachments

Discussion

  • Matts Björck

    Matts Björck - 2016-01-24
    • status: new --> accepted
     
  • Matts Björck

    Matts Björck - 2016-01-24

    Thanks for the report. I will change the directory structure to avoid this. Will attempt to implement it in the next release.

    Best Regards
    Matts

     
  • Artur Glavic

    Artur Glavic - 2019-10-28
    • status: accepted --> closed
     
  • Artur Glavic

    Artur Glavic - 2019-10-28

    Will be resolved in future release.

     

Log in to post a comment.