On 10/29/11 00:20, Chris Quenelle wrote:
One really good reason to use /usr/bin/python is because you want your script
to run unmodified on Ubuntu Linux, Oracle Linux, Solaris 10, Solaris 11 and
MacOS.
That is a good reason ... assuming that you're willing to ignore the
potential issues of the python version switching out from underneath you.
Any advice you give to a project inside the WOS about managing dependencies
should probably be flipped on it's head to offer the opposite advice to projects
that are outside the WOS. Inside the WOS your dependency is tested, shipped
and patched
along with your own software. If your project is outside the WOS depending on
something inside it, then:
1) You're depending on a moving target.
2) You need to support multiple different releases of the WOS with one
set of your own binaries.
3) It's highly probably that your software (not the binaries, but the source)
needs to simultaneously support non-Solaris OSes as well. So re-structuring
your dependencies in a Solaris-specific way makes the Solaris port of your code
more expensive to maintain.
Sorry, we'll have to agree to disagree here. With respect to the #! line
for python programs, my recommendation to everyone would be to use a
versioned python on any (production) program you're distributing to
others. This comes from my preference to fail early (at installation
time) rather than later via a program that tips over occasionally or
which produces incorrect results. My advice would hold for Linux, Oracle
Linux, Solaris 10, Solaris 11, OS X and any other OS. To return to your
initial example, my recommendation is that your script, on each
platform, should reference the version of python it's using. Hopefully,
there's a single version of python available on all OS's. If not, then
maintaining a one line patch for each OS seems like small overhead in
return for the knowledge that the program will run as expected and
tested on that platform.
All that said, those are simply my recommendations. No one forces
external consumers to use pkgdepend, though I'd certainly recommend it,
and thanks to Tim, they can also bypass pkgdepend on their python
programs if that's what they desire (and that's essentially what you're
asking for). The only difference is that you want the bypass to be
silent and implicit while I prefer users to make that particular choice
explicitly.
Brock
--chris
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss