Annotation of pkgsrc/lang/python/extension.mk, revision 1.27

1.27    ! gdt         1: # $NetBSD: extension.mk,v 1.26 2010/07/21 11:29:10 wiz Exp $
1.1       jlam        2: 
                      3: .include "../../lang/python/pyversion.mk"
                      4: 
1.27    ! gdt         5: # Packages that are a non-egg distutils extension should set
        !             6: # PYDISTUTILSPKG=YES and include this mk file.
        !             7: 
        !             8: # This mk fragment is included to handle packages that create
        !             9: # extensions to python, which by definition are those that place files
        !            10: # in ${PYSITELIB}.  Extensions can be implemented via setuptools as
        !            11: # eggs (see egg.mk), via distutils (confusing, with an egg-info file,
        !            12: # even though they are not eggs), or via more ad hocs methods.
        !            13: 
1.1       jlam       14: .if defined(PYDISTUTILSPKG)
1.15      joerg      15: .include "../../mk/bsd.prefs.mk"
                     16: 
1.1       jlam       17: PYSETUP?=              setup.py
1.25      wiz        18: PYSETUPBUILDTARGET?=   build
1.1       jlam       19: PYSETUPBUILDARGS?=     #empty
1.26      wiz        20: PYSETUPARGS?=          #empty
1.1       jlam       21: PYSETUPINSTALLARGS?=   #empty
1.5       recht      22: PYSETUPOPTARGS?=       -c -O1
1.16      joerg      23: _PYSETUPINSTALLARGS=   ${PYSETUPINSTALLARGS} ${PYSETUPOPTARGS} ${_PYSETUPTOOLSINSTALLARGS}
1.15      joerg      24: .if ${_USE_DESTDIR} != "no"
                     25: _PYSETUPINSTALLARGS+=  --root=${DESTDIR:Q}
                     26: .endif
1.1       jlam       27: PY_PATCHPLIST?=                yes
1.3       jdolecek   28: PYSETUPSUBDIR?=                #empty
1.1       jlam       29: 
                     30: do-build:
1.3       jdolecek   31:        (cd ${WRKSRC}/${PYSETUPSUBDIR} && ${SETENV} ${MAKE_ENV} ${PYTHONBIN} \
1.26      wiz        32:         ${PYSETUP} ${PYSETUPARGS} ${PYSETUPBUILDTARGET} ${PYSETUPBUILDARGS})
1.1       jlam       33: 
                     34: do-install:
1.18      tnn        35:        (cd ${WRKSRC}/${PYSETUPSUBDIR} && ${SETENV} ${INSTALL_ENV} ${MAKE_ENV} \
1.26      wiz        36:         ${PYTHONBIN} ${PYSETUP} ${PYSETUPARGS} "install" ${_PYSETUPINSTALLARGS})
1.1       jlam       37: .endif
                     38: 
1.27    ! gdt        39: # XXX This suppress the installation of the egg-info file (and
        !            40: # therefore its inclusion in the package).  Python practice is be to
        !            41: # use these files to let 'require' verify that python distributions
        !            42: # are present.
1.19      abs        43: PY_NO_EGG?=            yes
                     44: .if !empty(PY_NO_EGG:M[yY][eE][sS])
                     45: # see python25/patches/patch-av
                     46: INSTALL_ENV+=          PKGSRC_PYTHON_NO_EGG=defined
                     47: .endif
                     48: 
1.1       jlam       49: .if defined(PY_PATCHPLIST)
                     50: PLIST_SUBST+=  PYINC=${PYINC} PYSITELIB=${PYSITELIB}
                     51: .endif

CVSweb <webmaster@jp.NetBSD.org>