Skip to content

Instantly share code, notes, and snippets.

@steenzout
Created June 25, 2014 11:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save steenzout/7565f8aec833c554c667 to your computer and use it in GitHub Desktop.
Save steenzout/7565f8aec833c554c667 to your computer and use it in GitHub Desktop.
Portfile template for python package hosted at github.com.
# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
# $Id$
PortSystem 1.0
PortGroup python 1.0
PortGroup select 1.0
PortGroup github 1.0
github.setup <username> <repository_name> <repository_tag>
set real_name <package_name>
name py-<package_name>
version <version>
maintainers <email domain>:<email account>
platforms darwin
supported_archs noarch
license <license>
description <description>
long_description <long description>
homepage https://www.github.com/<username>/<repository_name>/
checksums sha256 <checksum_sha256> \
rmd160 <checksum_rmd160>
python.versions <python_version1> <...> <python_versionN>
if {${name} ne ${subport}} {
depends_lib-append port:${real_name}_select
livecheck.type none
select.group ${real_name}
select.file ${filespath}/<command>${python.version}
notes "
To make the Python ${python.branch} version of ${real_name} the one that is run\
when you execute the commands without a version suffix, e.g. '<command>', run:
port select --set ${select.group} [file tail ${select.file}]
"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment