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.

> 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.

- Josh
_______________________________________________
macports-dev mailing list
macports-dev@lists.macosforge.org
https://lists.macosforge.org/mailman/listinfo/macports-dev

Reply via email to