Opened 10 years ago

Closed 10 years ago

#45898 closed submission (fixed)

Portfile for py-libnacl

Reported by: cro (C. R. Oldham) Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: nerdling (Jeremy Lavergne)
Port: py-libnacl

Description

I respectfully submit the attached Portfile for libnacl, a Python binding for the libsodium crypto library, which is already part of MacPorts. libnacl is a dependency for Salt when RAET is the transport.

Attachments (1)

Portfile (1.1 KB) - added by cro (C. R. Oldham) 10 years ago.
Portfile for py-libnacl

Download all attachments as: .zip

Change History (8)

comment:1 Changed 10 years ago by ryandesign (Ryan Carsten Schmidt)

Thanks. Some issues:

  • distname and homepage should not be set; the defaults from the github portgroup should be fine
  • The dependency on port:py-six should be changed to a dependency on port:py${python.version}-six
  • Is it your intention to submit a port "libnacl" (per the Port field and description of this ticket) — an application that happens to use python? If so:
    • the name py-libnacl line should be removed, allowing the default name libnacl set by the github portgroup to be used
  • Otherwise, if it is your intention to submit a port "py-libnacl" (per the title of this ticket and the name line in the portfile) — a python module for use by other ports? If so:
    • The dependencies on port:py${python.version}-setuptools and port:py${python.version}-six and should be inside an if {${name} ne ${subport}} block
    • python.default_version 27 should be changed to python.versions 27

comment:2 Changed 10 years ago by cro (C. R. Oldham)

Hi Ryan,

Some questions:

The dependency on port:py-six should be changed to a dependency on port:py${python.version}-six

I'm confused--six is a compatibility library and I see there is a 'py-six' port as well as a one for py26, py27, py34, etc. Why does the py-six port exist?

libnacl is a python binding to libsodium. It's compatible with Python 2.6 through 3.4. Is there a way to create a Portfile that will result in ports for all those Python versions or do I need to create a separate Portfile for each?

comment:3 in reply to:  2 Changed 10 years ago by ryandesign (Ryan Carsten Schmidt)

Replying to cr@…:

I'm confused--six is a compatibility library and I see there is a 'py-six' port as well as a one for py26, py27, py34, etc. Why does the py-six port exist?

All python module ports are made this way. There is a py-whatever portfile, which creates "subports" for each version of python, e.g. py27-whatever, py34-whatever, etc. based on the python.versions option. The main py-whatever port is not meant to be installed; installing it serves no purpose; the only thing it installs is a readme saying it is a stub port.

libnacl is a python binding to libsodium. It's compatible with Python 2.6 through 3.4. Is there a way to create a Portfile that will result in ports for all those Python versions or do I need to create a separate Portfile for each?

Then what you want is to make a py-libnacl port and set python.versions 27 34. (We're in the process of excising python 2 < 2.7 and python 3 < 3.4 from MacPorts so there's no need to create those versions.)

comment:4 Changed 10 years ago by cro (C. R. Oldham)

OK, updated Portfile for py-libnacl is attached.

Changed 10 years ago by cro (C. R. Oldham)

Attachment: Portfile added

Portfile for py-libnacl

comment:5 Changed 10 years ago by cro (C. R. Oldham)

Salt 2014.7 Portfile ticket is here: https://trac.macports.org/ticket/45959

comment:6 Changed 10 years ago by nerdling (Jeremy Lavergne)

Cc: snc@… added

Cc Me!

comment:7 Changed 10 years ago by nerdling (Jeremy Lavergne)

Port: py-libnacl added; libnacl removed
Resolution: fixed
Status: newclosed
Version: 2.3.2

Added in r128429.

Note: See TracTickets for help on using tickets.