Changeset 9387


Ignore:
Timestamp:
2007-10-21T12:20:01+02:00 (10 years ago)
Author:
nbd
Message:

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
Location:
packages/lang
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • packages/lang/egenix-mx/Makefile

    r9208 r9387  
    1818 
    1919PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-base-$(PKG_VERSION) 
     20PKG_BUILD_DEPENDS:=python 
    2021 
    2122include $(INCLUDE_DIR)/package.mk 
    22 include ../python/python-package.mk 
     23-include $(if $(DUMP),,$(STAGING_DIR)/mk/python-package.mk) 
     24ifeq ($(DUMP)$(Build/Compile/PyMod),) 
     25  $(error Python packaging code not found.) 
     26endif 
    2327 
    24 define PyPackage/python-egenix-mx 
    25  TITLE:=Egenix mxBase 
    26  URL:=http://www.egenix.com/products/python/mxBase/ 
     28define Package/python-egenix-mx 
     29  SECTION:=lang 
     30  CATEGORY:=Languages 
     31  DEPENDS:=python-core 
     32  TITLE:=Egenix mxBase 
     33  URL:=http://www.egenix.com/products/python/mxBase/ 
    2734endef 
    2835 
    29 define PyPackage/python-egenix-mx/description 
     36define Package/python-egenix-mx/description 
    3037 This package contains a set of base packages from Egenix required by other  
    3138 python packages. 
     
    8996 
    9097$(eval $(call PyPackage,python-egenix-mx)) 
     98$(eval $(call BuildPackage,python-egenix-mx)) 
  • packages/lang/kid/Makefile

    r9303 r9387  
    66# 
    77# $Id$ 
    8   
     8 
    99include $(TOPDIR)/rules.mk 
    1010 
     
    1616PKG_SOURCE_URL:=http://www.kid-templating.org/dist/0.9.6/dist 
    1717PKG_MD5SUM:=31e7156698a6f214b4067afb9e13728f 
     18PKG_BUILD_DEPENDS:=python 
    1819 
    1920include $(INCLUDE_DIR)/package.mk 
    20 include ../python/python-package.mk 
     21-include $(if $(DUMP),,$(STAGING_DIR)/mk/python-package.mk) 
     22ifeq ($(DUMP)$(Build/Compile/PyMod),) 
     23  $(error Python packaging code not found.) 
     24endif 
    2125 
    22 define PyPackage/python-kid 
    23  TITLE:=XML-based Templating 
    24  URL:=http://www.kid-templating.org/ 
     26define Package/python-kid 
     27  SECTION:=lang 
     28  CATEGORY:=Languages 
     29  DEPENDS:=python-core 
     30  TITLE:=XML-based Templating 
     31  URL:=http://www.kid-templating.org/ 
    2532endef 
    2633 
    27 define PyPackage/python-kid/description 
     34define Package/python-kid/description 
    2835 Kid is a simple template language for XML based vocabularies written in  
    2936 Python. 
     
    4249 
    4350$(eval $(call PyPackage,python-kid)) 
     51$(eval $(call BuildPackage,python-kid)) 
  • packages/lang/psycopg/Makefile

    r9303 r9387  
    1616PKG_SOURCE_URL:=http://www.initd.org/pub/software/psycopg/ 
    1717PKG_MD5SUM:=a31f79f68d6d32898d6f24e11369a106 
     18PKG_BUILD_DEPENDS:=python 
    1819 
    1920include $(INCLUDE_DIR)/package.mk 
    20 include ../python/python-package.mk 
     21-include $(if $(DUMP),,$(STAGING_DIR)/mk/python-package.mk) 
     22ifeq ($(DUMP)$(Build/Compile/PyMod),) 
     23  $(error Python packaging code not found.) 
     24endif 
    2125 
    22 define PyPackage/python-psycopg 
    23  TITLE:=PostgreSQL database adapter for Python 
    24  URL:=http://www.initd.org/ 
    25  DEPENDS+= +libpq +python-egenix-mx 
     26define Package/python-psycopg 
     27  SECTION:=lang 
     28  CATEGORY:=Languages 
     29  TITLE:=PostgreSQL database adapter for Python 
     30  URL:=http://www.initd.org/ 
     31  DEPENDS:=python-core +libpq +python-egenix-mx 
    2632endef 
    2733 
    28 define PyPackage/python-psycopg/description 
     34define Package/python-psycopg/description 
    2935 This package contains is a PostgreSQL database adapter for the Python  
    3036 programming language. 
     
    4854 
    4955$(eval $(call PyPackage,python-psycopg)) 
     56$(eval $(call BuildPackage,python-psycopg)) 
  • packages/lang/pyevent/Makefile

    r9303 r9387  
    1616PKG_SOURCE_URL:=http://pyevent.googlecode.com/files/ 
    1717PKG_MD5SUM:=584912c92d08bf005283fb29a47a6e4d 
     18PKG_BUILD_DEPENDS:=python 
    1819 
    1920include $(INCLUDE_DIR)/package.mk 
    20 include ../python/python-package.mk 
     21-include $(if $(DUMP),,$(STAGING_DIR)/mk/python-package.mk) 
     22ifeq ($(DUMP)$(Build/Compile/PyMod),) 
     23  $(error Python packaging code not found.) 
     24endif 
    2125 
    22 define PyPackage/python-event 
    23  TITLE:=Python interface to libevent 
    24  URL:=http://code.google.com/p/pyevent/ 
    25  DEPENDS+= +libevent 
     26define Package/python-event 
     27  SECTION:=lang 
     28  CATEGORY:=Languages 
     29  TITLE:=Python interface to libevent 
     30  URL:=http://code.google.com/p/pyevent/ 
     31  DEPENDS:=python-core +libevent 
    2632endef 
    2733 
     
    3844 
    3945$(eval $(call PyPackage,python-event)) 
     46$(eval $(call BuildPackage,python-event)) 
  • packages/lang/pymysql/Makefile

    r9303 r9387  
    1616PKG_SOURCE_URL:=@SF/mysql-python 
    1717PKG_MD5SUM:=532268f02870bea18c1d465e88afff30 
     18PKG_BUILD_DEPENDS:=python 
    1819 
    1920include $(INCLUDE_DIR)/package.mk 
    20 include ../python/python-package.mk 
     21-include $(if $(DUMP),,$(STAGING_DIR)/mk/python-package.mk) 
     22ifeq ($(DUMP)$(Build/Compile/PyMod),) 
     23  $(error Python packaging code not found.) 
     24endif 
    2125 
    22 define PyPackage/python-mysql 
    23  TITLE:=MySQL database adapter for Python 
    24  URL:=http://mysql-python.sourceforge.net/ 
    25  DEPENDS+= +libmysqlclient 
     26define Package/python-mysql 
     27  SECTION:=lang 
     28  CATEGORY:=Languages 
     29  TITLE:=MySQL database adapter for Python 
     30  URL:=http://mysql-python.sourceforge.net/ 
     31  DEPENDS:=python-core +libmysqlclient 
    2632endef 
    2733 
    28 define PyPackage/python-mysql/description 
     34define Package/python-mysql/description 
    2935 MySQLdb is an thread-compatible interface to the popular MySQL database  
    3036 server that provides the Python database API. 
     
    4450 
    4551$(eval $(call PyPackage,python-mysql)) 
     52$(eval $(call BuildPackage,python-mysql)) 
  • packages/lang/pypcap/Makefile

    r9208 r9387  
    1616PKG_SOURCE_URL:=http://pypcap.googlecode.com/files 
    1717PKG_MD5SUM:=034c3cbbfa81aa19e8f685b767c65764 
     18PKG_BUILD_DEPENDS:=python 
    1819 
    1920include $(INCLUDE_DIR)/package.mk 
    20 include ../python/python-package.mk 
     21-include $(if $(DUMP),,$(STAGING_DIR)/mk/python-package.mk) 
     22ifeq ($(DUMP)$(Build/Compile/PyMod),) 
     23  $(error Python packaging code not found.) 
     24endif 
    2125 
    22 define PyPackage/python-pcap 
    23  TITLE:=Python interface to lipcap 
    24  URL:=http://code.google.com/p/pypcap/ 
    25  DEPENDS+= +libpcap 
     26define Package/python-pcap 
     27  SECTION:=lang 
     28  CATEGORY:=Languages 
     29  TITLE:=Python interface to lipcap 
     30  URL:=http://code.google.com/p/pypcap/ 
     31  DEPENDS:=python-core +libpcap 
    2632endef 
    2733 
     
    3844 
    3945$(eval $(call PyPackage,python-pcap)) 
     46$(eval $(call BuildPackage,python-pcap)) 
  • packages/lang/pysqlite/Makefile

    r9303 r9387  
    1616PKG_SOURCE_URL:=http://initd.org/pub/software/pysqlite/releases/2.3/2.3.5/ 
    1717PKG_MD5SUM:=b4a185e936848370fcc1a5b17755b641 
     18PKG_BUILD_DEPENDS:=python 
    1819 
    1920include $(INCLUDE_DIR)/package.mk 
    20 include ../python/python-package.mk 
     21-include $(if $(DUMP),,$(STAGING_DIR)/mk/python-package.mk) 
     22ifeq ($(DUMP)$(Build/Compile/PyMod),) 
     23  $(error Python packaging code not found.) 
     24endif 
    2125 
    22 define PyPackage/python-sqlite 
     26define Package/python-sqlite 
    2327 TITLE:=SQLite database adapter for Python 
    2428 URL:=http://www.initd.org/tracker/pysqlite/wiki/pysqlite 
    25  DEPENDS+= +libsqlite3 
     29 DEPENDS:= +libsqlite3 
    2630endef 
    2731 
    28 define PyPackage/python-sqlite/description 
     32define Package/python-sqlite/description 
    2933 This package contains an SQLite database adapter for the Python  
    3034 programming language. 
     
    4347 
    4448$(eval $(call PyPackage,python-sqlite)) 
     49$(eval $(call BuildPackage,python-sqlite)) 
  • packages/lang/python/Makefile

    r9310 r9387  
    66# 
    77# $Id$ 
    8   
     8 
    99include $(TOPDIR)/rules.mk 
    1010 
     
    1919PKG_BUILD_DIR:=$(BUILD_DIR)/Python-$(PKG_VERSION) 
    2020 
    21 PKG_BUILD_DEPENDS:=libexpat libopenssl zlib 
     21PKG_BUILD_DEPENDS:=python libexpat libopenssl zlib 
    2222 
    2323include $(INCLUDE_DIR)/package.mk 
    24 include ./python-package.mk 
    25  
    26 define PyPackage/python/Default 
     24-include $(if $(DUMP),,./python-package.mk) 
     25 
     26define Package/python/Default 
    2727  SUBMENU:=Python 
    2828  SECTION:=lang 
     
    3232endef 
    3333 
    34 define PyPackage/python/Default/description 
     34define Package/python/Default/description 
    3535 Python is a dynamic object-oriented programming language that can be used  
    3636 for many kinds of software development. It offers strong support for  
     
    4141endef 
    4242 
    43 define PyPackage/python 
    44 $(call PyPackage/python/Default) 
     43define Package/python 
     44$(call Package/python/Default) 
    4545 TITLE+= (full) 
    4646 DEPENDS:= +libpthread +zlib 
     
    4848endef 
    4949 
    50 define PyPackage/python/description 
    51 $(call PyPackage/python/Default/description) 
     50define Package/python/description 
     51$(call Package/python/Default/description) 
    5252 . 
    5353 This package contains the full Python install. 
    5454endef 
    5555 
    56 define PyPackage/python-mini 
    57 $(call PyPackage/python/Default) 
     56define Package/python-mini 
     57$(call Package/python/Default) 
    5858 TITLE+= (minimal) 
    5959 DEPENDS:= +libpthread +zlib 
     
    6161endef 
    6262 
    63 define PyPackage/python-mini/description 
    64 $(call PyPackage/python/Default/description) 
     63define Package/python-mini/description 
     64$(call Package/python/Default/description) 
    6565 . 
    6666 This package contains only a minimal Python install. 
    6767endef 
    6868 
    69 define PyPackage/python-doc 
    70 $(call PyPackage/python/Default) 
     69define Package/python-doc 
     70$(call Package/python/Default) 
    7171 TITLE:=Python interactive documentation 
    7272endef 
    7373 
    74 define PyPackage/python-expat 
    75 $(call PyPackage/python/Default) 
     74define Package/python-expat 
     75$(call Package/python/Default) 
    7676 TITLE:=Python support for expat 
    7777 DEPENDS+= +libexpat 
    7878endef 
    7979 
    80 define PyPackage/python-openssl 
    81 $(call PyPackage/python/Default) 
     80define Package/python-openssl 
     81$(call Package/python/Default) 
    8282 TITLE:=Python support for OpenSSL 
    8383 DEPENDS+= +libopenssl 
     
    136136 
    137137define Build/InstallDev 
     138        $(INSTALL_DIR) $(1)/mk 
     139        $(INSTALL_DATA) ./python-package.mk $(1)/mk/ 
    138140        mkdir -p $(1)/usr/bin 
    139141        $(CP) $(PKG_BUILD_DIR)/hostpython $(1)/usr/bin/ 
     
    150152 
    151153define Build/UninstallDev 
    152         rm -rf  $(STAGING_DIR)/usr/bin/hostpython \ 
    153                 $(STAGING_DIR)/usr/bin/python \ 
    154                 $(STAGING_DIR)/usr/include/python$(PYTHON_VERSION) \ 
    155                 $(STAGING_DIR)/usr/lib/python$(PYTHON_VERSION) \ 
    156                 $(STAGING_DIR)/usr/lib/libpython$(PYTHON_VERSION).a 
     154        rm -rf \ 
     155                $(1)/usr/bin/hostpython \ 
     156                $(1)/usr/bin/python \ 
     157                $(1)/usr/include/python$(PYTHON_VERSION) \ 
     158                $(1)/usr/lib/python$(PYTHON_VERSION) \ 
     159                $(1)/usr/lib/libpython$(PYTHON_VERSION).a 
    157160endef 
    158161 
     
    267270$(eval $(call PyPackage,python-openssl)) 
    268271 
     272$(eval $(call BuildPackage,python)) 
     273$(eval $(call BuildPackage,python-mini)) 
     274$(eval $(call BuildPackage,python-doc)) 
     275$(eval $(call BuildPackage,python-expat)) 
     276$(eval $(call BuildPackage,python-openssl)) 
     277 
  • packages/lang/python/python-package.mk

    r9207 r9387  
    77# $Id$ 
    88 
    9 ifeq ($(DUMP),) 
     9PYTHON_VERSION=2.5 
    1010 
    11   PYTHON_VERSION=2.5 
     11PYTHON_DIR:=$(STAGING_DIR)/usr 
     12PYTHON_BIN_DIR:=$(PYTHON_DIR)/bin 
     13PYTHON_INC_DIR:=$(PYTHON_DIR)/include/python$(PYTHON_VERSION) 
     14PYTHON_LIB_DIR:=$(PYTHON_DIR)/lib/python$(PYTHON_VERSION) 
    1215 
    13   PYTHON_DIR:=$(STAGING_DIR)/usr 
    14   PYTHON_BIN_DIR:=$(PYTHON_DIR)/bin 
    15   PYTHON_INC_DIR:=$(PYTHON_DIR)/include/python$(PYTHON_VERSION) 
    16   PYTHON_LIB_DIR:=$(PYTHON_DIR)/lib/python$(PYTHON_VERSION) 
     16PYTHON:=$(PYTHON_BIN_DIR)/python 
    1717 
    18   PYTHON:=$(PYTHON_BIN_DIR)/python 
    19  
    20   PYTHON_PKG_DIR:=/usr/lib/python$(PYTHON_VERSION)/site-packages 
    21  
    22 endif 
     18PYTHON_PKG_DIR:=/usr/lib/python$(PYTHON_VERSION)/site-packages 
    2319 
    2420define PyPackage 
    25   NAME:=$(1) 
    26   $(eval $(call PyPackage/$(1))) 
    27  
    28   define Package/$(1) 
    29     SUBMENU:=Python 
    30     TITLE:=$(TITLE) 
    31     SECTION:=lang 
    32     CATEGORY:=Languages 
    33     DEPENDS:=python-core 
    34     $(call PyPackage/$(1)) 
    35   endef 
    36  
    37   ifdef PyPackage/$(1)/description 
    38     define Package/$(1)/description 
    39 $(call PyPackage/$(1)/description) 
    40     endef 
    41   endif 
    42  
    4321  $(call shexport,PyPackage/$(1)/filespec) 
    4422 
     
    7149        $(call PyPackage/$(1)/install,$$(1)) 
    7250  endef 
    73  
    74   $$(eval $$(call BuildPackage,$(1))) 
    7551endef 
    7652 
  • packages/lang/twisted/Makefile

    r9304 r9387  
    1818 
    1919PKG_BUILD_DIR:=$(BUILD_DIR)/Twisted-$(PKG_VERSION) 
     20PKG_BUILD_DEPENDS:=python 
    2021 
    2122include $(INCLUDE_DIR)/package.mk 
    22 include ../python/python-package.mk 
    23  
    24 define PyPackage/twisted/default 
    25  URL:=http://twistedmatrix.com/ 
    26 endef 
    27  
    28 define PyPackage/twisted/default/description 
     23-include $(if $(DUMP),,$(STAGING_DIR)/mk/python-package.mk) 
     24ifeq ($(DUMP)$(Build/Compile/PyMod),) 
     25  $(error Python packaging code not found.) 
     26endif 
     27 
     28define Package/twisted/default 
     29  SECTION:=lang 
     30  CATEGORY:=Languages 
     31  DEPENDS:=python-core 
     32  URL:=http://twistedmatrix.com/ 
     33endef 
     34 
     35define Package/twisted/default/description 
    2936 Twisted is a networking engine written in Python, supporting numerous  
    3037 protocols. It contains a web server, numerous chat clients, chat servers,  
     
    3239endef 
    3340 
    34 define PyPackage/twisted 
    35 $(call PyPackage/twisted/default) 
    36  TITLE:=Python networking engine 
    37  DEPENDS+= +zope-interface 
    38 endef 
    39  
    40 define PyPackage/twisted-conch 
    41 $(call PyPackage/twisted/default) 
     41define Package/twisted 
     42$(call Package/twisted/default) 
     43  TITLE:=Python networking engine 
     44  DEPENDS+= +zope-interface 
     45endef 
     46 
     47define Package/twisted-conch 
     48$(call Package/twisted/default) 
    4249  TITLE:=Twisted - Conch 
    4350  DEPENDS+= twisted 
    4451endef 
    4552 
    46 define PyPackage/twisted-lore 
    47 $(call PyPackage/twisted/default) 
     53define Package/twisted-lore 
     54$(call Package/twisted/default) 
    4855  TITLE:=Twisted - Lore 
    4956  DEPENDS+= twisted 
    5057endef 
    5158 
    52 define PyPackage/twisted-mail 
    53 $(call PyPackage/twisted/default) 
     59define Package/twisted-mail 
     60$(call Package/twisted/default) 
    5461  TITLE:=Twisted - Mail 
    5562  DEPENDS+= twisted 
    5663endef 
    5764 
    58 define PyPackage/twisted-names 
    59 $(call PyPackage/twisted/default) 
     65define Package/twisted-names 
     66$(call Package/twisted/default) 
    6067  TITLE:=Twisted - Names 
    6168  DEPENDS+= twisted 
    6269endef 
    6370 
    64 define PyPackage/twisted-news 
    65 $(call PyPackage/twisted/default) 
     71define Package/twisted-news 
     72$(call Package/twisted/default) 
    6673  TITLE:=Twisted - News 
    6774  DEPENDS+= twisted 
    6875endef 
    6976 
    70 define PyPackage/twisted-runner 
    71 $(call PyPackage/twisted/default) 
     77define Package/twisted-runner 
     78$(call Package/twisted/default) 
    7279  TITLE:=Twisted - Runner 
    7380  DEPENDS+= twisted 
    7481endef 
    7582 
    76 define PyPackage/twisted-web 
    77 $(call PyPackage/twisted/default) 
     83define Package/twisted-web 
     84$(call Package/twisted/default) 
    7885  TITLE:=Twisted - Web 
    7986  DEPENDS+= twisted 
    8087endef 
    8188 
    82 define PyPackage/twisted-words 
    83 $(call PyPackage/twisted/default) 
     89define Package/twisted-words 
     90$(call Package/twisted/default) 
    8491  TITLE:=Twisted - Words 
    8592  DEPENDS+= twisted 
    8693endef 
    8794 
    88 define PyPackage/zope-interface 
    89 $(call PyPackage/twisted/default) 
     95define Package/zope-interface 
     96$(call Package/twisted/default) 
    9097  TITLE:=Zope interface 
    9198endef 
     
    231238$(eval $(call PyPackage,twisted-words)) 
    232239$(eval $(call PyPackage,zope-interface)) 
     240 
     241$(eval $(call BuildPackage,twisted)) 
     242$(eval $(call BuildPackage,twisted-conch)) 
     243$(eval $(call BuildPackage,twisted-lore)) 
     244$(eval $(call BuildPackage,twisted-mail)) 
     245$(eval $(call BuildPackage,twisted-names)) 
     246$(eval $(call BuildPackage,twisted-news)) 
     247$(eval $(call BuildPackage,twisted-runner)) 
     248$(eval $(call BuildPackage,twisted-web)) 
     249$(eval $(call BuildPackage,twisted-words)) 
     250$(eval $(call BuildPackage,zope-interface)) 
  • packages/lang/yapsnmp/Makefile

    r9208 r9387  
    1616PKG_SOURCE_URL:=@SF/$(PKG_NAME) 
    1717PKG_MD5SUM:=8a3e9a5b814388d7907c639105cb2365 
     18PKG_BUILD_DEPENDS:=python 
    1819 
    1920include $(INCLUDE_DIR)/package.mk 
    20 include ../python/python-package.mk 
     21-include $(if $(DUMP),,$(STAGING_DIR)/mk/python-package.mk) 
     22ifeq ($(DUMP)$(Build/Compile/PyMod),) 
     23  $(error Python packaging code not found.) 
     24endif 
    2125 
    22 define PyPackage/python-yapsnmp 
    23  TITLE:=Python interface to Net-SNMP 
    24  URL:=http://yapsnmp.sourceforge.net/ 
    25  DEPENDS+= +libnetsnmp 
     26define Package/python-yapsnmp 
     27  SECTION:=lang 
     28  CATEGORY:=Languages 
     29  TITLE:=Python interface to Net-SNMP 
     30  URL:=http://yapsnmp.sourceforge.net/ 
     31  DEPENDS:=python-core +libnetsnmp 
    2632endef 
    2733 
    28 define PyPackage/python-yapsnmp/description 
     34define Package/python-yapsnmp/description 
    2935 This package contains a Python SNMP module based on the net-snmp (formerly  
    3036 known as ucd-snmp) library. It's composed of a low level interface to the  
     
    6369 
    6470$(eval $(call PyPackage,python-yapsnmp)) 
     71$(eval $(call BuildPackage,python-yapsnmp)) 
Note: See TracChangeset for help on using the changeset viewer.