[MacPorts] #20859: rabbitmq-server 1.6.0 Add variant for building with Python 2.6
MacPorts
noreply at macports.org
Fri Oct 9 13:54:36 PDT 2009
#20859: rabbitmq-server 1.6.0 Add variant for building with Python 2.6
--------------------------------+-------------------------------------------
Reporter: mdippery@… | Owner: macports-tickets@…
Type: enhancement | Status: new
Priority: Normal | Milestone:
Component: ports | Version: 1.8.0
Keywords: | Port: rabbitmq-server
--------------------------------+-------------------------------------------
Comment(by jabronson@…):
Replying to [comment:1 gaffneyc@…]:
> I don't believe the version of python actually matters. I was able to
build rabbitmq fine with the version of python that ships with Snow
Leopard.
that's because the version of python that ships with snow leopard is 2.6,
which has the "json" library built in. for people still running leopard,
the system python is version 2.5, which doesn't have it. so they either
need macports python 2.6, or python2.5 with the simplejson library
installed (see below).
> I would prefer to remove the dependency on the Macports version of
python since it is simply used to generate some initial code during the
build phase and doesn't actually compile against anything.
i downloaded the [http://www.rabbitmq.com/releases/rabbitmq-server/v1.6.0
/rabbitmq-server-1.6.0.tar.gz source] and grepped for json, and this is
the relevant part (from codegen.py):
{{{
try:
try:
import simplejson as json
except ImportError, e:
if sys.hexversion >= 0x20600f0:
import json
else:
raise e
except ImportError:
print >> sys.stderr , " You don't appear to have simplejson.py
installed"
...
sys.exit(1)
}}}
so as long as the python used during make can import json (i.e. it's
python 2.6) OR can import simplejson (any python version with simplejson
installed), that part won't fail.
does macports have the ability to choose the best python/json from among
all those available (both system (based on OS X version) and macports), or
does it not support fancy conditional dependencies? what is macports'
imperative in situations like this? install the least amount of
dependencies possible to allow for greater flexibility across different
environments, or always install the same dependencies to keep things
consistent across environments, even when superfluous? (it's impossible to
optimize dependency resolution without knowing what you're optimizing for.
fwiw, i vote flexibility > consistency.)
--
Ticket URL: <http://trac.macports.org/ticket/20859#comment:4>
MacPorts <http://www.macports.org/>
Ports system for Mac OS
More information about the macports-tickets
mailing list