New Ticket     Tickets     Wiki     Browse Source     Timeline     Roadmap     Ticket Reports     Search

Ticket #20859 (closed enhancement: fixed)

Opened 4 years ago

Last modified 2 years ago

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

Portfile.diff (650 bytes) - added by mdippery@… 4 years ago.
Enables the use of py26-simplejson (and Python 2.6) during build phase

Change History

Changed 4 years ago by mdippery@…

Enables the use of py26-simplejson (and Python 2.6) during build phase

comment:1 follow-up: ↓ 4 Changed 4 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:2 Changed 4 years ago by gaffneyc@…

  • Cc gaffneyc@… added

Cc Me!

comment:3 Changed 4 years ago by jabronson@…

  • Cc jabronson@… added

Cc Me!

comment:4 in reply to: ↑ 1 Changed 4 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 2 years ago by jmr@…

  • Status changed from new to closed
  • Resolution set to fixed
Note: See TracTickets for help on using tickets.