Browse Source

Merge pull request #4558 from commodo/python-cleanup1

python,python3: rename PyBuild/Compile rules & remove .egg-info from packages
lilik-openwrt-22.03
Hannu Nyman 8 years ago
committed by GitHub
parent
commit
3c29561888
5 changed files with 16 additions and 6 deletions
  1. +4
    -4
      lang/python/python-lxml/Makefile
  2. +3
    -0
      lang/python/python/files/python-package-install.sh
  3. +3
    -1
      lang/python/python/files/python-package.mk
  4. +3
    -0
      lang/python/python3/files/python3-package-install.sh
  5. +3
    -1
      lang/python/python3/files/python3-package.mk

+ 4
- 4
lang/python/python-lxml/Makefile View File

@ -37,14 +37,14 @@ endef
define Package/python-lxml
$(call Package/python-lxml/Default)
TITLE:=python-lxml
DEPENDS+=+python-light +python-codecs
DEPENDS+=+PACKAGE_python-lxml:python-light +PACKAGE_python-lxml:python-codecs
VARIANT:=python
endef
define Package/python3-lxml
$(call Package/python-lxml/Default)
TITLE:=python3-lxml
DEPENDS+=+python3-light
DEPENDS+=+PACKAGE_python3-lxml:python3-light
VARIANT:=python3
endef
@ -61,7 +61,7 @@ endef
TARGET_LDFLAGS += -lxml2 -lxslt -lexslt
define PyBuild/Compile/Default
define PyBuild/Compile
$(call Build/Compile/PyMod,, \
install --prefix="/usr" --root="$(PKG_INSTALL_DIR)" \
--static \
@ -74,7 +74,7 @@ define PyBuild/Compile/Default
)
endef
define Py3Build/Compile/Default
define Py3Build/Compile
$(call Build/Compile/Py3Mod,, \
install --prefix="/usr" --root="$(PKG_INSTALL_DIR)" \
--static \


+ 3
- 0
lang/python/python/files/python-package-install.sh View File

@ -45,6 +45,9 @@ process_filespec "$src_dir" "$dst_dir" "$filespec" || {
exit 1
}
# delete egg-info directories
find "$dst_dir" -name "*.egg-info" | xargs rm -rf
if [ "$mode" == "sources" ] ; then
# Copy only python source files
find $dst_dir -not -name "*\.py" | xargs rm -f


+ 3
- 1
lang/python/python/files/python-package.mk View File

@ -132,8 +132,10 @@ define PyBuild/Compile/Default
)
endef
PyBuild/Compile=$(PyBuild/Compile/Default)
ifeq ($(BUILD_VARIANT),python)
define Build/Compile
$(call PyBuild/Compile/Default)
$(call PyBuild/Compile)
endef
endif # python

+ 3
- 0
lang/python/python3/files/python3-package-install.sh View File

@ -45,6 +45,9 @@ process_filespec "$src_dir" "$dst_dir" "$filespec" || {
exit 1
}
# delete egg-info directories
find "$dst_dir" -name "*.egg-info" | xargs rm -rf
if [ "$mode" == "sources" ] ; then
# Copy only python source files
find $dst_dir -not -name "*\.py" | xargs rm -f


+ 3
- 1
lang/python/python3/files/python3-package.mk View File

@ -132,8 +132,10 @@ define Py3Build/Compile/Default
)
endef
Py3Build/Compile=$(Py3Build/Compile/Default)
ifeq ($(BUILD_VARIANT),python3)
define Build/Compile
$(call Py3Build/Compile/Default)
$(call Py3Build/Compile)
endef
endif # python3

Loading…
Cancel
Save