Help to develop some python package ports

Sean Farley sean at macports.org
Fri Aug 2 13:25:38 PDT 2013


ryandesign at macports.org writes:

> On Aug 2, 2013, at 13:29, Sterling Smith wrote:
>
>> I'm new to the list.  Please gently correct any missteps I make.
>
> Welcome!
>
>> For reasons to remain unnamed, I need to install several python packages for which there are not yet ports.  While I would usually do a `pip install <package`  on linux (and this possibility exists with the py-pip port), I would like to develop the ports so that these ports can be dependencies of a later port (also not yet developed).
>> 
>> I still need to go off and read the documentation for how to develop ports, but I wondered if someone could point me to an already developed portfile for a python package which basically emulates `pip install` so that I could learn by example.
>
> I am not familiar with pip and I don't think we have documentation about how to make python ports. But there are a zillion python modules in MacPorts; take your pick of the ports in the python directory and read the portfile to see how they work. Make sure the port you're looking at uses "PortGroup python 1.0"; older ports using "PortGroup python27 1.0" or similar are not good examples.

A good and simple start would be to look at the py-jedi port I recently
added. It also uses the github portgroup which is handy to learn about
now and shows how to depend on setuptools (note: test your python
package for its use of setuptools or not).

You can open the portfile in your favorite editor with:

$ port edit py-jedi

Hope that helps!


More information about the macports-dev mailing list