Portfile newbie questions
Terry Barnum
terrydop at gmail.com
Thu Nov 19 16:19:54 PST 2015
> On Nov 19, 2015, at 3:50 PM, Joshua Root <jmr at macports.org> wrote:
>
> On 2015-11-20 07:04 , Terry Barnum wrote:
>> My first post to macports-dev so please pardon the newbie questions.
>>
>> I've wanted to try my hand at creating a Portfile for the pypolicyd-spf package <https://launchpad.net/pypolicyd-spf/>. Postfix or Sendmail uses it to check a sender's SPF domain record to see if it's spoofed email.
>>
>> pypolicyd-spf's README says it depends on v2.0.9+ of the python-spf library <http://sourceforge.net/projects/pymilter/>, which isn't in ports, and also depends on v2.1.10+ of the python ipaddr module, which is in ports but is an older version (v2.1.9). Current is 2.1.11 <https://pypi.python.org/packages/source/i/ipaddr/ipaddr-2.1.11.tar.gz>.
>>
>> Referencing the Macports docs, I created a local repository and successfully created local Portfiles to install the pymilter and ipaddr packages but then ran into warnings with the pypolicyd-spf port being installed into /etc. I think this means I need a patch file for its setup.py. Are there more examples of patchfiles? Like maybe a Dummy's Guide? ;) Or is it best just to look at other python Portfiles and see what they're doing?
>
> There isn't a standard way to do this, mostly because having to patch
> build systems for this sort of reason is generally because the standard
> way of doing things doesn't work. It's just a matter of going through
> the code and finding out where the install location is defined, and
> figuring out how to get our install location there instead.
Thanks Joshua. I'll have a look at some other ports.
pixilla let me know about the pypi2port port which tries to build Portfiles for packages on the pypi site. I'm playing with it now.
>> Also, what's the convention for when to name a port just py-* versus py2?-* or py3?-*
>
> The python portgroup handles creating a subport per supported python
> version for you. You put 'name py-something' and 'python.versions 27 35'
> and you will get subports py27-something and py35-something.
Thank you (and Brandon on the -users list) for the explanation.
-Terry
>
> - Josh
Terry Barnum
digital OutPost
Carlsbad, CA
http://www.dop.com
800/464-6434
More information about the macports-dev
mailing list