本人试用 python 打包工具 setuptools
使用 python setup.py install 安装本地创建的测试项目 topackage:
console 的日志如下: running install running bdist_egg running egg_info writing topackage.egg-info\PKG-INFO writing dependency_links to topackage.egg-info\dependency_links.txt writing top-level names to topackage.egg-info\top_level.txt reading manifest file 'topackage.egg-info\SOURCES.txt' reading manifest template 'MANIFEST.in' writing manifest file 'topackage.egg-info\SOURCES.txt' installing library code to build\bdist.win-amd64\egg running install_lib running build_py creating build\bdist.win-amd64\egg creating build\bdist.win-amd64\egg\pack copying build\lib\pack\prt.py -> build\bdist.win-amd64\egg\pack copying build\lib\pack_init_.py -> build\bdist.win-amd64\egg\pack byte-compiling build\bdist.win-amd64\egg\pack\prt.py to prt.cpython-35.pyc byte-compiling build\bdist.win-amd64\egg\pack_init_.py to init.cpython-35.pyc creating build\bdist.win-amd64\egg\EGG-INFO copying topackage.egg-info\PKG-INFO -> build\bdist.win-amd64\egg\EGG-INFO copying topackage.egg-info\SOURCES.txt -> build\bdist.win-amd64\egg\EGG-INFO copying topackage.egg-info\dependency_links.txt -> build\bdist.win-amd64\egg\EGG-INFO copying topackage.egg-info\top_level.txt -> build\bdist.win-amd64\egg\EGG-INFO zip_safe flag not set; analyzing archive contents... creating 'dist\topackage-0.1-py3.5.egg' and adding 'build\bdist.win-amd64\egg' to it removing 'build\bdist.win-amd64\egg' (and everything under it) Processing topackage-0.1-py3.5.egg Removing d:\python35\lib\site-packages\topackage-0.1-py3.5.egg Copying topackage-0.1-py3.5.egg to d:\python35\lib\site-packages topackage 0.1 is already the active version in easy-install.pth
安装完成后: 进入 python console 界面,输入 import topackage ,提示 topackage 找不到..
这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。
V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。
V2EX is a community of developers, designers and creative people.