2015-09-06 92 views
0

我在寫一個需要pygame的項目。Python循環本地模塊

我已經按照pygame wiki的說明在python中安裝了pygame。

pip install hg+http://bitbucket.org/pygame/pygame 

我想添加pygame到我創建的wheel目錄。我試圖用我已經嘗試添加在--no-index--find-links=https://bitbucket.org/pygame/pygame--allow-unverified pygame--allow-external pygame選項命令

pip wheel --wheel-dir=wheels/linux64 pygame 

做到這一點。

輸出總是沿着找不到滿足pygame要求的包的東西。

Downloading/unpacking pygame 
    Could not find any downloads that satisfy the requirement pygame 
    Some externally hosted files were ignored (use --allow-external pygame to allow). 
Cleaning up... 
No distributions at all found for pygame 
Storing debug log for failure in /home/eric/.pip/pip.log 

我該如何輪播本地版本的pygame並將其添加到我的wheel目錄中?

回答

2

你需要指向點源,以創建一個車輪。 例如:

$ hg clone https://bitbucket.org/pygame/pygame 
... 
... 
$ pip wheel pygame/ 
Processing ./pygame 
Building wheels for collected packages: pygame 
    Running setup.py bdist_wheel for pygame 
    Stored in directory: /home/vagrant/wheelhouse 
Successfully built pygame 
(test)[email protected]:~$ ll /home/vagrant/wheelhouse 
total 3264 
drwxrwxr-x 2 vagrant vagrant 4096 Sep 6 01:24 ./ 
drwxr-xr-x 7 vagrant vagrant 4096 Sep 6 01:24 ../ 
-rw-rw-r-- 1 vagrant vagrant 3333795 Sep 6 01:24 pygame-1.9.2a0-cp27-none-linux_x86_64.whl 

,因爲它缺少安裝說明部分(setup.py)您不能創建從安裝的模塊輪。欲瞭解更多信息,請查詢wheel's usage instructions