Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

一个关于发布时setup.py的建议 #6

Open
TotoWang-hhh opened this issue Jan 6, 2023 · 0 comments
Open

一个关于发布时setup.py的建议 #6

TotoWang-hhh opened this issue Jan 6, 2023 · 0 comments

Comments

@TotoWang-hhh
Copy link
Contributor

一个之前提在关掉的pr里,不知道您是否看见的小建议:就是在没有其他文件的情况下,setup.py里不要用packages=find_packages(...)而是用py_modules=[...]。这样发布的话就不会存在from xxx import xxx这样的麻烦事了,使用者直接import xxx就完事了。以及这样就顺便解决了随包发布的Demo和其他程序中import处的代码不同的问题。

我也才知道的,可以参考kennethreitz大佬提供的setup.py例子,里面107和108行的注释说了这个好东西。

您可以计划弄一个大版本更新,告诉大家这次更新与旧版不相容

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant