Eggs for Christmas

Hi all,

A while back (http://lists.wxwidgets.org/cgi-bin/ezmlm-cgi?12:mss:3637:200711:dambhhlnhfalnegfpkdm) we discussed reorganizing the wxPython packages for Mac and Windows such that there is a runtime-only package, and a package with the runtime and everything else that a developer would want to have (the docs, demos and such.) While I was letting that idea stew a bit I realized that Python Eggs would be an ideal way to provide the runtime portion of this idea, and over the last couple weeks I have been learning about eggs and playing with tweaks to setup.py to make a wxPython egg. You can see the results at http://alldunn.com/wxPython/stuff/. To use it just download the egg and then install it with easy_install.

There are still a few known problems which I'll describe below, but first, a few choices I made going into the task:

* Only the wx package will be included, not the wxPython package.

* The wxversion module will not work with the egg, but you can use the pkg_resources module to do the same thing if you have more than one version of the wxPython egg installed.

* One of the main ideas behind using an egg is that it is self contained. To me that means the the wxWidgets shared libraries should be included too. On Windows that is easy and I include the DLLs the same way that they are now, in the same dir as the wxPython .pyd files. On Mac I've copied the wx .dylibs into the egg in a Library dir, and I've modified the extension modules to be able to find those libraries using a @loader_path/../Library path name. This lets the egg be located anywhere and still be able to find its own wx shared libs. For Mac this is especially helpful because it allows the egg to be used with either the system python or a user installed MacPython. You can also install the egg into your $HOME/Library/Python/2.5/site-packages directory and use the one egg from both Pythons.

Known Problems:

* The message catalog files are not included yet. Not a big deal, I just haven't done it yet.

* On Windows being self-contained means that a few things we usually install outside of the package dir are missing, mainly the .manifest files for python.exe and pythonw.exe. If easy_install supported some sort of post-install script then I could easily take care of it there, but it doesn't look like it does. :frowning: Does anybody have any ideas about how to work around this?

* On Windows easy_install creates a stub .exe loader for the "entry points" it installs to the Scripts dir. Those that I've marked as gui scripts (pycrust, xrced, etc.) are not working for some reason. They just exit without launching the application. I think it's a bug in the launcher exe provided by setuptools, but I haven't dug into it yet. Since these launchers are created during the install phase it will likely take a new version of setuptools to be able to fix it.

Anyway, please give these eggs a try and let me know how it goes. If you have ideas to help with the above problems, or if you have any other suggestions please speak up.

Merry Christmas!

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!

Robin Dunn wrote:

You can see the
results at Index of /wxPython/stuff. To use it just download the egg and ...

You don't have permission to access /wxPython/stuff/wxPython-2.8.7.2.pre20071222-py2.5-win32.egg on this server.

Scott David Daniels wrote:

Robin Dunn wrote:

You can see the
results at Index of /wxPython/stuff. To use it just download the egg and ...

You don't have permission to access /wxPython/stuff/wxPython-2.8.7.2.pre20071222-py2.5-win32.egg on this server.

Should be fixed now.

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!

I've uploaded a couple more eggs for testing. See Index of /wxPython/stuff. These have the message catalog files included, and a few other things tweaked and rearranged a little.

Robin Dunn wrote:

Known Problems:

[...]

* On Windows being self-contained means that a few things we usually install outside of the package dir are missing, mainly the .manifest files for python.exe and pythonw.exe. If easy_install supported some sort of post-install script then I could easily take care of it there, but it doesn't look like it does. :frowning: Does anybody have any ideas about how to work around this?

* On Windows easy_install creates a stub .exe loader for the "entry points" it installs to the Scripts dir. Those that I've marked as gui scripts (pycrust, xrced, etc.) are not working for some reason. They just exit without launching the application. I think it's a bug in the launcher exe provided by setuptools, but I haven't dug into it yet. Since these launchers are created during the install phase it will likely take a new version of setuptools to be able to fix it.

These problems are still there, but I've let PJE know about them, and have submitted a patch for the launcher executable bug, so hopefully they'll be solved on the setuptools side of the fence soon.

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!

Hi all,

Has anybody experimented much with these eggs yet? Any comments, problems or questions? Better ideas?

I submitted a patch to PJE that fixes the problem with the stub loader exe on Windows, and he has checked it in to SVN so that will be in the next version of setuptools. We also discussed how to safely allow a post-install script of some sort, but he hasn't made a decision on that yet.

Robin

Robin Dunn wrote:

···

Hi all,

A while back (http://lists.wxwidgets.org/cgi-bin/ezmlm-cgi?12:mss:3637:200711:dambhhlnhfalnegfpkdm) we discussed reorganizing the wxPython packages for Mac and Windows such that there is a runtime-only package, and a package with the runtime and everything else that a developer would want to have (the docs, demos and such.) While I was letting that idea stew a bit I realized that Python Eggs would be an ideal way to provide the runtime portion of this idea, and over the last couple weeks I have been learning about eggs and playing with tweaks to setup.py to make a wxPython egg. You can see the results at Index of /wxPython/stuff. To use it just download the egg and then install it with easy_install.

There are still a few known problems which I'll describe below, but first, a few choices I made going into the task:

* Only the wx package will be included, not the wxPython package.

* The wxversion module will not work with the egg, but you can use the pkg_resources module to do the same thing if you have more than one version of the wxPython egg installed.

* One of the main ideas behind using an egg is that it is self contained. To me that means the the wxWidgets shared libraries should be included too. On Windows that is easy and I include the DLLs the same way that they are now, in the same dir as the wxPython .pyd files. On Mac I've copied the wx .dylibs into the egg in a Library dir, and I've modified the extension modules to be able to find those libraries using a @loader_path/../Library path name. This lets the egg be located anywhere and still be able to find its own wx shared libs. For Mac this is especially helpful because it allows the egg to be used with either the system python or a user installed MacPython. You can also install the egg into your $HOME/Library/Python/2.5/site-packages directory and use the one egg from both Pythons.

Known Problems:

* The message catalog files are not included yet. Not a big deal, I just haven't done it yet.

* On Windows being self-contained means that a few things we usually install outside of the package dir are missing, mainly the .manifest files for python.exe and pythonw.exe. If easy_install supported some sort of post-install script then I could easily take care of it there, but it doesn't look like it does. :frowning: Does anybody have any ideas about how to work around this?

* On Windows easy_install creates a stub .exe loader for the "entry points" it installs to the Scripts dir. Those that I've marked as gui scripts (pycrust, xrced, etc.) are not working for some reason. They just exit without launching the application. I think it's a bug in the launcher exe provided by setuptools, but I haven't dug into it yet. Since these launchers are created during the install phase it will likely take a new version of setuptools to be able to fix it.

Anyway, please give these eggs a try and let me know how it goes. If you have ideas to help with the above problems, or if you have any other suggestions please speak up.

Merry Christmas!

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!

Hi Robin. I am quite happy if you are going to be releasing code with a setup.py to eggify wxPython since I use eggs for pretty much everything. Packge distribution is an important part of the egg story since the python package index is used by many folks including myself for automating project builds. I am hoping you can keep the releases up to date on pypi with this in mind. The lastest wxPython on pypi is currently 2.6.x which is quite old. I obtain most of the software I use from a few package indexes but pypi being the most important. Can you advise of when the next wxPython will be available with the refactored setup. Many thanks.

Regards,
David

Robin Dunn wrote:

···

Hi all,

Has anybody experimented much with these eggs yet? Any comments, problems or questions? Better ideas?

I submitted a patch to PJE that fixes the problem with the stub loader exe on Windows, and he has checked it in to SVN so that will be in the next version of setuptools. We also discussed how to safely allow a post-install script of some sort, but he hasn't made a decision on that yet.

Robin

Robin Dunn wrote:

Hi all,

A while back (http://lists.wxwidgets.org/cgi-bin/ezmlm-cgi?12:mss:3637:200711:dambhhlnhfalnegfpkdm) we discussed reorganizing the wxPython packages for Mac and Windows such that there is a runtime-only package, and a package with the runtime and everything else that a developer would want to have (the docs, demos and such.) While I was letting that idea stew a bit I realized that Python Eggs would be an ideal way to provide the runtime portion of this idea, and over the last couple weeks I have been learning about eggs and playing with tweaks to setup.py to make a wxPython egg. You can see the results at Index of /wxPython/stuff. To use it just download the egg and then install it with easy_install.

There are still a few known problems which I'll describe below, but first, a few choices I made going into the task:

* Only the wx package will be included, not the wxPython package.

* The wxversion module will not work with the egg, but you can use the pkg_resources module to do the same thing if you have more than one version of the wxPython egg installed.

* One of the main ideas behind using an egg is that it is self contained. To me that means the the wxWidgets shared libraries should be included too. On Windows that is easy and I include the DLLs the same way that they are now, in the same dir as the wxPython .pyd files. On Mac I've copied the wx .dylibs into the egg in a Library dir, and I've modified the extension modules to be able to find those libraries using a @loader_path/../Library path name. This lets the egg be located anywhere and still be able to find its own wx shared libs. For Mac this is especially helpful because it allows the egg to be used with either the system python or a user installed MacPython. You can also install the egg into your $HOME/Library/Python/2.5/site-packages directory and use the one egg from both Pythons.

Known Problems:

* The message catalog files are not included yet. Not a big deal, I just haven't done it yet.

* On Windows being self-contained means that a few things we usually install outside of the package dir are missing, mainly the .manifest files for python.exe and pythonw.exe. If easy_install supported some sort of post-install script then I could easily take care of it there, but it doesn't look like it does. :frowning: Does anybody have any ideas about how to work around this?

* On Windows easy_install creates a stub .exe loader for the "entry points" it installs to the Scripts dir. Those that I've marked as gui scripts (pycrust, xrced, etc.) are not working for some reason. They just exit without launching the application. I think it's a bug in the launcher exe provided by setuptools, but I haven't dug into it yet. Since these launchers are created during the install phase it will likely take a new version of setuptools to be able to fix it.

Anyway, please give these eggs a try and let me know how it goes. If you have ideas to help with the above problems, or if you have any other suggestions please speak up.

Merry Christmas!