tox don't read setup.cfg
tox don't read setup.cfg
I'm new to python and have some problems with tox.
My tox.ini
tox.ini
[tox]
envlist = py36
[testenv]
passenv = TOXENV CI TRAVIS TRAVIS_*
usedevelop = True
install_command = pip install -U opts packages
deps = -rtoxinidir/test-requirements.txt
-rtoxinidir/requirements.txt
commands =
python -V
py.test -vvv -s
[testenv:docs]
commands =
python setup.py build_sphinx
My setup.cfg
setup.cfg
[build_sphinx]
source-dir = docs/source
build-dir = docs/build
all_files = 1
[upload_sphinx]
upload-dir = docs/build/html
python setup.py build_sphinx works just fine, but /Users/ben/development/python/test/.tox/docs/bin/python setup.py build_sphinx says
python setup.py build_sphinx
/Users/ben/development/python/test/.tox/docs/bin/python setup.py build_sphinx
error: invalid command 'build_sphinx'
My environment
$ python --version
Python 3.6.0
$ /Users/ben/development/python/test/.tox/docs/bin/python --version
Python 3.6.0
1 Answer
1
You need to install sphinx as part of your dependencies in order to use the build_sphinx setuptools/distutils command.
sphinx
build_sphinx
For instance:
[testenv:docs]
deps =
# you may also need [testenv]deps here if you depend on the
# parent deps
sphinx
commands =
python setup.py build_sphinx
test-requirements.txt
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.
I added it to my
test-requirements.txtand it worked, thank you– Ben Keil
Aug 19 at 19:22