Help to develop some python package ports
Sterling Smith
smithsp at fusion.gat.com
Fri Aug 2 15:41:11 PDT 2013
Sean & Ryan,
Thanks for the response.
Sean,
When I developed a lone Portfile, port install seemed to try to go off and look for the default python version of the port. For instance, I just submitted https://trac.macports.org/ticket/39968 for a py-fortranformat port, but when I tried `port install` in the directory with the Portfile, it went off to look for py27-fortranformat, because I had specified py-fortranformat as the name in the Portfile. By changing the name in the Portfile to py27-fortranformat, I was able to install into MacPorts.
All,
Has anyone considered writing a pypi2port utility (or does one already exist)? It seems that one could parse the XML file obtained from [1] to fill out a skeleton Portfile.
Thanks for the help.
-Sterling
[1]https://pypi.python.org/pypi?:action=doap&name=<name of python package to be turned into a port>
On Aug 2, 2013, at 1:25PM, Sean Farley wrote:
>
> 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