aboutsummaryrefslogtreecommitdiffstats
path: root/textproc/py-asv/Makefile
blob: e947516b43f3b7cd18a36d89729bc1005a018e0c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# Created by: Johann Visagie <johann@egenetics.com>
# $FreeBSD$

PORTNAME=   asv
PORTVERSION=    0.5
CATEGORIES= textproc python
MASTER_SITES=   http://tratt.net/laurie/src/python/asv/releases/
PKGNAMEPREFIX=  ${PYTHON_PKGNAMEPREFIX}

MAINTAINER= ports@FreeBSD.org
COMMENT=    Extensible Python module to parse simple text file formats like CSV

LICENSE=    BSD3CLAUSE
LICENSE_FILE=   ${WRKSRC}/LICENSE

USES=       python
NO_ARCH=    yes

PORTDOCS=   README THANKS
PORTEXAMPLES=   asv_example.py example_data.csv
PLIST_FILES=    bin/asv \
        %%PYTHON_SITELIBDIR%%/ASV.py \
        %%PYTHON_SITELIBDIR%%/ASV.pyc \
        %%PYTHON_SITELIBDIR%%/ASV.pyo

OPTIONS_DEFINE= DOCS EXAMPLES

do-build:
    @${PYTHON_CMD} ${PYTHON_LIBDIR}/compileall.py \
        -d ${PYTHONPREFIX_SITELIBDIR} \
        -f ${WRKSRC}
    @${PYTHON_CMD} -O ${PYTHON_LIBDIR}/compileall.py \
        -d ${PYTHONPREFIX_SITELIBDIR} \
        -f ${WRKSRC}

do-install:
    @printf '#!/bin/sh\n${PYTHON_CMD} ${PYTHONPREFIX_SITELIBDIR}/ASV.py "$$@"\n' \
        > ${WRKDIR}/asv.sh
    ${INSTALL_SCRIPT} ${WRKDIR}/asv.sh ${STAGEDIR}${PREFIX}/bin/asv
    @${MKDIR} ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}
    ${INSTALL_DATA} ${WRKSRC}/ASV.* ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}

do-install-DOCS-on:
    @${MKDIR} ${STAGEDIR}${DOCSDIR}
    ${INSTALL_DATA} ${PORTDOCS:S,^,${WRKSRC}/,} ${STAGEDIR}${DOCSDIR}

do-install-EXAMPLES-on:
    @${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
    ${INSTALL_DATA} ${PORTEXAMPLES:S,^,${WRKSRC}/,} ${STAGEDIR}${EXAMPLESDIR}

.include <bsd.port.mk>