Opened 15 years ago
Closed 14 years ago
#20859 closed enhancement (fixed)
rabbitmq-server 1.6.0 Add variant for building with Python 2.6
Reported by: | mdippery@… | Owned by: | macports-tickets@… |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 1.8.0 |
Keywords: | Cc: | meyer@…, tonyg@…, gaffneyc@…, jabronson@… | |
Port: | rabbitmq-server |
Description
The current port for rabbitmq-server
requires Python 2.5, by way of the py25-simplejson
port. This patch for the Portfile enables the use of py26-simplejson
(and thus Python 2.6) when building instead.
Attachments (1)
Change History (6)
Changed 15 years ago by mdippery@…
Attachment: | Portfile.diff added |
---|
comment:1 follow-up: 4 Changed 15 years ago by 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. 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.
comment:4 Changed 15 years ago by jabronson@…
Replying to 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 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.)
comment:5 Changed 14 years ago by jmroot (Joshua Root)
Resolution: | → fixed |
---|---|
Status: | new → closed |
Enables the use of py26-simplejson (and Python 2.6) during build phase