2016-05-05 9 views
2

私はここに構造が与えられたパッケージを作成しました。toxを使用しているときにpipをインストールしないのはなぜですか?

packagename 
    -- packagename 
     -- __init__.py 
    -- setup.py 

パッケージが正しくインストールされ、私は 'ピップ凍結'

私は

tox.ini TOXと別のモジュールにこのパッケージを使用しようとしていますで確認

[tox] 
    envlist = dev 
[default-dependencies] 
    deps = packagename 
[testenv:dev] 
    deps = {[default-dependencies]deps} 
    pip_pre=True 
    ignore_errors=True 
    commands = py.test blah 

私はこれを試してみる

tox -e dev 

私はこの

pip install --pre packagename 

のようにインストールすると、このエラーメッセージ

Collecting packagename 
Could not find a version that satisfies the requirement packagename (from versions:) 
No matching distribution found for packagename 
v = InvocationError('/Users/***/.tox/dev/bin/pip install --pre dlb_dcp_csaf') 

は、しかし、すべてが良いですが、私は

pip 8.1.1 from /usr/local/lib/python2.7/site-packages (python 2.7) 
pip 8.1.1 from /Users/***/.tox/dev/lib/python2.7/site-packages (python 2.7) 

の両方にピップのバージョンを確認し得る誰が、なぜ助けてください私はtoxを使ってパッケージをインストールできませんでしたが、pipを手動でインストールできますか?

答えて

1

toxコマンドの出力に基づいて、packagenameへの正しいパスが指定されていないように見えます。したがって、toxはPIPサーバーでそれを検索しようとしています。あなたは、あなたのtox.iniが置かれているディレクトリに対する相対パスであるpackagenameへの正しいパスを指定する必要があります。

http://testrun.org/tox/latest/config.html

deps=MULTI-LINE-LIST 
test-specific dependencies - to be installed into the environment prior to 
project package installation. Each line defines a dependency, which will be  
passed to the installer command for processing. Each line specifies a file, 
a URL or a package name. 

...

(Experimentally introduced in 1.6.1) all installer commands are executed 
using the {toxinidir} as the current working directory. 

{toxinidir} 
the directory where tox.ini is located 
0

TOXあなたは、それ自体でdepsにそれを追加する必要が(すなわち./setup.py)をテストしていないしているパッケージをインストールします。

+0

私がテストしているパッケージをインストールします。しかし、私がテストしているパッケージは、私が作成した別のパッケージに依存しています。 Toxはそのパッケージを見つけられません。 – user1429322

関連する問題