关于bdist目录层次结构的问题
我刚刚制作了一个小应用程序,然后为其编写了一个 setup.py 文件。一切似乎都很顺利,除了我无法弄清楚一件小事。
将 bdist
选项传递给 setup.py
时,它会创建存档 gzipped tar 文件。当我打开该文件时,我注意到目录结构是:
> usr
> lib
> python2.6
> site-packages
> Folder 1
> Folder 2
这是什么原因?通常,我预计文件夹 1 和文件夹 2 将位于根目录中。为什么bdist
添加顶级目录?有什么办法可以摆脱它们(更重要的是,我应该摆脱它们吗?)
I just made a small app and then wrote a setup.py
file for it. Everything seems to be working, except I can't figure out a small thing.
When passing the bdist
option to setup.py
, it creates the archive gzipped tar file. When I open that file, I notice that the directory structure is:
> usr
> lib
> python2.6
> site-packages
> Folder 1
> Folder 2
What is the reason for this? Typically, I had expect that Folder 1 and Folder 2 would be in the root directory. Why does bdist
add the top level directories? Is there any way I can get rid of them (more importantly, should I get rid of them?)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我认为你想要一个 sdist 输出....所以尝试 python setup.py sdist
Python 文档的引用
请参阅 Python 文档
I think that you want an sdist output .... so try python setup.py sdist
Quote of Python documentation
See Python Documentation