From jrf at mit.edu Mon Feb 4 08:17:55 2013 From: jrf at mit.edu (John R. Frank) Date: Mon Feb 4 14:18:03 2013 Subject: [egenix-users] pyrun -- adding libraries Message-ID: Hello eGenix Users, Does anyone have any advice about how to overcome this basic installation error with pyrun? ~$ ./install-pyrun --platform=linux-i686 pyrun Downloading eGenix PyRun ... Installing eGenix PyRun ... Installing distribute ... Failed to install distribute ~$ cd pyrun/ ~/pyrun$ bin/pyrun distribute_setup.py bin/pyrun: error while loading shared libraries: libssl.so.1.0.0: cannot open shared object file: No such file or directory libssl is available on the system, so `python distribute_setup.py` works. I'm guessing that it needs ssl for the hashlib python module in the standard library. My goal is use pyrun to deploy a python program that depends on the lxml python module, which needs libxslt.so.1, libexslt.so.0, libxml2.so.2 These are available on my Ubuntu build system from the debian packages libxml2 and libxslt -- and I could rebuild them from source. How does one get PyRun to incorporate such additional libraries, so I can then deploy pyrun (and our custom program) to other machines that do not have any of these libraries? Thanks for any pointers! And if the only way to make progress on this is buying a support ticket, someone please tell me that. jrf From mal at egenix.com Mon Feb 4 14:34:08 2013 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Feb 4 14:34:15 2013 Subject: [egenix-users] pyrun -- adding libraries In-Reply-To: References: Message-ID: <510FB8D0.6090100@egenix.com> On 04.02.2013 14:17, John R. Frank wrote: > Hello eGenix Users, > > Does anyone have any advice about how to overcome this basic installation error with pyrun? > > ~$ ./install-pyrun --platform=linux-i686 pyrun > Downloading eGenix PyRun ... > Installing eGenix PyRun ... > Installing distribute ... > Failed to install distribute > > ~$ cd pyrun/ > ~/pyrun$ bin/pyrun distribute_setup.py > bin/pyrun: error while loading shared libraries: libssl.so.1.0.0: cannot open shared object file: No > such file or directory > > > libssl is available on the system, so `python distribute_setup.py` works. > > I'm guessing that it needs ssl for the hashlib python module in the standard library. The SSL libs are needed for both hashlib and the ssl module (which is used to e.g. implement HTTPS downloads). My guess is that either the libssl has a different version on your system or perhaps just a different name. We're building pyrun against OpenSSL 1.0.1 at the moment, which uses the above so-name for the lib. > My goal is use pyrun to deploy a python program that depends on the lxml python module, which needs > libxslt.so.1, libexslt.so.0, libxml2.so.2 > > These are available on my Ubuntu build system from the debian packages libxml2 and libxslt -- and I > could rebuild them from source. How does one get PyRun to incorporate such additional libraries, so > I can then deploy pyrun (and our custom program) to other machines that do not have any of these > libraries? Additional libraries can be included in pyrun, but only if the libs can be statically linked and the Python extensions interfacing to them support static linking as well. One of the things we'd like to do is make the configuration of such things easier. At the moment, this requires digging deep into the way the pyrun is built. You have to add a corresponding section for the Python extension to Runtime/Setup.PyRun-2.7 and the include_list in Runtime/makepyrun.py > Thanks for any pointers! And if the only way to make progress on this is buying a support ticket, > someone please tell me that. This depends on how much work is involved. We generally try to help people as much as we can without requiring a support ticket, but there are limits to this, of course. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Feb 04 2013) >>> Python Projects, Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope/Plone.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::::: Try our mxODBC.Connect Python Database Interface for free ! :::::: eGenix.com Software, Skills and Services GmbH Pastor-Loeh-Str.48 D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg Registered at Amtsgericht Duesseldorf: HRB 46611 http://www.egenix.com/company/contact/ From jrf at mit.edu Mon Feb 4 08:43:58 2013 From: jrf at mit.edu (John R. Frank) Date: Mon Feb 4 14:44:06 2013 Subject: [egenix-users] pyrun -- adding libraries In-Reply-To: <510FB8D0.6090100@egenix.com> References: <510FB8D0.6090100@egenix.com> Message-ID: Marc-Andre -- thanks for the guidance. >> ~/pyrun$ bin/pyrun distribute_setup.py >> bin/pyrun: error while loading shared libraries: libssl.so.1.0.0: cannot open shared object file: No>> such file or directory >> >> libssl is available on the system, so `python distribute_setup.py` >> works. > > My guess is that either the libssl has a different version on your > system or perhaps just a different name. We're building pyrun against > OpenSSL 1.0.1 at the moment, which uses the above so-name for the lib. Correct guess: ~/pyrun$ dpkg -l | grep libssl ii libssl-dev 0.9.8o-4squeeze7 SSL development libraries, header files and documentation ii libssl0.9.8 0.9.8o-4squeeze7 SSL shared libraries So... is the best way to fix this to get the source for that library, build in a separate library and then do the steps below? >> My goal is use pyrun to deploy a python program that depends on the >> lxml python module, which needs libxslt.so.1, libexslt.so.0, >> libxml2.so.2 >> >> These are available on my Ubuntu build system from the debian packages >> libxml2 and libxslt -- and I could rebuild them from source. How does >> one get PyRun to incorporate such additional libraries, so I can then >> deploy pyrun (and our custom program) to other machines that do not >> have any of these libraries? > > Additional libraries can be included in pyrun, but only if the libs can > be statically linked and the Python extensions interfacing to them > support static linking as well. > > One of the things we'd like to do is make the configuration of such > things easier. At the moment, this requires digging deep into the way > the pyrun is built. > > You have to add a corresponding section for the Python extension to > Runtime/Setup.PyRun-2.7 and the include_list in Runtime/makepyrun.py I don't see "Runtime" in the stuff downloaded by install-pyrun, and while the web page [1] mentions a source tarball, I cannot find a link to download a source archive for pyrun. Am I missing it on that page? Thanks for the guidance! John [1] - http://www.egenix.com/products/python/PyRun/ From mal at egenix.com Mon Feb 4 15:04:31 2013 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Feb 4 15:04:37 2013 Subject: [egenix-users] pyrun -- adding libraries In-Reply-To: References: <510FB8D0.6090100@egenix.com> Message-ID: <510FBFEF.8080208@egenix.com> On 04.02.2013 14:43, John R. Frank wrote: > Marc-Andre -- thanks for the guidance. > > >>> ~/pyrun$ bin/pyrun distribute_setup.py >>> bin/pyrun: error while loading shared libraries: libssl.so.1.0.0: cannot open shared object file: >>> No>> such file or directory >>> >>> libssl is available on the system, so `python distribute_setup.py` works. >> >> My guess is that either the libssl has a different version on your system or perhaps just a >> different name. We're building pyrun against OpenSSL 1.0.1 at the moment, which uses the above >> so-name for the lib. > > Correct guess: > > ~/pyrun$ dpkg -l | grep libssl > ii libssl-dev 0.9.8o-4squeeze7 SSL development > libraries, header files and documentation > ii libssl0.9.8 0.9.8o-4squeeze7 SSL shared libraries > > > So... is the best way to fix this to get the source for that library, build in a separate library > and then do the steps below? Yes. >>> My goal is use pyrun to deploy a python program that depends on the lxml python module, which >>> needs libxslt.so.1, libexslt.so.0, libxml2.so.2 >>> >>> These are available on my Ubuntu build system from the debian packages libxml2 and libxslt -- and >>> I could rebuild them from source. How does one get PyRun to incorporate such additional >>> libraries, so I can then deploy pyrun (and our custom program) to other machines that do not have >>> any of these libraries? >> >> Additional libraries can be included in pyrun, but only if the libs can be statically linked and >> the Python extensions interfacing to them support static linking as well. >> >> One of the things we'd like to do is make the configuration of such things easier. At the moment, >> this requires digging deep into the way the pyrun is built. >> >> You have to add a corresponding section for the Python extension to Runtime/Setup.PyRun-2.7 and >> the include_list in Runtime/makepyrun.py > > > I don't see "Runtime" in the stuff downloaded by install-pyrun, and while the web page [1] mentions > a source tarball, I cannot find a link to download a source archive for pyrun. Am I missing it on > that page? The Runtime/ dir is part of the source tarball. It is not included in the binary archives that install-pyrun fetches from our site. Please see the download section for the download link: http://www.egenix.com/products/python/PyRun/#Download Near the end, there's a button to download the sources for PyRun. > Thanks for the guidance! > > John > > > > > > [1] - http://www.egenix.com/products/python/PyRun/ -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Feb 04 2013) >>> Python Projects, Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope/Plone.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::::: Try our mxODBC.Connect Python Database Interface for free ! :::::: eGenix.com Software, Skills and Services GmbH Pastor-Loeh-Str.48 D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg Registered at Amtsgericht Duesseldorf: HRB 46611 http://www.egenix.com/company/contact/ From jrf at mit.edu Mon Feb 4 09:48:49 2013 From: jrf at mit.edu (John R. Frank) Date: Mon Feb 4 15:48:56 2013 Subject: [egenix-users] pyrun -- adding libraries In-Reply-To: <510FBFEF.8080208@egenix.com> References: <510FB8D0.6090100@egenix.com> <510FBFEF.8080208@egenix.com> Message-ID: >>>> My goal is use pyrun to deploy a python program that depends on the >>>> lxml python module, which needs libxslt.so.1, libexslt.so.0, >>>> libxml2.so.2 >>>> >>>> These are available on my Ubuntu build system from the debian >>>> packages libxml2 and libxslt -- and I could rebuild them from source. >>>> How does one get PyRun to incorporate such additional libraries, so I >>>> can then deploy pyrun (and our custom program) to other machines that >>>> do not have any of these libraries? >>> >>> Additional libraries can be included in pyrun, but only if the libs >>> can be statically linked and the Python extensions interfacing to them >>> support static linking as well. >>> >>> One of the things we'd like to do is make the configuration of such >>> things easier. At the moment, this requires digging deep into the way >>> the pyrun is built. >>> >>> You have to add a corresponding section for the Python extension to >>> Runtime/Setup.PyRun-2.7 and the include_list in Runtime/makepyrun.py >> >> >> I don't see "Runtime" in the stuff downloaded by install-pyrun, and >> while the web page [1] mentions a source tarball, I cannot find a link >> to download a source archive for pyrun. Am I missing it on that page? > > The Runtime/ dir is part of the source tarball. It is not included in > the binary archives that install-pyrun fetches from our site. > > Please see the download section for the download link: > > http://www.egenix.com/products/python/PyRun/#Download Found it, thanks! Reading it. Strategy question: what do you see as the advantages or differences between building PyRun-based deploy and building a chroot containing python and all our dependencies using something like deboostrap [1]? Thanks for your expertise on this. Regards, John [1] - https://wiki.ubuntu.com/DebootstrapChroot From mal at egenix.com Mon Feb 4 18:22:04 2013 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Feb 4 18:22:11 2013 Subject: [egenix-users] pyrun -- adding libraries In-Reply-To: References: <510FB8D0.6090100@egenix.com> <510FBFEF.8080208@egenix.com> Message-ID: <510FEE3C.6080303@egenix.com> On 04.02.2013 15:48, John R. Frank wrote: >>>>> My goal is use pyrun to deploy a python program that depends on the lxml python module, which >>>>> needs libxslt.so.1, libexslt.so.0, libxml2.so.2 >>>>> >>>>> These are available on my Ubuntu build system from the debian packages libxml2 and libxslt -- >>>>> and I could rebuild them from source. How does one get PyRun to incorporate such additional >>>>> libraries, so I can then deploy pyrun (and our custom program) to other machines that do not >>>>> have any of these libraries? >>>> >>>> Additional libraries can be included in pyrun, but only if the libs can be statically linked and >>>> the Python extensions interfacing to them support static linking as well. >>>> >>>> One of the things we'd like to do is make the configuration of such things easier. At the >>>> moment, this requires digging deep into the way the pyrun is built. >>>> >>>> You have to add a corresponding section for the Python extension to Runtime/Setup.PyRun-2.7 and >>>> the include_list in Runtime/makepyrun.py >>> >>> >>> I don't see "Runtime" in the stuff downloaded by install-pyrun, and while the web page [1] >>> mentions a source tarball, I cannot find a link to download a source archive for pyrun. Am I >>> missing it on that page? >> >> The Runtime/ dir is part of the source tarball. It is not included in the binary archives that >> install-pyrun fetches from our site. >> >> Please see the download section for the download link: >> >> http://www.egenix.com/products/python/PyRun/#Download > > > Found it, thanks! Reading it. > > Strategy question: what do you see as the advantages or differences between building PyRun-based > deploy and building a chroot containing python and all our dependencies using something like > deboostrap [1]? For us, the main motivation for pyrun was to be able to easily ship a pre-configured Python run-time to the user, without having to worry about incompatibilities of different OS Python installations or making the installation process itself difficult for the user. A chroot environment would allow separating the Python installation from the rest of the system (and in a way that goes far beyond of what pyrun can do), but also needs a more complicated setup on the user system. > Thanks for your expertise on this. > > Regards, > John > > > > [1] - https://wiki.ubuntu.com/DebootstrapChroot -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Feb 04 2013) >>> Python Projects, Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope/Plone.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::::: Try our mxODBC.Connect Python Database Interface for free ! :::::: eGenix.com Software, Skills and Services GmbH Pastor-Loeh-Str.48 D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg Registered at Amtsgericht Duesseldorf: HRB 46611 http://www.egenix.com/company/contact/