sta*_*eep 5 python setuptools pycharm pyramid
我已经开始开发一个需要setup.py使用的 Pyramid 应用程序,但是一旦我构建了该应用程序,我的app文件夹就被标记为library root。
不方便,因为当我打开一个文件时,它也在外部库下打开它展开它。这可以通过取消选中Always Select Opened File来“修复” ,但我喜欢这个功能,所以我不想禁用它。
我还尝试在设置中调整项目结构,但没有帮助。
如何摆脱这个 _library_root_ 标记?
更新。内容setup.py:
setup(
name='app',
version=0.1,
description='Blog with CMS',
classifiers=[
"Programming Language :: Python",
"Framework :: Pylons",
"Topic :: Internet :: WWW/HTTP",
"Topic :: Internet :: WWW/HTTP :: WSGI :: Application"
],
keywords="web services",
author='',
author_email='',
url='',
packages=find_packages(),
include_package_data=True,
zip_safe=False,
install_requires=['cornice', 'waitress'],
entry_points="""\
[paste.app_factory]
main=app:main
""",
paster_plugins=['pyramid']
)
Run Code Online (Sandbox Code Playgroud)
发生这种情况的原因是 PyCharm 添加sd-blog/app到解释器路径pip install -e中,以便能够为app对象提供补全。可能的解决方法: