I'm new to python and I'm kind of lost here, I have a gherkins project in lettuce but I found i am creating a project using behave.
I created these files and folders:
features
features > steps
features > steps > example.py
features > environment.pys
features > example.feature
Then while I was running it, I found it didn't had the dependencies needed, because I'm getting this error:
ModuleNotFoundError: No module named 'pynput'
So, I looked for a build tool for python and found pybuilder that seems like a good choice, so I created a build.py like this:
from pybuilder.core import init, use_plugin, task
from subprocess import call
use_plugin("python.core")
use_plugin("python.install_dependencies")
default_task = "behave"
@init
def initialize(project):
project.depends_on("pynput")
@task
def behave(project):
call(["behave"])
But the problem persists it doesn't pick the dependency on "pynput" and I'm still getting the same error, and I found that other sites use a file requirements.txt for dependencies instead, and I'm not sure if its possible but I would prefer to use the pybuild structure for a project and that's the reason nothing is working, something like this:
src
src > test
src > test > python
src > test > python > example.py
src > test > features
src > test > features > example.feature
Is this possible? or should I use a different build tool for behave? and why haven't I been able to import dependencies?
Thanks