config BR2_PACKAGE_PYTHON_NETWORKX
bool "python-networkx"
+ depends on BR2_PACKAGE_PYTHON3
select BR2_PACKAGE_PYTHON_DECORATOR # runtime
help
A Python package for the creation, manipulation,
depends on BR2_TOOLCHAIN_HAS_THREADS
depends on BR2_USE_WCHAR
depends on BR2_USE_MMU
- select BR2_PACKAGE_PYTHON3 if !BR2_PACKAGE_PYTHON
- select BR2_PACKAGE_PYTHON_ENUM34 if !BR2_PACKAGE_PYTHON3
+ depends on BR2_PACKAGE_PYTHON3
select BR2_PACKAGE_PYTHON_NETWORKX # runtime
select BR2_PACKAGE_PYTHON_SETUPTOOLS
select BR2_PACKAGE_LIBSELINUX
depends on BR2_USE_MMU
depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS || \
!BR2_USE_WCHAR || !BR2_INSTALL_LIBSTDCPP
+
+comment "setools needs python3"
+ depends on BR2_USE_MMU
+ depends on !BR2_PACKAGE_PYTHON3
SETOOLS_SETUP_TYPE = setuptools
HOST_SETOOLS_DEPENDENCIES = host-python-cython host-libselinux host-libsepol host-python-networkx
-ifeq ($(BR2_PACKAGE_PYTHON3),y)
-SETOOLS_PYLIBVER = python$(PYTHON3_VERSION_MAJOR)
-else
-SETOOLS_PYLIBVER = python$(PYTHON_VERSION_MAJOR)
-SETOOLS_DEPENDENCIES += python-enum34
-HOST_SETOOLS_DEPENDENCIES += host-python-enum34
-endif
-
define SETOOLS_FIX_SETUP
# By default, setup.py will look for libsepol.a in the host machines
# /usr/lib directory. This needs to be changed to the staging directory.
ifeq ($(BR2_PACKAGE_PYTHON_PYQT5),)
define SETOOLS_REMOVE_QT_SCRIPTS
$(RM) $(TARGET_DIR)/usr/bin/apol
- $(RM) -r $(TARGET_DIR)/lib/$(SETOOLS_PYLIBVER)/site-packages/setoolsgui/
+ $(RM) -r $(TARGET_DIR)/lib/python$(PYTHON3_VERSION_MAJOR)/site-packages/setoolsgui/
endef
SETOOLS_POST_INSTALL_TARGET_HOOKS += SETOOLS_REMOVE_QT_SCRIPTS
endif