adamlwgriffiths / PyGLy

Pure Python OpenGL framework using PyOpenGL
http://adamlwgriffiths.github.com/PyGLy/
Other
37 stars 5 forks source link

Setup problem #2

Closed hyperknot closed 11 years ago

hyperknot commented 11 years ago

I have problems with installing.

Some things are confusing:

  1. Do I need PIL or pillow? install says PIL, requirements say pillow
  2. Requirements say pyglet, however there is your fork in the submodules folder. I used the one in submodules.
  3. Is cython needed or not? I didn't have it and pyglet installed just fine
  4. Requirements say the official pyglet, while there is the fork in submodules. Is requirements wrong?
  5. Finally, after everything is installed, here setup stops like this:

C:\Python27\lib\distutils\dist.py:267: UserWarning: Unknown distribution option: 'test_suite' warnings.warn(msg) running install running build running build_py creating build creating build\lib creating build\lib\pygly copying pygly\buffer.py -> build\lib\pygly copying pygly\camera_node.py -> build\lib\pygly copying pygly\gl.py -> build\lib\pygly copying pygly\gl_legacy.py -> build\lib\pygly copying pygly\gl_utils.py -> build\lib\pygly copying pygly\inertial_space.py -> build\lib\pygly copying pygly\monkey_patch.py -> build\lib\pygly copying pygly\numpy_utils.py -> build\lib\pygly copying pygly\object_space.py -> build\lib\pygly copying pygly\orthogonal_view_matrix.py -> build\lib\pygly copying pygly\pil_texture.py -> build\lib\pygly copying pygly\projection_view_matrix.py -> build\lib\pygly copying pygly\ratio_viewport.py -> build\lib\pygly copying pygly\render_callback_node.py -> build\lib\pygly copying pygly\render_node.py -> build\lib\pygly copying pygly\scene_node.py -> build\lib\pygly copying pygly\shader.py -> build\lib\pygly copying pygly\sort.py -> build\lib\pygly copying pygly\texture.py -> build\lib\pygly copying pygly\transform.py -> build\lib\pygly copying pygly\tree_leaf.py -> build\lib\pygly copying pygly\tree_node.py -> build\lib\pygly copying pygly\utils.py -> build\lib\pygly copying pygly\version.py -> build\lib\pygly copying pygly\vertex_array.py -> build\lib\pygly copying pygly\viewport.py -> build\lib\pygly copying pygly\view_matrix.py -> build\lib\pygly copying pygly\weak_method_reference.py -> build\lib\pygly copying pygly\window.py -> build\lib\pygly copying pygly\world_transform.py -> build\lib\pygly copying pygly\__init__.py -> build\lib\pygly creating build\lib\pygly\cocos2d copying pygly\cocos2d\layer.py -> build\lib\pygly\cocos2d copying pygly\cocos2d\__init__.py -> build\lib\pygly\cocos2d error: package directory 'pygly\input' does not exist

adamlwgriffiths commented 11 years ago

Ah thanks for pointing these out.

  1. PIL and Pillow are effectively the same. PIL is abandoned, Pillow works better, so use Pillow.
  2. Pyglet is required, but for OS-X you need to use my fork or OpenGL core profile does not work (see this issue: https://code.google.com/p/pyglet/issues/detail?id=532). For other OS, Pyglet from PyPy works fine.
  3. Cython was a planned addition but I haven't implemented it yet. So no, it's not a dependency.
  4. See second point regarding Pyglet.
  5. I need to update the setup script.

Apologies for the confusion. I'll remedy these ASAP, thanks for brining these to my attention.

Cheers, Adam

adamlwgriffiths commented 11 years ago

I've updated the setup.py file and checked that it completes successfully.

Can you check if there are any issues. Ie, is there a better way to set optional dependencies? Is there a better way to deal with Pyglet on OS-X?

Cheers, Adam

hyperknot commented 11 years ago

OK, setup completed!

I think neither the requirements file or the INSTALL file is really useful, I'd recommend a simple, hand-written install part in readme.md instead!

On 7 March 2013 02:11, Adam Griffiths notifications@github.com wrote:

I've updated the setup.py file and checked that it completes successfully.

Can you check if there are any issues. Ie, is there a better way to set optional dependencies? Is there a better way to deal with Pyglet on OS-X?

Cheers, Adam

— Reply to this email directly or view it on GitHubhttps://github.com/adamlwgriffiths/PyGLy/issues/2#issuecomment-14539049 .

adamlwgriffiths commented 11 years ago

Forgot about the INSTALL file. Things get so easy to miss when you see them constantly =P. I've removed it.

The requirements file is a 'pip' formatted file. So you can use 'pip install -r requirements.txt'. Albeit, it uses Pyglet from Mercurial.

Part of the problem is the state of Pyglet. It was only recently that they released a working version on PyPy. I'll remove Pyglet from requirements.txt and mention it should be selectively installed depending on the Host Operating System (PyPy for Win / Lin, and contrib/Pyglet for OS-X).

The dependencies should be used by pip / easy_install to install required packages though? Although, I've found this doesn't work. Other people have mentioned the same thing. I'm not sure what the fix is. Perhaps I should just remove the optional ones until I get enough time to fix it properly?

hyperknot commented 11 years ago

I think a simple hand-written explanation is perfectly enough.

I'd just say something like:

  1. Install numpy, pillow
  2. go to contrib/pyglet and run setup install
  3. go to contrib/pyrr and run setup install
  4. run setup install

I'm on windows and I'm using ActivePython and it's powerful package manager pypm, so most packages are just a pypm install numpy. I prefer this over the default python tools, so for me the pip or easy_install method is not preferred.

On 7 March 2013 05:03, Adam Griffiths notifications@github.com wrote:

Forgot about the INSTALL file. Things get so easy to miss when you see them constantly =P. I've removed it.

The requirements file is a 'pip' formatted file. So you can use 'pip install -r requirements.txt'. Albeit, it uses Pyglet from Mercurial.

Part of the problem is the state of Pyglet. It was only recently that they released a working version on PyPy. I'll remove Pyglet from requirements.txt and mention it should be selectively installed depending on the Host Operating System (PyPy for Win / Lin, and contrib/Pyglet for OS-X).

The dependencies should be used by pip / easy_install to install required packages though? Although, I've found this doesn't work. Other people have mentioned the same thing. I'm not sure what the fix is. Perhaps I should just remove the optional ones until I get enough time to fix it properly?

— Reply to this email directly or view it on GitHubhttps://github.com/adamlwgriffiths/PyGLy/issues/2#issuecomment-14543142 .

adamlwgriffiths commented 11 years ago

I use $PYTHONPATH to add /contrib/XYZ to Python. The reason being that I update Pyrr every so often. I hardly use setup.py (hence you found these issues =P). I'll make the changes you've suggested, but just be aware that dependencies may go out of sync. Although Pyrr is the more stable of my projects.

I'll let you know when I've made the changes and you can see if they're suitable.

Cheers =)

hyperknot commented 11 years ago

Cheers!

On 7 March 2013 05:17, Adam Griffiths notifications@github.com wrote:

I use $PYTHONPATH to add /contrib/XYZ to Python. The reason being that I update Pyrr every so often. I hardly use setup.py (hence you found these issues =P). I'll make the changes you've suggested, but just be aware that dependencies may go out of sync. Although Pyrr is the more stable of my projects.

I'll let you know when I've made the changes and you can see if they're suitable.

Cheers =)

— Reply to this email directly or view it on GitHubhttps://github.com/adamlwgriffiths/PyGLy/issues/2#issuecomment-14543435 .

adamlwgriffiths commented 11 years ago

I've updated the README, it should be clearer and more open to different installation methods (I hope =P). I've updated setup.py to not install pyglet (everything just says use submodule version) and to not install optional dependencies. I've removed Pyglet from requirements.txt. I've moved pillow and pyopengl-accelerate from requirements added them to requirements-optional.txt.

Let me know what you think. I'm happy to make more changes if you think it's still a bit confusing. I've found it hard to try and cater to so many different methods without making the README a big mess, so any suggestions are very welcome =).

Cheers, Adam

hyperknot commented 11 years ago

It's nice now! However I'd definitely put the requirements section before the install, since install wouldn't finish without the requirements.

Here is how I'd do:

  1. Install requirements
  2. Get pygly
  3. Install pygly

On 7 March 2013 07:34, Adam Griffiths notifications@github.com wrote:

I've updated the README, it should be clearer and more open to different installation methods (I hope =P). I've removed Pyglet from requirements.txt. I've moved pillow and pyopengl-accelerate from requirements added them to requirements-optional.txt.

Let me know what you think. I'm happy to make more changes if you think it's still a bit confusing. I've found it hard to try and cater to so many different methods without making the README a big mess, so any suggestions are very welcome =).

Cheers, Adam

— Reply to this email directly or view it on GitHubhttps://github.com/adamlwgriffiths/PyGLy/issues/2#issuecomment-14546478 .

adamlwgriffiths commented 11 years ago

Done and done =)