Merge pull request #4558 from commodo/python-cleanup1
python,python3: rename PyBuild/Compile rules & remove .egg-info from packages
This commit is contained in:
commit
3c29561888
5 changed files with 16 additions and 6 deletions
|
@ -37,14 +37,14 @@ endef
|
||||||
define Package/python-lxml
|
define Package/python-lxml
|
||||||
$(call Package/python-lxml/Default)
|
$(call Package/python-lxml/Default)
|
||||||
TITLE:=python-lxml
|
TITLE:=python-lxml
|
||||||
DEPENDS+=+python-light +python-codecs
|
DEPENDS+=+PACKAGE_python-lxml:python-light +PACKAGE_python-lxml:python-codecs
|
||||||
VARIANT:=python
|
VARIANT:=python
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Package/python3-lxml
|
define Package/python3-lxml
|
||||||
$(call Package/python-lxml/Default)
|
$(call Package/python-lxml/Default)
|
||||||
TITLE:=python3-lxml
|
TITLE:=python3-lxml
|
||||||
DEPENDS+=+python3-light
|
DEPENDS+=+PACKAGE_python3-lxml:python3-light
|
||||||
VARIANT:=python3
|
VARIANT:=python3
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
@ -61,7 +61,7 @@ endef
|
||||||
|
|
||||||
TARGET_LDFLAGS += -lxml2 -lxslt -lexslt
|
TARGET_LDFLAGS += -lxml2 -lxslt -lexslt
|
||||||
|
|
||||||
define PyBuild/Compile/Default
|
define PyBuild/Compile
|
||||||
$(call Build/Compile/PyMod,, \
|
$(call Build/Compile/PyMod,, \
|
||||||
install --prefix="/usr" --root="$(PKG_INSTALL_DIR)" \
|
install --prefix="/usr" --root="$(PKG_INSTALL_DIR)" \
|
||||||
--static \
|
--static \
|
||||||
|
@ -74,7 +74,7 @@ define PyBuild/Compile/Default
|
||||||
)
|
)
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Py3Build/Compile/Default
|
define Py3Build/Compile
|
||||||
$(call Build/Compile/Py3Mod,, \
|
$(call Build/Compile/Py3Mod,, \
|
||||||
install --prefix="/usr" --root="$(PKG_INSTALL_DIR)" \
|
install --prefix="/usr" --root="$(PKG_INSTALL_DIR)" \
|
||||||
--static \
|
--static \
|
||||||
|
|
|
@ -45,6 +45,9 @@ process_filespec "$src_dir" "$dst_dir" "$filespec" || {
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# delete egg-info directories
|
||||||
|
find "$dst_dir" -name "*.egg-info" | xargs rm -rf
|
||||||
|
|
||||||
if [ "$mode" == "sources" ] ; then
|
if [ "$mode" == "sources" ] ; then
|
||||||
# Copy only python source files
|
# Copy only python source files
|
||||||
find $dst_dir -not -name "*\.py" | xargs rm -f
|
find $dst_dir -not -name "*\.py" | xargs rm -f
|
||||||
|
|
|
@ -132,8 +132,10 @@ define PyBuild/Compile/Default
|
||||||
)
|
)
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
PyBuild/Compile=$(PyBuild/Compile/Default)
|
||||||
|
|
||||||
ifeq ($(BUILD_VARIANT),python)
|
ifeq ($(BUILD_VARIANT),python)
|
||||||
define Build/Compile
|
define Build/Compile
|
||||||
$(call PyBuild/Compile/Default)
|
$(call PyBuild/Compile)
|
||||||
endef
|
endef
|
||||||
endif # python
|
endif # python
|
||||||
|
|
|
@ -45,6 +45,9 @@ process_filespec "$src_dir" "$dst_dir" "$filespec" || {
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# delete egg-info directories
|
||||||
|
find "$dst_dir" -name "*.egg-info" | xargs rm -rf
|
||||||
|
|
||||||
if [ "$mode" == "sources" ] ; then
|
if [ "$mode" == "sources" ] ; then
|
||||||
# Copy only python source files
|
# Copy only python source files
|
||||||
find $dst_dir -not -name "*\.py" | xargs rm -f
|
find $dst_dir -not -name "*\.py" | xargs rm -f
|
||||||
|
|
|
@ -132,8 +132,10 @@ define Py3Build/Compile/Default
|
||||||
)
|
)
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
Py3Build/Compile=$(Py3Build/Compile/Default)
|
||||||
|
|
||||||
ifeq ($(BUILD_VARIANT),python3)
|
ifeq ($(BUILD_VARIANT),python3)
|
||||||
define Build/Compile
|
define Build/Compile
|
||||||
$(call Py3Build/Compile/Default)
|
$(call Py3Build/Compile)
|
||||||
endef
|
endef
|
||||||
endif # python3
|
endif # python3
|
||||||
|
|
Loading…
Reference in a new issue