谈Debian系统,这是我最喜欢使用的系统。
比如我们要在不方便上互联网的机上安装 python-paho-mqtt。
1, 在网关机上,Debian 用戶可安裝 python-stdeb 套件
这样我们就有了兩个工具:pypi-download - 自 PyPI 下載 Python 套件的 tarball 文件。
py2dsc-deb - 將 PyPI 的 tarball 文件打包為 Debian 套件 (.deb)。
2, 下载
#pypi-download paho-mqtt
OK: paho-mqtt-1.1.tar.gz
3 , 转pypi包转成 DEB包
#py2dsc-deb paho-mqtt-1.1.tar.gz
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
running the following command in directory: deb_dist/tmp_py2dsc/paho-mqtt-1.1
/usr/bin/python setup.py --command-packages stdeb.command sdist_dsc --dist-dir=/
dpkg-deb:把套件 python-paho-mqtt 製作為 ../python-paho-mqtt_1.1-1_all.deb。
这样,这可以把python-paho-mqtt_1.1-1_all.deb拷贝出来放到目的机上安装了!