Temat: Dodanie modułu python3-pyinotify do OpenWrt 19.07
Cześć,
Próbuję dodać moduł python3-pyinotify do OpenWrt 19.07 podczas budowania systemu. Aktualizacja feed'ów nie dodaje go do listy dostępnych modułów Python3 (z tego co znalazłem to wchodzi on dopiero na OpenWrt 22.03). Próbowałem wzorować się na Makefile który znalazłem tutaj: https://github.com/openwrt/packages/blo … y/Makefile
Aktualnie treść mojego Makefile który umieściłem w katalogu "package/python3-pyinotify" wygląda tak:
include $(TOPDIR)/rules.mk
PKG_NAME:=python3-pyinotify
PKG_VERSION:=0.9.6
PKG_RELEASE:=1
PYPI_NAME:=pyinotify
PKG_SOURCE:=$(PYPI_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/p/$(PYPI_NAME)
PKG_HASH:=9c998a5d7606ca835065cdabc013ae6c66eb9ea76a00a1e3bc6e0cfe2b4f71f4
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PYPI_NAME)-$(PKG_VERSION)
PKG_BUILD_DEPENDS:=python3
PYTHON_FEED_DIR=$(TOPDIR)/feeds/packages/lang/python
include $(INCLUDE_DIR)/package.mk
include $(PYTHON_FEED_DIR)/python3-package.mk
PYTHON3:=/usr/bin/python3
define Package/python3-pyinotify
SUBMENU:=Python
SECTION:=lang
CATEGORY:=Languages
TITLE:=pyinotify for Python3
URL:=https://pypi.org/project/pyinotify/
DEPENDS:=+python3
endef
define Package/python3-pyinotify/description
pyinotify provides Python bindings for the inotify Linux kernel subsystem.
endef
define Build/Compile
cd $(PKG_BUILD_DIR); $(PYTHON3) setup.py build
endef
define Package/python3-pyinotify/install
$(info PYTHON3_PKG_DIR=$(PYTHON3_PKG_DIR))
$(INSTALL_DIR) $(1)$(PYTHON3_PKG_DIR)
$(CP) $(PKG_BUILD_DIR)/python3/pyinotify.py $(1)$(PYTHON3_PKG_DIR)/
endef
$(eval $(call BuildPackage,python3-pyinotify))Efekt jest taki że mam możliwość zaznaczyć go w menuconfig, obraz buduje się bez błędów, moduł jest potem możliwy do zaimportowania w konsoli Python3, natomiast polecenie pip3 list nie wyświetla go jakby nie było go w systemie. Z tego co wyczytałem to prawdopodobnie brakuje mu *.dist-info i/lub *.egg-info.
ls /usr/lib/python3.*/site-packages/pyinotify*
/usr/lib/python3.7/site-packages/pyinotify.py Na hoście na którym buduję (Ubuntu) w build_dir pojawia się tylko jeden plik pyinotify.py
ls build_dir/target-*/root-*/usr/lib/python3.*/site-packages
ADS1x15 inotify pyserial-3.4-py3.7.egg-info
ADS1x15_ADC-1.2.2-py3.7.egg-info inotify-0.2.10.dist-info python_dateutil-2.8.0-py3.7.egg-info
certifi inotify-0.2.10-py3.7.egg-info README.txt
certifi-2019.11.28-py3.7.egg-info mysqlclient-1.3.14-py3.7.egg-info requests
chardet _mysql.cpython-37.so requests-2.23.0-py3.7.egg-info
chardet-3.0.4-py3.7.egg-info MySQLdb serial
configobj _mysql_exceptions.pyc setuptools
configobj-5.0.9.dist-info nose setuptools-47.1.0.dist-info
curl nose-1.3.7.dist-info shapely
dateutil pcf8574_sg24 Shapely-1.7.1.dist-info
docutils pcf8574_sg24-1.2.2-py3.7.egg-info Shapely-1.7.1-py3.7.egg-info
docutils-0.14-py3.7.egg-info pip six-1.13.0-py3.7.egg-info
easy_install.pyc pip-22.0.4.dist-info six.pyc
geographiclib pkg_resources smbus-1.1-py3.7.egg-info
geographiclib-1.50.dist-info pycurl-7.43.0.3-py3.7.egg-info smbus2
geographiclib-1.52.dist-info pycurl.cpython-37.so smbus2-0.4.2.dist-info
geopy pyinotify.py smbus.cpython-37.so
geopy-2.0.0.dist-info pynmea urllib3
idna pynmea-0.6.0.dist-info urllib3-1.25.10-py3.7.egg-info
idna-2.9-py3.7.egg-info pynmea-0.6.0-py3.7.egg-info validateCo jeszcze mogę spróbować zrobić żeby dodać ten moduł w pełni?