Using python before it is selected?

Jeremy Lavergne jeremy at lavergne.gotdns.org
Fri May 18 21:27:46 PDT 2012


> So the port I'm working on uses Python and requires a bunch of modules as dependencies.  That's working OK but then my port's configure _uses_ python to test if the dependencies are installed. If this is the first time installing python on a machine, no version of python is 'selected'.  aka ...
> 
>> AT-MBP12:mp WCT$ port select --list python
>> Available versions for python:
>> 	none (active)
>> 	python25-apple
>> 	python26
>> 	python26-apple
>> 	python27-apple
> 
> It would seem to me that MacPorts ought to 'select' the first version of python when it is installed, no?  In my port, is there a way to test for 'none' and then set the one I want?   I wouldn't change the version out from under the user if they've actually selected one.

Well, if your port is after a specific version the easy way would be check the modules with pythonX.Y. You should also lib-depend on this version of python, which means it WILL BE AVAILABLE when you build and install.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 8796 bytes
Desc: not available
URL: <http://lists.macosforge.org/pipermail/macports-dev/attachments/20120519/5f40620d/attachment-0001.bin>


More information about the macports-dev mailing list