我有一个Python项目aws-ssm-tools,该项目使用setup.py
进行打包。它带有3个脚本:ssm-tunnel
,ssm-session
和ssm-copy
。
它可以与pip install aws-ssm-tools
一起安装,并将脚本放入~/.local/bin/
。
但是,当我尝试使用pipx
安装它时,它会失败:
~ $ pipx install aws-ssm-tools
No apps associated with package aws-ssm-tools. Try again with '--include-deps'
to include apps of dependent packages, which are listed above. If you are
attempting to install a library, pipx should not be used. Consider using pip or
a similar tool instead.
我有setup.py
中指定的脚本:
SCRIPTS = [
'ssm-session',
'ssm-copy',
'ssm-tunnel',
'ssm-tunnel-updown.dns-example',
]
# ...
setup(
name="aws-ssm-tools",
version=VERSION,
packages=find_packages(),
scripts=SCRIPTS+[
'ssm-tunnel-agent'
],
# ...
)
要使pipx
开心,我还需要做些什么?
答案 0 :(得分:3)
如pipx documentation chapter "How pipx works", section "Developing for pix"中所述,该项目需要setuptools entry_points
。
根据问题的内容,似乎目标项目使用Error in `.rowNamesDF<-`(x, value = value) :
missing values in 'row.names' are not allowed
,它们的目的与scripts
类似,但 pipx 不会寻找这些对象,并且不会暴露它们。