Skip to content

Commit

Permalink
python,python3: drop remove .pyc & .pyo files
Browse files Browse the repository at this point in the history
We'll control in the install phase what we ship [byte-codes or source files]

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
  • Loading branch information
commodo committed Mar 9, 2017
1 parent 92073b0 commit 05f8d6e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lang/python/files/python-package.mk
Expand Up @@ -54,7 +54,7 @@ define PyPackage

define Package/$(1)/install
$(call PyPackage/$(1)/install,$$(1))
find $(PKG_INSTALL_DIR) -name "*\.pyc" -o -name "*\.pyo" -o -name "*\.exe" | xargs rm -f
find $(PKG_INSTALL_DIR) -name "*\.exe" | xargs rm -f
if [ -e files/python-package-install.sh ] ; then \
$(SHELL) files/python-package-install.sh \
"$(PKG_INSTALL_DIR)" "$$(1)" \
Expand Down Expand Up @@ -103,7 +103,7 @@ define Build/Compile/PyMod
cd $(PKG_BUILD_DIR)/$(strip $(1)), \
./setup.py $(2), \
$(3))
find $(PKG_INSTALL_DIR) -name "*\.pyc" -o -name "*\.pyo" -o -name "*\.exe" | xargs rm -f
find $(PKG_INSTALL_DIR) -name "*\.exe" | xargs rm -f
endef

define PyBuild/Compile/Default
Expand Down
4 changes: 2 additions & 2 deletions lang/python3/files/python3-package.mk
Expand Up @@ -54,7 +54,7 @@ define Py3Package

define Package/$(1)/install
$(call Py3Package/$(1)/install,$$(1))
find $(PKG_INSTALL_DIR) -name "*\.pyc" -o -name "*\.pyo" -o -name "*\.exe" | xargs rm -f
find $(PKG_INSTALL_DIR) -name "*\.exe" | xargs rm -f
if [ -e files/python3-package-install.sh ] ; then \
$(SHELL) files/python3-package-install.sh \
"$(PKG_INSTALL_DIR)" "$$(1)" \
Expand Down Expand Up @@ -103,7 +103,7 @@ define Build/Compile/Py3Mod
cd $(PKG_BUILD_DIR)/$(strip $(1)), \
./setup.py $(2), \
$(3))
find $(PKG_INSTALL_DIR) -name "*\.pyc" -o -name "*\.pyo" -o -name "*\.exe" | xargs rm -f
find $(PKG_INSTALL_DIR) -name "*\.exe" | xargs rm -f
endef

define Py3Build/Compile/Default
Expand Down

0 comments on commit 05f8d6e

Please sign in to comment.