summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--python2.7/Makefile41
-rw-r--r--python2.7/developer-python.p5m134
-rwxr-xr-xpython2.7/developer-python.p5m.gen3
-rwxr-xr-xpython2.7/python.p5m.gen28
4 files changed, 67 insertions, 139 deletions
diff --git a/python2.7/Makefile b/python2.7/Makefile
index c172221..801d7f7 100644
--- a/python2.7/Makefile
+++ b/python2.7/Makefile
@@ -11,7 +11,7 @@ $(eval $(call add-variant,default))
summary := an interpreted, interactive, object-oriented, extensible programming language
license := Python License
-license-file := LICENSE
+license-file := $(sourcedir)/LICENSE
name := Python
pyver := 2.7
@@ -95,7 +95,7 @@ MIN_BUILTINS := $(shell awk '/^ / && $$2 == "builtin" { print $$1 }' \
debian/PVER-minimal.README.Debian.in)
MIN_PACKAGES := $(shell awk '/^ / && $$2 == "package" { print $$1 }' \
debian/PVER-minimal.README.Debian.in)
-MIN_ENCODINGS := $(foreach i, \
+MIN_ENCODINGS = $(foreach i, \
$(filter-out \
big5% bz2% cp932.py cp949.py cp950.py euc_% \
gb% iso2022% johab.py shift_jis% , \
@@ -118,6 +118,7 @@ scriptdir := usr/lib/python$(VER)
d_min := work/proto/python-minimal
d_lib := work/proto/libpython
d_dev := work/proto/dev-python
+d_base := work/proto/python
libdir := usr/lib$(lib-suffix.$(bits))
python-minimal.p5m: env += proto=$(d_min)
@@ -125,6 +126,8 @@ python-minimal.p5m: env += proto=$(d_min)
install-stamp: postinst-stamp
postinst-stamp: install-default-stamp
+ gfind $(d) -name '*.py[co]' | gxargs -r rm -f
+ gfind $(d)/usr/lib/python$(VER) -name '*_failed*.so' | gxargs -r rm -f
mv $(d)/$(scriptdir)/_sysconfigdata.py \
$(d)/$(scriptdir)/_sysconfigdata_nd.py
cp $(b)/libpython$(pyver).a \
@@ -162,7 +165,7 @@ postinst-stamp: install-default-stamp
$(d)/usr/bin/2to3-$(VER) \
> $(d)/usr/share/man/man1/2to3-$(VER).1
- : # install minimal set:
+ : # install runtime/python-minimal:
mkdir -p $(d_min)
cd $(d_min) && mkdir -p \
etc/$(PVER) \
@@ -171,6 +174,9 @@ postinst-stamp: install-default-stamp
usr/share/man/man1 \
$(scriptdir)/lib-dynload \
$(scriptdir)/config
+ cp sitecustomize.py $(d_min)/etc/python$(pyver)/sitecustomize.py
+ ln -sf /etc/python$(pyver)/sitecustomize.py \
+ $(d_min)/usr/lib/python$(pyver)/sitecustomize.py
$(movefiles) -s $(d) -d$(d_min) \
usr/bin/python$(VER) \
usr/share/man/man1/python$(VER).1 \
@@ -185,14 +191,14 @@ postinst-stamp: install-default-stamp
&& echo $(scriptdir)/lib-dynload/$$i.so; \
done; true)
- # install libpython:
+ : # install libpython:
mkdir -p $(d_lib)
$(movefiles) -s $(d) -d $(d_lib) \
$(libdir)/libpython$(pyver).so.1.0
ln -sf libpython$(pyver).so.1.0 \
$(d_lib)/$(libdir)/libpython$(pyver).so.1
- # install developer/python:
+ : # install developer/python:
mkdir -p $(d_dev)
mkdir -p $(d_dev)/usr/share/man/man1
$(movefiles) -s $(d) -d $(d_dev) \
@@ -205,6 +211,31 @@ postinst-stamp: install-default-stamp
cp -p debian/python-config.1 \
$(d_dev)/usr/share/man/man1/python$(VER)-config.1
+ : # No IDLE:
+ rm -rf $(d)/usr/bin/idle* \
+ $(d)/usr/lib/python$(VER)/idlelib
+
+ : # No Tk:
+ rm -rf \
+ $(d)/usr/lib/python$(VER)/lib-dynload/_tkinter.so \
+ $(d)/usr/lib/python$(VER)/lib-tk
+
+ : # install runtime/python:
+ mkdir -p $(d_base)
+ $(movefiles) -s $(d) -d $(d_base) \
+ $(scriptdir)/test/{regrtest.py,test_support.py,__init__.py,pystone.py}
+ rm -rf $(d)/$(scriptdir)/test
+ rm -rf $(d)/$(scriptdir)/ctypes/test
+ rm -rf $(d)/$(scriptdir)/bsddb/test
+ rm -rf $(d)/$(scriptdir)/email/test
+ rm -rf $(d)/$(scriptdir)/json/tests
+ rm -rf $(d)/$(scriptdir)/sqlite3/test
+ rm -rf $(d)/$(scriptdir)/distutils/tests
+ rm -rf $(d)/$(scriptdir)/lib2to3/tests
+ rm -rf $(d)/$(scriptdir)/unittest/test
+ rm -rf $(d)/$(scriptdir)/lib-tk/test
+ $(movefiles) -s $(d) -d $(d_base) \
+ $(scriptdir)
touch $@
diff --git a/python2.7/developer-python.p5m b/python2.7/developer-python.p5m
deleted file mode 100644
index b03800f..0000000
--- a/python2.7/developer-python.p5m
+++ /dev/null
@@ -1,134 +0,0 @@
-# This file was generated by "developer-python.p5m.gen"
-set name=pkg.fmri value=pkg:/developer/python$(pyver)@$(ips-version)
-set name=pkg.summary value="Header files and a static library for Python (version $(pyver))"
-set name=info.upstream-url value="$(home)"
-set name=info.source-url value="$(download)"
-
-license $(license-file) license="$(license)"
-
-depend fmri=pkg:/library/openssl type=require
-depend fmri=pkg:/library/libexpat type=require
-
-depend fmri=pkg:/library/libpython$(pyver)@$(ips-version) type=require
-depend fmri=pkg:/library/libpython$(pyver)@$(ips-version) type=incorporate
-
-depend fmri=pkg:/runtime/python$(pyver)@$(ips-version) type=require
-depend fmri=pkg:/runtime/python$(pyver)@$(ips-version) type=incorporate
-
-dir path=usr
-dir path=usr/share
-dir path=usr/share/man
-dir path=usr/share/man/man1
-dir path=usr/lib
-dir path=usr/lib/amd64
-dir path=usr/lib/amd64/pkgconfig
-dir path=usr/lib/python2.7
-dir path=usr/lib/python2.7/config
-dir path=usr/bin
-dir path=usr/include
-dir path=usr/include/python2.7
-file work/proto/dev-python/usr/share/man/man1/python2.7-config.1 path=usr/share/man/man1/python2.7-config.1
-file work/proto/dev-python/usr/lib/amd64/libpython2.7.a path=usr/lib/amd64/libpython2.7.a
-file work/proto/dev-python/usr/lib/amd64/pkgconfig/python-2.7.pc path=usr/lib/amd64/pkgconfig/python-2.7.pc
-file work/proto/dev-python/usr/lib/python2.7/config/python.o path=usr/lib/python2.7/config/python.o
-file work/proto/dev-python/usr/lib/python2.7/config/makesetup path=usr/lib/python2.7/config/makesetup
-file work/proto/dev-python/usr/lib/python2.7/config/config.c path=usr/lib/python2.7/config/config.c
-file work/proto/dev-python/usr/lib/python2.7/config/Setup.local path=usr/lib/python2.7/config/Setup.local
-file work/proto/dev-python/usr/lib/python2.7/config/Setup.config path=usr/lib/python2.7/config/Setup.config
-file work/proto/dev-python/usr/lib/python2.7/config/config.c.in path=usr/lib/python2.7/config/config.c.in
-file work/proto/dev-python/usr/lib/python2.7/config/install-sh path=usr/lib/python2.7/config/install-sh
-file work/proto/dev-python/usr/lib/python2.7/config/Setup path=usr/lib/python2.7/config/Setup
-file work/proto/dev-python/usr/bin/python2.7-config path=usr/bin/python2.7-config
-file work/proto/dev-python/usr/include/python2.7/listobject.h path=usr/include/python2.7/listobject.h
-file work/proto/dev-python/usr/include/python2.7/codecs.h path=usr/include/python2.7/codecs.h
-file work/proto/dev-python/usr/include/python2.7/token.h path=usr/include/python2.7/token.h
-file work/proto/dev-python/usr/include/python2.7/bytes_methods.h path=usr/include/python2.7/bytes_methods.h
-file work/proto/dev-python/usr/include/python2.7/abstract.h path=usr/include/python2.7/abstract.h
-file work/proto/dev-python/usr/include/python2.7/pymacconfig.h path=usr/include/python2.7/pymacconfig.h
-file work/proto/dev-python/usr/include/python2.7/code.h path=usr/include/python2.7/code.h
-file work/proto/dev-python/usr/include/python2.7/grammar.h path=usr/include/python2.7/grammar.h
-file work/proto/dev-python/usr/include/python2.7/pymem.h path=usr/include/python2.7/pymem.h
-file work/proto/dev-python/usr/include/python2.7/objimpl.h path=usr/include/python2.7/objimpl.h
-file work/proto/dev-python/usr/include/python2.7/osdefs.h path=usr/include/python2.7/osdefs.h
-file work/proto/dev-python/usr/include/python2.7/pydebug.h path=usr/include/python2.7/pydebug.h
-file work/proto/dev-python/usr/include/python2.7/descrobject.h path=usr/include/python2.7/descrobject.h
-file work/proto/dev-python/usr/include/python2.7/stringobject.h path=usr/include/python2.7/stringobject.h
-file work/proto/dev-python/usr/include/python2.7/metagrammar.h path=usr/include/python2.7/metagrammar.h
-file work/proto/dev-python/usr/include/python2.7/warnings.h path=usr/include/python2.7/warnings.h
-file work/proto/dev-python/usr/include/python2.7/eval.h path=usr/include/python2.7/eval.h
-file work/proto/dev-python/usr/include/python2.7/pystrcmp.h path=usr/include/python2.7/pystrcmp.h
-file work/proto/dev-python/usr/include/python2.7/pyport.h path=usr/include/python2.7/pyport.h
-file work/proto/dev-python/usr/include/python2.7/bitset.h path=usr/include/python2.7/bitset.h
-file work/proto/dev-python/usr/include/python2.7/pygetopt.h path=usr/include/python2.7/pygetopt.h
-file work/proto/dev-python/usr/include/python2.7/pymath.h path=usr/include/python2.7/pymath.h
-file work/proto/dev-python/usr/include/python2.7/pyerrors.h path=usr/include/python2.7/pyerrors.h
-file work/proto/dev-python/usr/include/python2.7/symtable.h path=usr/include/python2.7/symtable.h
-file work/proto/dev-python/usr/include/python2.7/node.h path=usr/include/python2.7/node.h
-file work/proto/dev-python/usr/include/python2.7/bytearrayobject.h path=usr/include/python2.7/bytearrayobject.h
-file work/proto/dev-python/usr/include/python2.7/funcobject.h path=usr/include/python2.7/funcobject.h
-file work/proto/dev-python/usr/include/python2.7/marshal.h path=usr/include/python2.7/marshal.h
-file work/proto/dev-python/usr/include/python2.7/iterobject.h path=usr/include/python2.7/iterobject.h
-file work/proto/dev-python/usr/include/python2.7/pyarena.h path=usr/include/python2.7/pyarena.h
-file work/proto/dev-python/usr/include/python2.7/classobject.h path=usr/include/python2.7/classobject.h
-file work/proto/dev-python/usr/include/python2.7/errcode.h path=usr/include/python2.7/errcode.h
-file work/proto/dev-python/usr/include/python2.7/longobject.h path=usr/include/python2.7/longobject.h
-file work/proto/dev-python/usr/include/python2.7/sliceobject.h path=usr/include/python2.7/sliceobject.h
-file work/proto/dev-python/usr/include/python2.7/py_curses.h path=usr/include/python2.7/py_curses.h
-file work/proto/dev-python/usr/include/python2.7/pycapsule.h path=usr/include/python2.7/pycapsule.h
-file work/proto/dev-python/usr/include/python2.7/traceback.h path=usr/include/python2.7/traceback.h
-file work/proto/dev-python/usr/include/python2.7/structmember.h path=usr/include/python2.7/structmember.h
-file work/proto/dev-python/usr/include/python2.7/opcode.h path=usr/include/python2.7/opcode.h
-file work/proto/dev-python/usr/include/python2.7/enumobject.h path=usr/include/python2.7/enumobject.h
-file work/proto/dev-python/usr/include/python2.7/asdl.h path=usr/include/python2.7/asdl.h
-file work/proto/dev-python/usr/include/python2.7/bufferobject.h path=usr/include/python2.7/bufferobject.h
-file work/proto/dev-python/usr/include/python2.7/moduleobject.h path=usr/include/python2.7/moduleobject.h
-file work/proto/dev-python/usr/include/python2.7/cobject.h path=usr/include/python2.7/cobject.h
-file work/proto/dev-python/usr/include/python2.7/structseq.h path=usr/include/python2.7/structseq.h
-file work/proto/dev-python/usr/include/python2.7/pythread.h path=usr/include/python2.7/pythread.h
-file work/proto/dev-python/usr/include/python2.7/methodobject.h path=usr/include/python2.7/methodobject.h
-file work/proto/dev-python/usr/include/python2.7/Python.h path=usr/include/python2.7/Python.h
-file work/proto/dev-python/usr/include/python2.7/dtoa.h path=usr/include/python2.7/dtoa.h
-file work/proto/dev-python/usr/include/python2.7/rangeobject.h path=usr/include/python2.7/rangeobject.h
-file work/proto/dev-python/usr/include/python2.7/graminit.h path=usr/include/python2.7/graminit.h
-file work/proto/dev-python/usr/include/python2.7/memoryobject.h path=usr/include/python2.7/memoryobject.h
-file work/proto/dev-python/usr/include/python2.7/pgen.h path=usr/include/python2.7/pgen.h
-file work/proto/dev-python/usr/include/python2.7/setobject.h path=usr/include/python2.7/setobject.h
-file work/proto/dev-python/usr/include/python2.7/sysmodule.h path=usr/include/python2.7/sysmodule.h
-file work/proto/dev-python/usr/include/python2.7/tupleobject.h path=usr/include/python2.7/tupleobject.h
-file work/proto/dev-python/usr/include/python2.7/frameobject.h path=usr/include/python2.7/frameobject.h
-file work/proto/dev-python/usr/include/python2.7/bytesobject.h path=usr/include/python2.7/bytesobject.h
-file work/proto/dev-python/usr/include/python2.7/compile.h path=usr/include/python2.7/compile.h
-file work/proto/dev-python/usr/include/python2.7/intobject.h path=usr/include/python2.7/intobject.h
-file work/proto/dev-python/usr/include/python2.7/cellobject.h path=usr/include/python2.7/cellobject.h
-file work/proto/dev-python/usr/include/python2.7/pyexpat.h path=usr/include/python2.7/pyexpat.h
-file work/proto/dev-python/usr/include/python2.7/object.h path=usr/include/python2.7/object.h
-file work/proto/dev-python/usr/include/python2.7/import.h path=usr/include/python2.7/import.h
-file work/proto/dev-python/usr/include/python2.7/ucnhash.h path=usr/include/python2.7/ucnhash.h
-file work/proto/dev-python/usr/include/python2.7/modsupport.h path=usr/include/python2.7/modsupport.h
-file work/proto/dev-python/usr/include/python2.7/ast.h path=usr/include/python2.7/ast.h
-file work/proto/dev-python/usr/include/python2.7/fileobject.h path=usr/include/python2.7/fileobject.h
-file work/proto/dev-python/usr/include/python2.7/floatobject.h path=usr/include/python2.7/floatobject.h
-file work/proto/dev-python/usr/include/python2.7/cStringIO.h path=usr/include/python2.7/cStringIO.h
-file work/proto/dev-python/usr/include/python2.7/patchlevel.h path=usr/include/python2.7/patchlevel.h
-file work/proto/dev-python/usr/include/python2.7/ceval.h path=usr/include/python2.7/ceval.h
-file work/proto/dev-python/usr/include/python2.7/pymactoolbox.h path=usr/include/python2.7/pymactoolbox.h
-file work/proto/dev-python/usr/include/python2.7/genobject.h path=usr/include/python2.7/genobject.h
-file work/proto/dev-python/usr/include/python2.7/datetime.h path=usr/include/python2.7/datetime.h
-file work/proto/dev-python/usr/include/python2.7/weakrefobject.h path=usr/include/python2.7/weakrefobject.h
-file work/proto/dev-python/usr/include/python2.7/longintrepr.h path=usr/include/python2.7/longintrepr.h
-file work/proto/dev-python/usr/include/python2.7/dictobject.h path=usr/include/python2.7/dictobject.h
-file work/proto/dev-python/usr/include/python2.7/complexobject.h path=usr/include/python2.7/complexobject.h
-file work/proto/dev-python/usr/include/python2.7/Python-ast.h path=usr/include/python2.7/Python-ast.h
-file work/proto/dev-python/usr/include/python2.7/pystate.h path=usr/include/python2.7/pystate.h
-file work/proto/dev-python/usr/include/python2.7/pgenheaders.h path=usr/include/python2.7/pgenheaders.h
-file work/proto/dev-python/usr/include/python2.7/pyfpe.h path=usr/include/python2.7/pyfpe.h
-file work/proto/dev-python/usr/include/python2.7/parsetok.h path=usr/include/python2.7/parsetok.h
-file work/proto/dev-python/usr/include/python2.7/timefuncs.h path=usr/include/python2.7/timefuncs.h
-file work/proto/dev-python/usr/include/python2.7/unicodeobject.h path=usr/include/python2.7/unicodeobject.h
-file work/proto/dev-python/usr/include/python2.7/pyctype.h path=usr/include/python2.7/pyctype.h
-file work/proto/dev-python/usr/include/python2.7/pythonrun.h path=usr/include/python2.7/pythonrun.h
-file work/proto/dev-python/usr/include/python2.7/boolobject.h path=usr/include/python2.7/boolobject.h
-file work/proto/dev-python/usr/include/python2.7/pystrtod.h path=usr/include/python2.7/pystrtod.h
-file work/proto/dev-python/usr/include/python2.7/intrcheck.h path=usr/include/python2.7/intrcheck.h
-link path=usr/lib/amd64/libpython2.7.so target=libpython2.7.so.1.0
-link path=usr/lib/python2.7/config/libpython2.7.a target=../../amd64/libpython2.7.a
diff --git a/python2.7/developer-python.p5m.gen b/python2.7/developer-python.p5m.gen
index 142a47e..32dd46a 100755
--- a/python2.7/developer-python.p5m.gen
+++ b/python2.7/developer-python.p5m.gen
@@ -24,6 +24,9 @@ depend fmri=pkg:/library/libpython$(pyver)@$(ips-version) type=incorporate
depend fmri=pkg:/runtime/python$(pyver)@$(ips-version) type=require
depend fmri=pkg:/runtime/python$(pyver)@$(ips-version) type=incorporate
+<transform file path=.*\.py -> add pkg.depend.bypass-generate .*>
+<transform file path=usr/bin/python.*-config -> add pkg.depend.bypass-generate .*>
+
META
/usr/share/cibs/scripts/make-payload $proto >> $tmp
diff --git a/python2.7/python.p5m.gen b/python2.7/python.p5m.gen
new file mode 100755
index 0000000..68c16ea
--- /dev/null
+++ b/python2.7/python.p5m.gen
@@ -0,0 +1,28 @@
+#!/bin/sh
+
+set -e
+set -u
+
+tmp=/tmp/cibs-python.$$
+
+proto=${proto:-work/proto/python}
+
+cat <<'META' > $tmp
+set name=pkg.fmri value=pkg:/runtime/python$(pyver)@$(ips-version)
+set name=pkg.summary value="Minimal subset of the Python language (version $(pyver))"
+set name=info.upstream-url value="$(home)"
+set name=info.source-url value="$(download)"
+
+license $(license-file) license="$(license)"
+
+depend fmri=pkg:/runtime/python$(pyver)-minimal@$(ips-version) type=require
+depend fmri=pkg:/runtime/python$(pyver)-minimal@$(ips-version) type=incorporate
+
+<transform file path=.*\.py -> add pkg.depend.bypass-generate .*>
+
+META
+
+/usr/share/cibs/scripts/make-payload $proto >> $tmp
+cat $tmp
+rm $tmp
+