Python Class Library for Numbers package.

Ryan Schmidt ryandesign at
Mon Apr 26 21:15:51 PDT 2010

On Apr 26, 2010, at 21:40, David Nicholls wrote:

> OK, let's take a step backward.  The CLN Macports package.  My first step was the usual 'sudo port install cln'
> I tried to install the universal variant but it failed.

Agreed; I filed a ticket for that:

> The default was the test variant and that appeared to work.

FYI, the +test variant is pointless in this port and should be deleted; I filed a ticket for that:

> When I type 'port installed cln' I see:
> The following ports are currently installed:
>  cln @1.2.2_0+test (active)
> But in Python (the Macports version 2.6.5) when I try "from cln import *" I get 'no module named cln'

> I presume this just means that I can't call it that way, and that the files it installs are what's important for other Python package installers to find.

I'm not familiar with python in general, but from "port deps cln" you can see the cln port doesn't depend on a python port, and using "port contents cln" you can see it doesn't install any python modules, so it doesn't surprise me that you can't simply "import" it into python.

> My next step was to install the rpncalc python package from, using:  'python install --prefix=/opt/local'
> That appeared to work, but when importing rpncalc into Python, it said it needed clnum.

So we should make ports for rpncalc and clnum; I filed tickets for this:

> So the next step I took was to attempt to install clnum, as per, using: 'python install --prefix=/opt/local'
> This is where the problems happen.  I get numerous error messages of the type: 'clnum/src/clnum.cpp:30:17: error: cln.h: No such file or directory'
> The file cln.h and all the other 'missing' .h files were indeed installed using the MacPorts cln package, but they are not being found by the python setup process.

It's probably easier to try to make the ports than to sort out how to build it by hand.

To build it by hand, you probably need to set a bunch of environment variables, such as the ones MacPorts sets automatically every time it installs a port; these are shown in the debug output in the configure phase if you're interested.

More information about the macports-users mailing list