clean up python packaging code.

- packages must not rely on stuff in package/ outside of their own directory
- python-package.mk is installed to $(STAGING_DIR)/mk
- python-package.mk must not be required at DUMP time


git-svn-id: svn://svn.openwrt.org/openwrt/packages@9387 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
nbd 2007-10-21 10:20:01 +00:00
parent 4781674f22
commit de6305e1d4
11 changed files with 183 additions and 124 deletions

View File

@ -17,16 +17,23 @@ PKG_SOURCE_URL:=http://www.egenix.com/files/python/
PKG_MD5SUM:=66841151728a06f92d0b8dd2ed317a29
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-base-$(PKG_VERSION)
PKG_BUILD_DEPENDS:=python
include $(INCLUDE_DIR)/package.mk
include ../python/python-package.mk
-include $(if $(DUMP),,$(STAGING_DIR)/mk/python-package.mk)
ifeq ($(DUMP)$(Build/Compile/PyMod),)
$(error Python packaging code not found.)
endif
define PyPackage/python-egenix-mx
TITLE:=Egenix mxBase
URL:=http://www.egenix.com/products/python/mxBase/
define Package/python-egenix-mx
SECTION:=lang
CATEGORY:=Languages
DEPENDS:=python-core
TITLE:=Egenix mxBase
URL:=http://www.egenix.com/products/python/mxBase/
endef
define PyPackage/python-egenix-mx/description
define Package/python-egenix-mx/description
This package contains a set of base packages from Egenix required by other
python packages.
endef
@ -88,3 +95,4 @@ define PyPackage/python-egenix-mx/install
endef
$(eval $(call PyPackage,python-egenix-mx))
$(eval $(call BuildPackage,python-egenix-mx))

View File

@ -5,7 +5,7 @@
# See /LICENSE for more information.
#
# $Id$
include $(TOPDIR)/rules.mk
PKG_NAME:=kid
@ -15,16 +15,23 @@ PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://www.kid-templating.org/dist/0.9.6/dist
PKG_MD5SUM:=31e7156698a6f214b4067afb9e13728f
PKG_BUILD_DEPENDS:=python
include $(INCLUDE_DIR)/package.mk
include ../python/python-package.mk
-include $(if $(DUMP),,$(STAGING_DIR)/mk/python-package.mk)
ifeq ($(DUMP)$(Build/Compile/PyMod),)
$(error Python packaging code not found.)
endif
define PyPackage/python-kid
TITLE:=XML-based Templating
URL:=http://www.kid-templating.org/
define Package/python-kid
SECTION:=lang
CATEGORY:=Languages
DEPENDS:=python-core
TITLE:=XML-based Templating
URL:=http://www.kid-templating.org/
endef
define PyPackage/python-kid/description
define Package/python-kid/description
Kid is a simple template language for XML based vocabularies written in
Python.
endef
@ -41,3 +48,4 @@ define Build/Compile
endef
$(eval $(call PyPackage,python-kid))
$(eval $(call BuildPackage,python-kid))

View File

@ -15,17 +15,23 @@ PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://www.initd.org/pub/software/psycopg/
PKG_MD5SUM:=a31f79f68d6d32898d6f24e11369a106
PKG_BUILD_DEPENDS:=python
include $(INCLUDE_DIR)/package.mk
include ../python/python-package.mk
-include $(if $(DUMP),,$(STAGING_DIR)/mk/python-package.mk)
ifeq ($(DUMP)$(Build/Compile/PyMod),)
$(error Python packaging code not found.)
endif
define PyPackage/python-psycopg
TITLE:=PostgreSQL database adapter for Python
URL:=http://www.initd.org/
DEPENDS+= +libpq +python-egenix-mx
define Package/python-psycopg
SECTION:=lang
CATEGORY:=Languages
TITLE:=PostgreSQL database adapter for Python
URL:=http://www.initd.org/
DEPENDS:=python-core +libpq +python-egenix-mx
endef
define PyPackage/python-psycopg/description
define Package/python-psycopg/description
This package contains is a PostgreSQL database adapter for the Python
programming language.
endef
@ -47,3 +53,4 @@ define PyPackage/python-psycopg/install
endef
$(eval $(call PyPackage,python-psycopg))
$(eval $(call BuildPackage,python-psycopg))

View File

@ -15,14 +15,20 @@ PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://pyevent.googlecode.com/files/
PKG_MD5SUM:=584912c92d08bf005283fb29a47a6e4d
PKG_BUILD_DEPENDS:=python
include $(INCLUDE_DIR)/package.mk
include ../python/python-package.mk
-include $(if $(DUMP),,$(STAGING_DIR)/mk/python-package.mk)
ifeq ($(DUMP)$(Build/Compile/PyMod),)
$(error Python packaging code not found.)
endif
define PyPackage/python-event
TITLE:=Python interface to libevent
URL:=http://code.google.com/p/pyevent/
DEPENDS+= +libevent
define Package/python-event
SECTION:=lang
CATEGORY:=Languages
TITLE:=Python interface to libevent
URL:=http://code.google.com/p/pyevent/
DEPENDS:=python-core +libevent
endef
define PyPackage/python-event/filespec
@ -37,3 +43,4 @@ define Build/Compile
endef
$(eval $(call PyPackage,python-event))
$(eval $(call BuildPackage,python-event))

View File

@ -15,17 +15,23 @@ PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=@SF/mysql-python
PKG_MD5SUM:=532268f02870bea18c1d465e88afff30
PKG_BUILD_DEPENDS:=python
include $(INCLUDE_DIR)/package.mk
include ../python/python-package.mk
-include $(if $(DUMP),,$(STAGING_DIR)/mk/python-package.mk)
ifeq ($(DUMP)$(Build/Compile/PyMod),)
$(error Python packaging code not found.)
endif
define PyPackage/python-mysql
TITLE:=MySQL database adapter for Python
URL:=http://mysql-python.sourceforge.net/
DEPENDS+= +libmysqlclient
define Package/python-mysql
SECTION:=lang
CATEGORY:=Languages
TITLE:=MySQL database adapter for Python
URL:=http://mysql-python.sourceforge.net/
DEPENDS:=python-core +libmysqlclient
endef
define PyPackage/python-mysql/description
define Package/python-mysql/description
MySQLdb is an thread-compatible interface to the popular MySQL database
server that provides the Python database API.
endef
@ -43,3 +49,4 @@ define Build/Compile
endef
$(eval $(call PyPackage,python-mysql))
$(eval $(call BuildPackage,python-mysql))

View File

@ -15,14 +15,20 @@ PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://pypcap.googlecode.com/files
PKG_MD5SUM:=034c3cbbfa81aa19e8f685b767c65764
PKG_BUILD_DEPENDS:=python
include $(INCLUDE_DIR)/package.mk
include ../python/python-package.mk
-include $(if $(DUMP),,$(STAGING_DIR)/mk/python-package.mk)
ifeq ($(DUMP)$(Build/Compile/PyMod),)
$(error Python packaging code not found.)
endif
define PyPackage/python-pcap
TITLE:=Python interface to lipcap
URL:=http://code.google.com/p/pypcap/
DEPENDS+= +libpcap
define Package/python-pcap
SECTION:=lang
CATEGORY:=Languages
TITLE:=Python interface to lipcap
URL:=http://code.google.com/p/pypcap/
DEPENDS:=python-core +libpcap
endef
define PyPackage/python-pcap/filespec
@ -37,3 +43,4 @@ define Build/Compile
endef
$(eval $(call PyPackage,python-pcap))
$(eval $(call BuildPackage,python-pcap))

View File

@ -15,17 +15,21 @@ PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://initd.org/pub/software/pysqlite/releases/2.3/2.3.5/
PKG_MD5SUM:=b4a185e936848370fcc1a5b17755b641
PKG_BUILD_DEPENDS:=python
include $(INCLUDE_DIR)/package.mk
include ../python/python-package.mk
-include $(if $(DUMP),,$(STAGING_DIR)/mk/python-package.mk)
ifeq ($(DUMP)$(Build/Compile/PyMod),)
$(error Python packaging code not found.)
endif
define PyPackage/python-sqlite
define Package/python-sqlite
TITLE:=SQLite database adapter for Python
URL:=http://www.initd.org/tracker/pysqlite/wiki/pysqlite
DEPENDS+= +libsqlite3
DEPENDS:= +libsqlite3
endef
define PyPackage/python-sqlite/description
define Package/python-sqlite/description
This package contains an SQLite database adapter for the Python
programming language.
endef
@ -42,3 +46,4 @@ define Build/Compile
endef
$(eval $(call PyPackage,python-sqlite))
$(eval $(call BuildPackage,python-sqlite))

View File

@ -5,7 +5,7 @@
# See /LICENSE for more information.
#
# $Id$
include $(TOPDIR)/rules.mk
PKG_NAME:=python
@ -18,12 +18,12 @@ PKG_MD5SUM:=70084ffa561660f07de466c2c8c4842d
PKG_BUILD_DIR:=$(BUILD_DIR)/Python-$(PKG_VERSION)
PKG_BUILD_DEPENDS:=libexpat libopenssl zlib
PKG_BUILD_DEPENDS:=python libexpat libopenssl zlib
include $(INCLUDE_DIR)/package.mk
include ./python-package.mk
-include $(if $(DUMP),,./python-package.mk)
define PyPackage/python/Default
define Package/python/Default
SUBMENU:=Python
SECTION:=lang
CATEGORY:=Languages
@ -31,7 +31,7 @@ define PyPackage/python/Default
URL:=http://www.python.org/
endef
define PyPackage/python/Default/description
define Package/python/Default/description
Python is a dynamic object-oriented programming language that can be used
for many kinds of software development. It offers strong support for
integration with other languages and tools, comes with extensive standard
@ -40,45 +40,45 @@ define PyPackage/python/Default/description
the development of higher quality, more maintainable code.
endef
define PyPackage/python
$(call PyPackage/python/Default)
define Package/python
$(call Package/python/Default)
TITLE+= (full)
DEPENDS:= +libpthread +zlib
PROVIDES:=python-core
endef
define PyPackage/python/description
$(call PyPackage/python/Default/description)
define Package/python/description
$(call Package/python/Default/description)
.
This package contains the full Python install.
endef
define PyPackage/python-mini
$(call PyPackage/python/Default)
define Package/python-mini
$(call Package/python/Default)
TITLE+= (minimal)
DEPENDS:= +libpthread +zlib
PROVIDES:=python-core
endef
define PyPackage/python-mini/description
$(call PyPackage/python/Default/description)
define Package/python-mini/description
$(call Package/python/Default/description)
.
This package contains only a minimal Python install.
endef
define PyPackage/python-doc
$(call PyPackage/python/Default)
define Package/python-doc
$(call Package/python/Default)
TITLE:=Python interactive documentation
endef
define PyPackage/python-expat
$(call PyPackage/python/Default)
define Package/python-expat
$(call Package/python/Default)
TITLE:=Python support for expat
DEPENDS+= +libexpat
endef
define PyPackage/python-openssl
$(call PyPackage/python/Default)
define Package/python-openssl
$(call Package/python/Default)
TITLE:=Python support for OpenSSL
DEPENDS+= +libopenssl
endef
@ -135,6 +135,8 @@ define Build/Compile
endef
define Build/InstallDev
$(INSTALL_DIR) $(1)/mk
$(INSTALL_DATA) ./python-package.mk $(1)/mk/
mkdir -p $(1)/usr/bin
$(CP) $(PKG_BUILD_DIR)/hostpython $(1)/usr/bin/
ln -sf hostpython $(1)/usr/bin/python
@ -149,11 +151,12 @@ define Build/InstallDev
endef
define Build/UninstallDev
rm -rf $(STAGING_DIR)/usr/bin/hostpython \
$(STAGING_DIR)/usr/bin/python \
$(STAGING_DIR)/usr/include/python$(PYTHON_VERSION) \
$(STAGING_DIR)/usr/lib/python$(PYTHON_VERSION) \
$(STAGING_DIR)/usr/lib/libpython$(PYTHON_VERSION).a
rm -rf \
$(1)/usr/bin/hostpython \
$(1)/usr/bin/python \
$(1)/usr/include/python$(PYTHON_VERSION) \
$(1)/usr/lib/python$(PYTHON_VERSION) \
$(1)/usr/lib/libpython$(PYTHON_VERSION).a
endef
define PyPackage/python/filespec
@ -266,3 +269,9 @@ $(eval $(call PyPackage,python-doc))
$(eval $(call PyPackage,python-expat))
$(eval $(call PyPackage,python-openssl))
$(eval $(call BuildPackage,python))
$(eval $(call BuildPackage,python-mini))
$(eval $(call BuildPackage,python-doc))
$(eval $(call BuildPackage,python-expat))
$(eval $(call BuildPackage,python-openssl))

View File

@ -6,40 +6,18 @@
#
# $Id$
ifeq ($(DUMP),)
PYTHON_VERSION=2.5
PYTHON_VERSION=2.5
PYTHON_DIR:=$(STAGING_DIR)/usr
PYTHON_BIN_DIR:=$(PYTHON_DIR)/bin
PYTHON_INC_DIR:=$(PYTHON_DIR)/include/python$(PYTHON_VERSION)
PYTHON_LIB_DIR:=$(PYTHON_DIR)/lib/python$(PYTHON_VERSION)
PYTHON_DIR:=$(STAGING_DIR)/usr
PYTHON_BIN_DIR:=$(PYTHON_DIR)/bin
PYTHON_INC_DIR:=$(PYTHON_DIR)/include/python$(PYTHON_VERSION)
PYTHON_LIB_DIR:=$(PYTHON_DIR)/lib/python$(PYTHON_VERSION)
PYTHON:=$(PYTHON_BIN_DIR)/python
PYTHON:=$(PYTHON_BIN_DIR)/python
PYTHON_PKG_DIR:=/usr/lib/python$(PYTHON_VERSION)/site-packages
endif
PYTHON_PKG_DIR:=/usr/lib/python$(PYTHON_VERSION)/site-packages
define PyPackage
NAME:=$(1)
$(eval $(call PyPackage/$(1)))
define Package/$(1)
SUBMENU:=Python
TITLE:=$(TITLE)
SECTION:=lang
CATEGORY:=Languages
DEPENDS:=python-core
$(call PyPackage/$(1))
endef
ifdef PyPackage/$(1)/description
define Package/$(1)/description
$(call PyPackage/$(1)/description)
endef
endif
$(call shexport,PyPackage/$(1)/filespec)
define Package/$(1)/install
@ -70,8 +48,6 @@ $(call PyPackage/$(1)/description)
)
$(call PyPackage/$(1)/install,$$(1))
endef
$$(eval $$(call BuildPackage,$(1)))
endef
define Build/Compile/PyMod

View File

@ -17,76 +17,83 @@ PKG_SOURCE_URL:=http://tmrc.mit.edu/mirror/twisted/Twisted/2.5
PKG_MD5SUM:=56df2ae66db57932515a491c03bf514f
PKG_BUILD_DIR:=$(BUILD_DIR)/Twisted-$(PKG_VERSION)
PKG_BUILD_DEPENDS:=python
include $(INCLUDE_DIR)/package.mk
include ../python/python-package.mk
-include $(if $(DUMP),,$(STAGING_DIR)/mk/python-package.mk)
ifeq ($(DUMP)$(Build/Compile/PyMod),)
$(error Python packaging code not found.)
endif
define PyPackage/twisted/default
URL:=http://twistedmatrix.com/
define Package/twisted/default
SECTION:=lang
CATEGORY:=Languages
DEPENDS:=python-core
URL:=http://twistedmatrix.com/
endef
define PyPackage/twisted/default/description
define Package/twisted/default/description
Twisted is a networking engine written in Python, supporting numerous
protocols. It contains a web server, numerous chat clients, chat servers,
mail servers, and more.
endef
define PyPackage/twisted
$(call PyPackage/twisted/default)
TITLE:=Python networking engine
DEPENDS+= +zope-interface
define Package/twisted
$(call Package/twisted/default)
TITLE:=Python networking engine
DEPENDS+= +zope-interface
endef
define PyPackage/twisted-conch
$(call PyPackage/twisted/default)
define Package/twisted-conch
$(call Package/twisted/default)
TITLE:=Twisted - Conch
DEPENDS+= twisted
endef
define PyPackage/twisted-lore
$(call PyPackage/twisted/default)
define Package/twisted-lore
$(call Package/twisted/default)
TITLE:=Twisted - Lore
DEPENDS+= twisted
endef
define PyPackage/twisted-mail
$(call PyPackage/twisted/default)
define Package/twisted-mail
$(call Package/twisted/default)
TITLE:=Twisted - Mail
DEPENDS+= twisted
endef
define PyPackage/twisted-names
$(call PyPackage/twisted/default)
define Package/twisted-names
$(call Package/twisted/default)
TITLE:=Twisted - Names
DEPENDS+= twisted
endef
define PyPackage/twisted-news
$(call PyPackage/twisted/default)
define Package/twisted-news
$(call Package/twisted/default)
TITLE:=Twisted - News
DEPENDS+= twisted
endef
define PyPackage/twisted-runner
$(call PyPackage/twisted/default)
define Package/twisted-runner
$(call Package/twisted/default)
TITLE:=Twisted - Runner
DEPENDS+= twisted
endef
define PyPackage/twisted-web
$(call PyPackage/twisted/default)
define Package/twisted-web
$(call Package/twisted/default)
TITLE:=Twisted - Web
DEPENDS+= twisted
endef
define PyPackage/twisted-words
$(call PyPackage/twisted/default)
define Package/twisted-words
$(call Package/twisted/default)
TITLE:=Twisted - Words
DEPENDS+= twisted
endef
define PyPackage/zope-interface
$(call PyPackage/twisted/default)
define Package/zope-interface
$(call Package/twisted/default)
TITLE:=Zope interface
endef
@ -230,3 +237,14 @@ $(eval $(call PyPackage,twisted-runner))
$(eval $(call PyPackage,twisted-web))
$(eval $(call PyPackage,twisted-words))
$(eval $(call PyPackage,zope-interface))
$(eval $(call BuildPackage,twisted))
$(eval $(call BuildPackage,twisted-conch))
$(eval $(call BuildPackage,twisted-lore))
$(eval $(call BuildPackage,twisted-mail))
$(eval $(call BuildPackage,twisted-names))
$(eval $(call BuildPackage,twisted-news))
$(eval $(call BuildPackage,twisted-runner))
$(eval $(call BuildPackage,twisted-web))
$(eval $(call BuildPackage,twisted-words))
$(eval $(call BuildPackage,zope-interface))

View File

@ -15,17 +15,23 @@ PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=@SF/$(PKG_NAME)
PKG_MD5SUM:=8a3e9a5b814388d7907c639105cb2365
PKG_BUILD_DEPENDS:=python
include $(INCLUDE_DIR)/package.mk
include ../python/python-package.mk
-include $(if $(DUMP),,$(STAGING_DIR)/mk/python-package.mk)
ifeq ($(DUMP)$(Build/Compile/PyMod),)
$(error Python packaging code not found.)
endif
define PyPackage/python-yapsnmp
TITLE:=Python interface to Net-SNMP
URL:=http://yapsnmp.sourceforge.net/
DEPENDS+= +libnetsnmp
define Package/python-yapsnmp
SECTION:=lang
CATEGORY:=Languages
TITLE:=Python interface to Net-SNMP
URL:=http://yapsnmp.sourceforge.net/
DEPENDS:=python-core +libnetsnmp
endef
define PyPackage/python-yapsnmp/description
define Package/python-yapsnmp/description
This package contains a Python SNMP module based on the net-snmp (formerly
known as ucd-snmp) library. It's composed of a low level interface to the
library, created using SWIG, and a higher level python module removing all
@ -62,3 +68,4 @@ define Build/Compile
endef
$(eval $(call PyPackage,python-yapsnmp))
$(eval $(call BuildPackage,python-yapsnmp))