python dependancy

Mark Brethen mark.brethen at gmail.com
Mon Jun 30 06:19:37 PDT 2014


On Jun 30, 2014, at 2:37 AM, Joshua Root <jmr at macports.org> wrote:

> On 2014-6-30 17:02 , Mark Brethen wrote:
>> 
>> On Jun 30, 2014, at 1:52 AM, Mojca Miklavec <mojca.miklavec.lists at gmail.com> wrote:
>> 
>>> On Mon, Jun 30, 2014 at 8:44 AM, Joshua Root wrote:
>>>> On 2014-6-30 15:48 , Mark Brethen wrote:
>>>>> How does one indicate a python lib dependance in a port file that requires it? Add the portgroup python?
>>>> 
>>>> The python portgroup is only for stuff that installs with a setup.py. If
>>>> that's not the case here, just add a python dep like you would any other
>>>> port.
>>> 
>>> A minor annoyance however is that some ports that need a regular
>>> installation (./configure && make && make install) need to hardcode
>>> all the Python variables when it would be a lot more handy to include
>>> the python portgroup (if it was implemented differently and if it
>>> didn't change all the variables so aggressively).
>>> 
>>> Mojca
>> 
>> FreeCAD requires the python framework and will need something like --with-python-include=/opt/local/Library/Frameworks/Python.framework/Versions/2.7/Headers during configure.
> 
> This can (and as per upstream should) be obtained from python-config
> (actually e.g. python2.7-config depending on the version you want).
> 
>> There is also the question of limiting it to 2.7 or having the option of choosing a version.
> 
> If there's a good reason to want a different python version, provide
> variants. If not, just go with 2.7.
> 
> - Josh

FreeCAD installs several of its own python scripts, as found in this CMakeLists file:

fc_copy_to_mod_path("TemplatePyMod" 
	InitGui.py
	Init.py
	Commands.py
	PythonQt.py
	Tests.py
	DocumentObject.py
)

INSTALL(
    FILES
        Init.py
        InitGui.py
        Commands.py
        FeaturePython.py
        PythonQt.py
        Tests.py
    DESTINATION
        Mod/TemplatePyMod
)

Can you give me an example of a Portfile that is set up properly for this?

BTW, I'm told that FreeCAD has moved from PyQt4 to PySide due to license issues. So, shiboken and PySide are required now, as well as Pivy. I'll have to make portfiles for them.

Mark






More information about the macports-dev mailing list