Reputation: 291
I have a dependency package that must install with easy_install
easy_install deps/my_deps_package.egg
My current steps:
easy_install deps/my_deps_package.egg
python setup.py sdist && pip install -e .[dev] dist/my_package.tar.gz
It worked fine now, but I can not add my_deps_package.egg
to requirements.txt
and I want when running python setup.py sdist
, it should install all of it.
I'm using tox
for running the tests and seems it's don't have option to run easy_install
before install package.
Is there anyway to using easy_install
along with python setup.py process or with tox
?
Upvotes: 0
Views: 197
Reputation: 588
tox
typically uses one install tool/command which can be set using install_command
. It will pass both the packages defined in deps
and your package to that install_command (defaults to python -m pip install {opts} {packages}(ARGV)
). Having two different install commmands is therefor impossible. Hence we will have to create a workaround.
An approach could be:
skipp_install = true
)commands
for whatever you want to do.[testenv]
skip_install = true
commands_pre =
easy_install deps/my_deps_package.egg
python setup.py sdist
python -m pip install -e .[dev] dist/my_package.tar.gz
commands =
pytest
This way you still achieve some separation of concerns as your installation commands only live in commands_pre
.
Bonus:
[testenv:something]
# This should inherite the pre_commands from [testenv]
commands =
# Do something else :)
ls
Upvotes: 1