python-bpmobile : wsgiuseragentmobilのバージョン指定があるので明示的には入れないようにする。

例によって環境構築

hdknr@debuniid:~$ mkvirtualenv mobile
New python executable in mobile/bin/python
Installing setuptools…………done.
(mobile)hdknr@debuniid:~$ cdvirtualenv
(mobile)hdknr@debuniid:~/.virtualenvs/mobile$ ls -a
.  ..  bin  include  lib
(mobile)hdknr@debuniid:~/.virtualenvs/mobile$ mkdir src
(mobile)hdknr@debuniid:~/.virtualenvs/mobile$ ls -al
合計 24
drwxr-xr-x 6 hdknr hdknr 4096 2009-10-16 12:25 .
drwxr-xr-x 6 hdknr hdknr 4096 2009-10-16 12:23 ..
drwxr-xr-x 2 hdknr hdknr 4096 2009-10-16 12:23 bin
drwxr-xr-x 2 hdknr hdknr 4096 2009-10-16 12:23 include
drwxr-xr-x 3 hdknr hdknr 4096 2009-10-16 12:23 lib
drwxr-xr-x 2 hdknr hdknr 4096 2009-10-16 12:25 src
(mobile)hdknr@debuniid:~/.virtualenvs/mobile$
(mobile)hdknr@debuniid:~/.virtualenvs/mobile$ cd src/
(mobile)hdknr@debuniid:~/.virtualenvs/mobile/src$ vi requirement.txt
(mobile)hdknr@debuniid:~/.virtualenvs/mobile/src$ which pip
(mobile)hdknr@debuniid:~/.virtualenvs/mobile/src$ easy_install pip
Searching for pip
Reading http://pypi.python.org/simple/pip/
Reading http://pip.openplans.org
Best match: pip 0.5.1
Downloading http://pypi.python.org/packages/source/p/pip/pip-0.5.1.tar.gz#md5=d4                                                                                                                                                                            bdaa5f5f5bf8c6263ace75a0882232
Processing pip-0.5.1.tar.gz
Running pip-0.5.1/setup.py -q bdist_egg –dist-dir /tmp/easy_install-FG1yBq/pip-                                                                                                                                                                            0.5.1/egg-dist-tmp-qfgqM6
warning: no previously-included files matching ‘*.txt’ found under directory ‘do                                                                                                                                                                            cs/_build’
no previously-included directories found matching ‘docs/_build/_sources’
zip_safe flag not set; analyzing archive contents…
pip: module references __file__
Adding pip 0.5.1 to easy-install.pth file
Installing pip script to /home/hdknr/.virtualenvs/mobile/bin

Installed /home/hdknr/.virtualenvs/mobile/lib/python2.5/site-packages/pip-0.5.1-                                                                                                                                                                            py2.5.egg
Processing dependencies for pip
Finished processing dependencies for pip
(mobile)hdknr@debuniid:~/.virtualenvs/mobile/src$ easy_install MySQL-python
Searching for MySQL-python
Reading http://pypi.python.org/simple/MySQL-python/
Reading http://sourceforge.net/projects/mysql-python
Best match: MySQL-python 1.2.3c1
Downloading http://pypi.python.org/packages/2.5/M/MySQL-python/MySQL_python-1.2.                                                                                                                                                                            3c1-py2.5-linux-i686.egg#md5=1efcbed6f1f29acd50993f54109938d3
Processing MySQL_python-1.2.3c1-py2.5-linux-i686.egg
Moving MySQL_python-1.2.3c1-py2.5-linux-i686.egg to /home/hdknr/.virtualenvs/mobile/lib/python2.5/site-packages
Adding MySQL-python 1.2.3c1 to easy-install.pth file

Installed /home/hdknr/.virtualenvs/mobile/lib/python2.5/site-packages/MySQL_python-1.2.3c1-py2.5-linux-i686.egg
Processing dependencies for MySQL-python
Finished processing dependencies for MySQL-python
(mobile)hdknr@debuniid:~/.virtualenvs/mobile/src$ pip install Django
Downloading/unpacking Django
  Downloading Django-1.1.1.tar.gz (5.6Mb): 5.6Mb downloaded
  Running setup.py egg_info for package Django
Installing collected packages: Django
  Running setup.py install for Django
    changing mode of build/scripts-2.5/django-admin.py from 644 to 755
    changing mode of /home/hdknr/.virtualenvs/mobile/bin/django-admin.py to 755
Successfully installed Django

bpmobileを入れてみようとする

(mobile)hdknr@debuniid:~/.virtualenvs/mobile/src$ more requirement.txt
-e svn+http://wsgiuseragentmobile.googlecode.com/svn/trunk/#egg=wsgiuseragentmobile
-e hg+https://hdknr@bitbucket.org/tokibito/django-bpmobile/#egg=django-bpmobile

(mobile)hdknr@debuniid:~/.virtualenvs/mobile/src$ PIP_VIRTUALENV_BASE=$WORKON_HOME pip install -E mobile -r requirement.txt
Obtaining django-bpmobile from hg+https://hdknr@bitbucket.org/tokibito/django-bpmobile/#egg=django-bpmobile (from -r requirement.txt (line 2))
  Cloning hg https://hdknr@bitbucket.org/tokibito/django-bpmobile/ to ./django-bpmobile
  Running setup.py egg_info for package django-bpmobile
Obtaining wsgiuseragentmobile from svn+http://wsgiuseragentmobile.googlecode.com/svn/trunk/#egg=wsgiuseragentmobile (from -r requirement.txt (line 1))
  Checking out http://wsgiuseragentmobile.googlecode.com/svn/trunk/ to ./wsgiuseragentmobile
  Running setup.py egg_info for package wsgiuseragentmobile
    unrecognized .svn/entries format; skipping .
    unrecognized .svn/entries format in
Downloading/unpacking uamobile (from django-bpmobile->-r requirement.txt (line 2))
  Downloading uamobile-0.2.7.tar.gz
  Running setup.py egg_info for package uamobile
Downloading/unpacking IPy (from wsgiuseragentmobile->-r requirement.txt (line 1))
  Downloading IPy-0.64.tar.gz
  Running setup.py egg_info for package IPy
Installing collected packages: django-bpmobile, IPy, uamobile, wsgiuseragentmobile
  Running setup.py develop for django-bpmobile
    Creating /home/hdknr/.virtualenvs/mobile/lib/python2.5/site-packages/django-bpmobile.egg-link (link to .)
    Adding django-bpmobile 0.1 to easy-install.pth file

    Installed /home/hdknr/.virtualenvs/mobile/src/django-bpmobile
  Running setup.py install for IPy
  Running setup.py develop for wsgiuseragentmobile
    unrecognized .svn/entries format; skipping .
    unrecognized .svn/entries format in
    Creating /home/hdknr/.virtualenvs/mobile/lib/python2.5/site-packages/uamobile.egg-link (link to .)
    Adding uamobile 0.2.6dev-r0 to easy-install.pth file

    Installed /home/hdknr/.virtualenvs/mobile/src/wsgiuseragentmobile
  Running setup.py install for uamobile
Successfully installed

(mobile)hdknr@debuniid:~/.virtualenvs/mobile/src$ ls -l
合計 16
drwxr-xr-x 5 hdknr hdknr 4096 2009-10-16 12:39 django-bpmobile
-rw-r–r– 1 hdknr hdknr 1832 2009-10-16 12:37 pip-log.txt
-rw-r–r– 1 hdknr hdknr  165 2009-10-16 12:25 requirement.txt
drwxr-xr-x 8 hdknr hdknr 4096 2009-10-16 12:39 wsgiuseragentmobile

(mobile)hdknr@debuniid:~/.virtualenvs/mobile/src$ pip install -r django-bpmobile/requirements.txt
Downloading/unpacking zenhan==0.4 (from -r django-bpmobile/requirements.txt (line 2))
  Downloading zenhan-0.4.tar.gz
  Running setup.py egg_info for package zenhan
Exception:
Traceback (most recent call last):
  File "/home/hdknr/.virtualenvs/mobile/lib/python2.5/site-packages/pip-0.5.1-py2.5.egg/pip.py", line 295, in main
    self.run(options, args)
  File "/home/hdknr/.virtualenvs/mobile/lib/python2.5/site-packages/pip-0.5.1-py2.5.egg/pip.py", line 479, in run
    requirement_set.install_files(finder, force_root_egg_info=self.bundle)
  File "/home/hdknr/.virtualenvs/mobile/lib/python2.5/site-packages/pip-0.5.1-py2.5.egg/pip.py", line 1926, in install_files
    if req_to_install.check_if_exists():
  File "/home/hdknr/.virtualenvs/mobile/lib/python2.5/site-packages/pip-0.5.1-py2.5.egg/pip.py", line 1768, in check_if_exists
    dist = pkg_resources.get_distribution(self.req)
  File "/home/hdknr/.virtualenvs/mobile/lib/python2.5/site-packages/setuptools-0.6c9-py2.5.egg/pkg_resources.py", line 270, in get_distribution
    if isinstance(dist,Requirement): dist = get_provider(dist)
  File "/home/hdknr/.virtualenvs/mobile/lib/python2.5/site-packages/setuptools-0.6c9-py2.5.egg/pkg_resources.py", line 156, in get_provider
    return working_set.find(moduleOrReq) or require(str(moduleOrReq))[0]
  File "/home/hdknr/.virtualenvs/mobile/lib/python2.5/site-packages/setuptools-0.6c9-py2.5.egg/pkg_resources.py", line 423, in find
    raise VersionConflict(dist,req)     # XXX add more info
VersionConflict: (uamobile 0.2.6dev-r0 (/home/hdknr/.virtualenvs/mobile/src/wsgiuseragentmobile), Requirement.parse(‘uamobile==0.2.7’))

Storing complete log in ./pip-log.txt

なので、明示的に入れたwsgiuseragentmobile を削除る。

(mobile)hdknr@debuniid:~/.virtualenvs/mobile/src$ rm -rf ../lib/python2.5/site-packages/uamobile*
(mobile)hdknr@debuniid:~/.virtualenvs/mobile/src$ rm -rf wsgiuseragentmobile/

リトライ

(mobile)hdknr@debuniid:~/.virtualenvs/mobile/src$ pip install -r django-bpmobile/requirements.txt
Downloading/unpacking zenhan==0.4 (from -r django-bpmobile/requirements.txt (line 2))
  Running setup.py egg_info for package zenhan
Downloading/unpacking uamobile==0.2.7 (from -r django-bpmobile/requirements.txt (line 1))
  Downloading uamobile-0.2.7.tar.gz
  Running setup.py egg_info for package uamobile
Requirement already satisfied: IPy in /home/hdknr/.virtualenvs/mobile/lib/python2.5/site-packages (from uamobile==0.2.7->-r django-bpmobile/requirements.txt (line 1))
Installing collected packages: IPy, uamobile, zenhan
  Running setup.py install for zenhan
  Running setup.py install for uamobile
Successfully installed

(mobile)hdknr@debuniid:~/.virtualenvs/mobile/src$ python
Python 2.5.4 (r254:67916, Sep 26 2009, 08:19:36)
[GCC 4.3.4] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import uamobile
>>> uamobile.__file__
‘/home/hdknr/.virtualenvs/mobile/lib/python2.5/site-packages/uamobile/__init__.pyc’

カテゴリー: 未分類 パーマリンク

コメントを残す

以下に詳細を記入するか、アイコンをクリックしてログインしてください。

WordPress.com ロゴ

WordPress.com アカウントを使ってコメントしています。 ログアウト / 変更 )

Twitter 画像

Twitter アカウントを使ってコメントしています。 ログアウト / 変更 )

Facebook の写真

Facebook アカウントを使ってコメントしています。 ログアウト / 変更 )

Google+ フォト

Google+ アカウントを使ってコメントしています。 ログアウト / 変更 )

%s と連携中