[68175] trunk/dports/python
Ryan Schmidt
ryandesign at macports.org
Fri May 28 11:56:02 PDT 2010
On May 28, 2010, at 11:46, phw at macports.org wrote:
> Revision: 68175
> http://trac.macports.org/changeset/68175
> Author: phw at macports.org
> Date: 2010-05-28 09:46:31 -0700 (Fri, 28 May 2010)
> Log Message:
> -----------
> New port: py27-rgm3800py - Access Royaltek RGM-3800 and compatible GPS datalogger
> +long_description With this command line utility you can:\
> + * Dump tracks off your RGM-3800 GPS datalogger in NMEA and GPX format.\
> + * List tracks with information.\
> + * Configure logging format and interval.\
> + * Check memory usage.\
> + * Erase all tracks.
Note that "port info" will not format this into multiple lines like this; it will run all the lines together:
$ port info
py27-rgm3800py @25 (python)
Description: With this command line utility you can: * Dump
tracks off your RGM-3800 GPS datalogger in NMEA
and GPX format. * List tracks with information. *
Configure logging format and interval. * Check
memory usage. * Erase all tracks.
Homepage: http://code.google.com/p/rgm3800py
Library Dependencies: python27
Platforms: darwin
License: unknown
Maintainers: phw at macports.org, openmaintainer at macports.org
> +distfiles rgm3800-rev${version}.py
This is a text file (a python script), but you haven't told MacPorts not to treat it as a gzip file as it does by default, therefore we get this error from the extract phase:
---> Extracting py27-rgm3800py
DEBUG: Executing org.macports.extract (py27-rgm3800py)
---> Extracting rgm3800-rev25.py
DEBUG: setting option extract.args to /opt/local/var/macports/distfiles/python/rgm3800-rev25.py
DEBUG: Environment: MACOSX_DEPLOYMENT_TARGET='10.6'
DEBUG: Assembled command: 'cd "/opt/local/var/macports/build/_Users_rschmidt_macports_dports_python_py27-rgm3800py/work" && /usr/bin/gzip -dc /opt/local/var/macports/distfiles/python/rgm3800-rev25.py | /usr/bin/gnutar --no-same-owner -xf -'
gzip: /opt/local/var/macports/distfiles/python/rgm3800-rev25.py: not in gzip format
For some reason (bug?) MacPorts doesn't consider this a fatal error and continues anyway, but you should not assume this bug will always exist and should fix the portfile by telling MacPorts not to attempt to extract this file. To do this, I recommend clearing the extract.only variable by writing a line that reads only:
extract.only
> +post-extract {
> + xinstall -m 755 -d ${workpath}/${distname}
> + file rename ${distpath}/${distfiles} ${workpath}/${distname}/${distname}.py
Your portfile should probably never cause files to be removed from ${distpath} like this; this means if I ever need to reinstall the port, the distfile has to be fetched again; we don't want that. Instead, use file copy or xinstall.
> + file copy ${portpath}/${filesdir}/ANNOUNCE ${workpath}/${distname}/
> + file copy ${portpath}/${filesdir}/CHANGES ${workpath}/${distname}/
> + file copy ${portpath}/${filesdir}/README ${workpath}/${distname}/
> + file copy ${portpath}/${filesdir}/TODO ${workpath}/${distname}/
> + file copy ${portpath}/${filesdir}/setup.py ${workpath}/${distname}/
Note that "${workpath}/${distname}" is more simply expressed as "${worksrcpath}" and "${portpath}/${filesdir}" is more simply expressed as "${filespath}". Also you can combine all those "file copy" commands into a single xinstall command, e.g.:
xinstall -m 644 -W ${filespath} ANNOUNCE CHANGES README TODO setup.py ${worksrcpath}
> Added: trunk/dports/python/py27-rgm3800py/files/setup.py
> + license="""GNU General Public License""",
> + version = "3",
Then you should add the line "license GPL-3" to the portfile.
More information about the macports-dev
mailing list