Annotation of pkgsrc/lang/python/distutils.mk, revision 1.2
1.2 ! obache 1: # $NetBSD: distutils.mk,v 1.1 2010/07/24 12:32:22 gdt Exp $
1.1 gdt 2: #
3: # Common logic for python distributions that use distutils.
4: #
5: .include "../../mk/bsd.fast.prefs.mk"
6:
7: .include "../../lang/python/pyversion.mk"
8:
9: # This file should be included to package python "distributions" which
10: # use distutils. See egg.mk for distributions that use setuptools and
11: # extensions.mk for ad hoc cases.
12:
13: # Some day, hoist the PYDISTUTILSPKG code in extension.mk to here,
14: # after all distutils-using packages use this.
15: PYDISTUTILSPKG= yes
16:
17: # We expect distutils to create an egg-info file if Python distutils
18: # can do so, and provide support for a PLIST entry that represents
19: # this norm and will work with all python versions. (If the package
20: # set PY_NO_EGG, respect that choice, but PLIST.eggfile is still set.)
21:
22: # Set the egg file basename.
23: EGG_NAME?= ${DISTNAME}
24:
25: PLIST_VARS+= eggfile
26: .if !empty(PYDISTUTILS_CREATES_EGGFILES:M[yY][eE][sS])
27: # Python distutils will create an eggfile.
28: PLIST.eggfile= yes
29: PY_NO_EGG?= no
30: .else
31: # Python distutils will not create an eggfile.
32: # (PLIST.eggfile being set to no is equivalent to being set to yes!)
33: PY_NO_EGG?= yes
34: .endif
35:
36: # Egg files have the version encoded, so generalize in PLIST, and provide
37: # our conditional.
38: PLIST_SUBST+= EGG_FILE=${EGG_NAME}-py${PYVERSSUFFIX}.egg-info
1.2 ! obache 39: # PYSITELIB is already de-expanded
! 40: PRINT_PLIST_AWK+= { gsub("[$$]{PYSITELIB}/${EGG_NAME}-py${PYVERSSUFFIX}.egg-info", \
1.1 gdt 41: "$${PLIST.eggfile}$${PYSITELIB}/$${EGG_FILE}") }
42:
43: .include "../../lang/python/extension.mk"
CVSweb <webmaster@jp.NetBSD.org>