摊铺机未知任务错误

时间:2016-05-02 13:54:16

标签: python django deployment paver

我开始使用paver并且我没有获得运行的基本命令,我不确定我缺少什么。

文档

Link to the documentation

安装

pip install paver

安装后,我可以在命令行中执行paver

---> paver.tasks.help
Usage: paver [global options] taskname [task options] [taskname [taskoptions]]

Options:
  --version             show program's version number and exit
  -n, --dry-run         don't actually do anything
  -v, --verbose         display all logging output
  -q, --quiet           display only errors
  -i, --interactive     enable prompting
  -f FILE, --file=FILE  read tasks from FILE [pavement.py]
  -h, --help            display this help information
  --propagate-traceback
                        propagate traceback, do not hide it under
                        BuildFailure(for debugging)
  -x COMMAND_PACKAGES, --command-packages=COMMAND_PACKAGES
                        list of packages that provide distutils commands

Tasks from paver.misctasks:
  generate_setup - Generates a setup.py file that uses paver behind the scenes
  minilib        - Create a Paver mini library that contains enough for a simple
    pavement.py to be installed using a generated setup.py
  paverdocs      - Open your web browser and display Paver's documentation.

Tasks from paver.tasks:
  help           - This help display.

paverlib> tasks.py

@task
def testpaver():
    from nose.tools import set_trace;set_trace()

paverlib> _ init _.py

import tasks

运行

paver testpaver
Build failed: Unknown task: testpaver

我缺少什么?

1 个答案:

答案 0 :(得分:2)

默认情况下,Paver会查找pavement.py作为任务定义的来源。

您是否尝试过将testpaver放入其中?