diff options
| author | Hannu Nyman <hannu.nyman@iki.fi> | 2015-12-19 22:37:32 +0200 |
|---|---|---|
| committer | Hannu Nyman <hannu.nyman@iki.fi> | 2015-12-19 22:37:32 +0200 |
| commit | 262a3729022bf13a403d893121e0c8aae8dfd068 (patch) | |
| tree | c6d770c465f96d35f9702ce64ad1ca97a635f11c /lang/python | |
| parent | b5f07a089e05185f2bd88e8ddf4bcd715e731a25 (diff) | |
| parent | 83d992a8a9e8f4b681b674e7e89e5d6027b1c242 (diff) | |
Merge pull request #2144 from cshore/pull-request-python-module-make
lang/python: Make building additional (non-base) python modules easier
Diffstat (limited to 'lang/python')
| -rw-r--r-- | lang/python/files/python-package.mk | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/lang/python/files/python-package.mk b/lang/python/files/python-package.mk index 92e8fdd37..0a370c531 100644 --- a/lang/python/files/python-package.mk +++ b/lang/python/files/python-package.mk @@ -109,3 +109,21 @@ define Build/Compile/PyMod find $(PKG_INSTALL_DIR) -name "*\.pyc" -o -name "*\.pyo" | xargs rm -f endef +define PyMod/Default + define Build/Compile + $$(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR)) + endef + + define Package/$(PKG_NAME)/install + $(INSTALL_DIR) $$(1)$(PYTHON_PKG_DIR) $$(1)/usr/bin + if [ -d $(PKG_INSTALL_DIR)/usr/bin ]; then find $(PKG_INSTALL_DIR)/usr/bin -mindepth 1 -maxdepth 1 -type f -exec $(CP) \{\} $$(1)/usr/bin/ \; ; fi + find $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR) -mindepth 1 -maxdepth 1 \( -type f -o -type d \) -exec $(CP) \{\} $$(1)$(PYTHON_PKG_DIR)/ \; + endef + + define Build/InstallDev + $(INSTALL_DIR) $$(1)/usr/bin $$(1)$(PYTHON_PKG_DIR) + if [ -d $(PKG_INSTALL_DIR)/usr/bin ]; then find $(PKG_INSTALL_DIR)/usr/bin -mindepth 1 -maxdepth 1 -type f -exec $(CP) \{\} $$(1)/usr/bin/ \; ; fi + find $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR) -mindepth 1 -maxdepth 1 \( -type f -o -type d \) -exec $(CP) \{\} $$(1)$(PYTHON_PKG_DIR)/ \; + endef +endef + |
