|
View:
New views
20 Messages
—
Rating Filter:
Alert me
|
| < Prev | 1 - 2 | Next > |
|
|
Bundling DistributeHello,
I would like to bundle Distribute with my project so that I could use it without making my users install it. (I like to keep things as simple as possible for my users.) Is it possible? I thought of just copying the "setuptools" folder from the source distribution into a package in my project, so instead of doing `from setuptools import setup`, I would do `from third_party.setuptools import setup`. Does it make sense? Will it work? Anything else I should keep in mind? Thanks, Ram. _______________________________________________ Distutils-SIG maillist - Distutils-SIG@... http://mail.python.org/mailman/listinfo/distutils-sig |
|
|
Re: Bundling DistributeOn Thu, Nov 5, 2009 at 8:58 PM, Ram Rachum <cool-rr@...> wrote:
> Hello, > > I would like to bundle Distribute with my project > so that I could use it without making my users > install it. (I like to keep things as simple as > possible for my users.) > > Is it possible? I thought of just copying the > "setuptools" folder from the source distribution > into a package in my project, so instead of doing > `from setuptools import setup`, I would do > `from third_party.setuptools import setup`. > > Does it make sense? Will it work? Anything else I > should keep in mind? Hello, It is possible to bundle, but the best strategy depends on what you are doing in your project with Distribute. e.g. using it to provide specific options in your setup.py, or using its APIs, like what pkg_resources provides to query entry points for example. Tarek _______________________________________________ Distutils-SIG maillist - Distutils-SIG@... http://mail.python.org/mailman/listinfo/distutils-sig |
|
|
Re: Bundling DistributeTarek Ziadé <ziade.tarek <at> gmail.com> writes:
> > On Thu, Nov 5, 2009 at 8:58 PM, Ram Rachum <cool-rr <at> cool-rr.com> wrote: > > <Pruned> > > Does it make sense? Will it work? Anything else I > > should keep in mind? > > Hello, > > It is possible to bundle, but the best strategy depends on what you are > doing in your project with Distribute. e.g. using it to provide > specific options in your setup.py, or using its > APIs, like what pkg_resources provides to query entry points for example. > > Tarek > _______________________________________________ > Distutils-SIG maillist - Distutils-SIG <at> python.org > http://mail.python.org/mailman/listinfo/distutils-sig > > I'll be using it my setup.py, and I've also heard about pkg_resources and I'll want to use that. And maybe there will be more interesting things in Distribute that I'll want to use. What do you suggest I should do? Ram. _______________________________________________ Distutils-SIG maillist - Distutils-SIG@... http://mail.python.org/mailman/listinfo/distutils-sig |
|
|
Re: Bundling Distribute2009/11/5 Ram Rachum <cool-rr@...>:
> I'll be using it my setup.py, and I've also heard about pkg_resources and I'll > want to use that. And maybe there will be more interesting things in Distribute > that I'll want to use. What do you suggest I should do? In that case you need it installed, and then your users should install it. -- Lennart Regebro: Python, Zope, Plone, Grok http://regebro.wordpress.com/ +33 661 58 14 64 _______________________________________________ Distutils-SIG maillist - Distutils-SIG@... http://mail.python.org/mailman/listinfo/distutils-sig |
|
|
Re: Bundling DistributeOn Thu, Nov 5, 2009 at 9:53 PM, Ram Rachum <cool-rr@...> wrote:
[cut] > > I'll be using it my setup.py, and I've also heard about pkg_resources and I'll > want to use that. And maybe there will be more interesting things in Distribute > that I'll want to use. What do you suggest I should do? There's a trick to use it without installing it : - add the distribute_setup.py script besides your setup.py script - call the use_setuptools API in setup.py, so distribute gets downloaded then added in the path (see the documentation for that) Although I think the best practice is to ask your users to install Distribute explicitely, because using Distribute under the hood implies that everytime someone runs your setup.py script, it will behave specifically. (and not like Distutils is supposed to behave) For example, when "install" is called, it will install the distribution following its own standard. We are pushing in favor of an unified installation standard for all tools (read PEP 376), and until this goal is reached, I am now also suggesting people not to use the use_setuptools trick, so the end-user knows what is going on. Tarek _______________________________________________ Distutils-SIG maillist - Distutils-SIG@... http://mail.python.org/mailman/listinfo/distutils-sig |
|
|
Re: Bundling DistributeTarek Ziadé <ziade.tarek <at> gmail.com> writes:
> There's a trick to use it without installing it : > > - add the distribute_setup.py script besides your setup.py script > - call the use_setuptools API in setup.py, so distribute gets > downloaded then added in the path > (see the documentation for that) > > Although I think the best practice is to ask your users to install > Distribute explicitely, I'm against the online-install thing. I guess I'll tell my users to install Distribute, which I guess is not too bad since I have to tell that only to the users who install from source and not from binaries. Which leads me to my next point: When creating a binary with Distribute, will it install Distribute automatically on the user's computer? I would like it to. Ram. _______________________________________________ Distutils-SIG maillist - Distutils-SIG@... http://mail.python.org/mailman/listinfo/distutils-sig |
|
|
Re: Bundling Distribute2009/11/5 Ram Rachum <cool-rr@...>:
> Which leads me to my next > point: When creating a binary with Distribute, will it install Distribute > automatically on the user's computer? 1. No. 2. You should only create binary releases if your module contains C-code and then only for Windows. -- Lennart Regebro: Python, Zope, Plone, Grok http://regebro.wordpress.com/ +33 661 58 14 64 _______________________________________________ Distutils-SIG maillist - Distutils-SIG@... http://mail.python.org/mailman/listinfo/distutils-sig |
|
|
Re: Bundling DistributeOn Thu, Nov 5, 2009 at 11:32 PM, Lennart Regebro <regebro@...> wrote:
> 2009/11/5 Ram Rachum <cool-rr@...>: >> Which leads me to my next >> point: When creating a binary with Distribute, will it install Distribute >> automatically on the user's computer? > > 1. No. > 2. You should only create binary releases if your module contains > C-code and then only for Windows. 3. If your project is for a specific target system that is not win32, another option is to re-package your distribution into a platform-specific binary distribution, like a .deb file or a .rpm file. Regards Tarek _______________________________________________ Distutils-SIG maillist - Distutils-SIG@... http://mail.python.org/mailman/listinfo/distutils-sig |
|
|
Re: Bundling DistributeLennart Regebro <regebro <at> gmail.com> writes:
> 2. You should only create binary releases if your module contains > C-code and then only for Windows. > Why only if there's C code? I personally find it more convenient to install binaries than from source. _______________________________________________ Distutils-SIG maillist - Distutils-SIG@... http://mail.python.org/mailman/listinfo/distutils-sig |
|
|
Re: Bundling Distribute2009/11/5 Ram Rachum <cool-rr@...>:
> Why only if there's C code? Because in general you want to compile the code on the system when it's Linux or osx etc. It works better, and you don't have to provide both 32bit and 64 bit versions and yadayada. > I personally find it more convenient to install binaries than from source. Why? -- Lennart Regebro: Python, Zope, Plone, Grok http://regebro.wordpress.com/ +33 661 58 14 64 _______________________________________________ Distutils-SIG maillist - Distutils-SIG@... http://mail.python.org/mailman/listinfo/distutils-sig |
|
|
Re: Bundling DistributeOn Thu, 05 Nov 2009 14:50:58 -0800, Lennart Regebro <regebro@...>
wrote: >> I personally find it more convenient to install binaries than from >> source. > Why? 1. Not having to deal build errors (due to missing libs or corrupt lib installations) 2. Not having to have a compiler suite installed (VS, xcode) 3. Installing binaries take less time than for source (which you have to compile) 4. Support for binary repositories (eg: pypm.activestate.com) where you can put custom builds (eg: launchpad repos) Point (1) and (2) are very important for Windows. -srid _______________________________________________ Distutils-SIG maillist - Distutils-SIG@... http://mail.python.org/mailman/listinfo/distutils-sig |
|
|
Re: Bundling DistributeLennart Regebro <regebro <at> gmail.com> writes:
> > 2009/11/5 Ram Rachum <cool-rr <at> cool-rr.com>: > > Why only if there's C code? > > Because in general you want to compile the code on the system when > it's Linux or osx etc. It works better, and you don't have to provide > both 32bit and 64 bit versions and yadayada. > > > I personally find it more convenient to install binaries than from source. > > Why? > Because it requires less work on the user's side. Anyway, I guess I'll supply both binaries and code, so people will install what they want. _______________________________________________ Distutils-SIG maillist - Distutils-SIG@... http://mail.python.org/mailman/listinfo/distutils-sig |
|
|
Re: Bundling DistributeOn Fri, Nov 6, 2009 at 12:39 AM, Tarek Ziadé <ziade.tarek@...> wrote:
I'm a bit lost. Is it possible in any way to have Distribute automatically installed when installing my program, without requiring an internet connection? _______________________________________________ Distutils-SIG maillist - Distutils-SIG@... http://mail.python.org/mailman/listinfo/distutils-sig |
|
|
Re: Bundling Distribute2009/11/5 Sridhar Ratnakumar <sridharr@...>:
> 1. Not having to deal build errors (due to missing libs or corrupt lib > installations) Then you need to compile the libs statically, and then you open up another can of worms with incompatibilities there. > 2. Not having to have a compiler suite installed (VS, xcode) If you install a python library, you have those installed. (Except on Windows). > 3. Installing binaries take less time than for source (which you have to > compile) Which is only relevant of you have massive amounts of C-code. Even big projects take 15 seconds instead if 3 seconds. Hardly a big problem. > 4. Support for binary repositories (eg: pypm.activestate.com) where you can > put custom builds (eg: launchpad repos) This I don't understand. > Point (1) and (2) are very important for Windows. Yes. Which is why I explicitly said that you shouldn't distribute binaries, except for Windows. -- Lennart Regebro: Python, Zope, Plone, Grok http://regebro.wordpress.com/ +33 661 58 14 64 _______________________________________________ Distutils-SIG maillist - Distutils-SIG@... http://mail.python.org/mailman/listinfo/distutils-sig |
|
|
Re: Bundling DistributeOn Fri, Nov 6, 2009 at 12:02 AM, cool-RR <cool-rr@...> wrote:
> > I'm a bit lost. Is it possible in any way to have Distribute automatically > installed when installing my program, without requiring an internet > connection? You need an internet connection unless you provide an archive of distribute alongside the distribute_setup.py script in your archive. In that case, it will use it rather than getting it at PyPI, So yes, there is a way to get it installed with your distribution. That's what the next virtualenv release does in fact. zc.buildout has a similar mechanism with its eggs folder. As a matter of fact, some people build their buildout instance and just zip it with all included (pre-downloaded) dependencies. Then you can just unzip it and use it with no internet connection on a similar target system. That's a "big" binary distribution :) Regards, Tarek _______________________________________________ Distutils-SIG maillist - Distutils-SIG@... http://mail.python.org/mailman/listinfo/distutils-sig |
|
|
Re: Bundling DistributeAt 11:00 PM 11/5/2009 +0000, Ram Rachum wrote:
>Lennart Regebro <regebro <at> gmail.com> writes: > > > > > 2009/11/5 Ram Rachum <cool-rr <at> cool-rr.com>: > > > Why only if there's C code? > > > > Because in general you want to compile the code on the system when > > it's Linux or osx etc. It works better, and you don't have to provide > > both 32bit and 64 bit versions and yadayada. > > > > > I personally find it more convenient to install binaries than > from source. > > > > Why? > > > >Because it requires less work on the user's side. Not for people using easy_install or its derivatives (like pip and buildout). easy_install-based tools work as easily with source as binaries. _______________________________________________ Distutils-SIG maillist - Distutils-SIG@... http://mail.python.org/mailman/listinfo/distutils-sig |
|
|
Re: Bundling Distribute2009/11/6 P.J. Eby <pje@...>:
> Not for people using easy_install or its derivatives (like pip and > buildout). easy_install-based tools work as easily with source as binaries. Right. And untaring and running setup.py install is not exactly a massive amount of work either. :) -- Lennart Regebro: Python, Zope, Plone, Grok http://regebro.wordpress.com/ +33 661 58 14 64 _______________________________________________ Distutils-SIG maillist - Distutils-SIG@... http://mail.python.org/mailman/listinfo/distutils-sig |
|
|
Re: Bundling DistributeLennart Regebro <regebro@...> writes:
> 2009/11/6 P.J. Eby <pje@...>: > > Not for people using easy_install or its derivatives (like pip and > > buildout). easy_install-based tools work as easily with source as > > binaries. “binary package” != “setuptools egg”. At least, I didn't take the parent of P.J.'s post to mean that. > Right. And untaring and running setup.py install is not exactly a > massive amount of work either. :) Time spent installing is only part of the cost. Neither of thosr options cooperate with the operating system's *own* package management. Which causes much frustration and wasted time for the user when trying to later interact with the installed package in some way (use another package that depends on it, detect whether its installed, remove it reliably, etc.). That's when a “binary package”, built by an operating system vendor or some other trusted third party, is much less effort over time; and many users know this, and will opt for such packages by preference. -- \ “Members of the general public commonly find copyright rules | `\ implausible, and simply disbelieve them.” —Jessica Litman, | _o__) _Digital Copyright_ | Ben Finney _______________________________________________ Distutils-SIG maillist - Distutils-SIG@... http://mail.python.org/mailman/listinfo/distutils-sig |
|
|
Re: Bundling Distribute2009/11/6 Ben Finney <ben+python@...>:
> Time spent installing is only part of the cost. Neither of thosr options > cooperate with the operating system's *own* package management. Well, do to THAT you have to make packages for that systems own package management, and that's a completely different issue, with it's own set of problems, religions and wars. > That's when a “binary package” > Using the word "binary package" to mean a, built by an operating system vendor or > some other trusted third party, is much less effort over time; and many > users know this, and will opt for such packages by preference. For end user applications, sure. It has not been specified if we are talking about and end-user application that should have an installer etc. Note that this discussion started with bundling distribute so it was imported from third_party.setuptools instead of just setuptools. A fairly specific question. Then the discussion suddenly was about project that had long compile times. And now about making distro-specific distributions for easy installation. This is a whole different ballgame from where the discussion started. Arguments are being made against statements by switching the context in which the question is being made. That's not a constructive type of discussion. There is nothing from the initial question that indicates that it's a big project for end users with loads of C-code in it. Let's not make the issue more complicated than it already is. -- Lennart Regebro: Python, Zope, Plone, Grok http://regebro.wordpress.com/ +33 661 58 14 64 _______________________________________________ Distutils-SIG maillist - Distutils-SIG@... http://mail.python.org/mailman/listinfo/distutils-sig |
|
|
Re: Bundling DistributeTarek Ziadé <ziade.tarek <at> gmail.com> writes:
> You need an internet connection unless you provide an archive of > distribute alongside > the distribute_setup.py script in your archive. In that case, it will > use it rather than getting > it at PyPI, > > So yes, there is a way to get it installed with your distribution. > That's what the next virtualenv release > does in fact. Hey, that sounds pretty good! How can I do that exactly? ======================================================== _______________________________________________ Distutils-SIG maillist - Distutils-SIG@... http://mail.python.org/mailman/listinfo/distutils-sig |
| < Prev | 1 - 2 | Next > |
| Free embeddable forum powered by Nabble | Forum Help |