Commit 172fb920 authored by Stefan Countryman's avatar Stefan Countryman
Browse files

add working Portfile

parent 914c9045
(c) Stefan Countryman, 2019
# Instructions on editing Portfiles for MacPorts
- When updating version numbers for this module:
- Make sure that a tag exists in the git repository for the new version.
- Regenerate the rmd160 and sha256 hashes for the distribution file (the
tarball) using:
- `openssl dgst -rmd160 $DISTFILENAME`
- `openssl dgst -sha256 $DISTFILENAME`
- `ls -nl $DISTFILENAME | awk '{print $5}'`
- Make sure that all dependencies are compatible with the python versions you
specify in python.versions.
- Update the default python version to the newest stable version when possible
- Note that the preferred homepage and master_site might change if the
maintainer changes/project switches hands
# Testing a Portfile locally
Instructions taken from
[the MacPorts documentation](
1. Since this is a python port, MacPorts expects to find the portfile in
`${ARBITRARY_PREFIX}/python/${name}/Portfile` where `${name}` is the name of the
port. So, to test, copy all your local Portfiles to directories following
this pattern. For example, with username `Stefan`, local port repository in
`~/dev/local-ports/`, and port name `py-gpstime`, you would copy the
portfile to `/Users/Stefan/dev/local-ports/python/py-gpstime/Portfile`.
2. Insert the path to the local ports repository into
`/opt/local/etc/macports/sources.conf` by adding the line
`file:///Users/Stefan/dev/local-ports` (preferably ahead of the other sources
3. Use portindex in the local repository's directory to create or update the
index of the ports in your local repository:
cd ~/dev/local-ports
4. Try searching for and installing the new port as you ordinarily would, e.g.
`port search py-gpstime`.
# -*- 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
PortSystem 1.0
PortGroup python 1.0
name py-gpstime
version 0.3.2
platforms darwin
supported_archs noarch
license GPL-3
python.rootname gpstime
description GPS-aware datetime module with leap-second fetching \
long_description This package provides a gpstime package, including a \
gpstime subclass of the built-in datetime class with the \
addition of GPS access and conversion methods. Leap \
second data is provided by the ietf_leap_seconds module \
that helps automatically maintain a local copy of the \
IETF leap second list: \ \
A command-line GPS data conversion utility that uses the \
gpstime module is also included. It is a rough \
work-alike to tconvert.
distname ${python.rootname}-${version}
extract.suffix .tar.gz
checksums rmd160 d62957cd15570ce24e5e17d5fe6d587777698809 \
sha256 b303807ba1e6a93f1ee1d47f36c014f2580348dd5045dd0cb28c1a59a0d700aa \
size 23900
python.versions 35 36
python.default_version 36
if {${name} ne ${subport}} {
livecheck.type none
} else { ${python.rootname}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment