Pregunta

I'm suddenly having trouble building my Python/Django app on dotcloud. It seems that MySQL-python needs distribute >= 0.6.28. My requirements.txt specifies distribute==0.6.36, but this is being ignored. Dotcloud seems to be using 0.6.10 instead. Is there a way to upgrade the distribute package being used?

requirements.txt

Django==1.5.1
MySQL-python==1.2.4
PIL==1.1.7
Pygments==1.6
South==0.7.6
anyjson==0.3.3
boto==2.8.0
distribute==0.6.36
django-background-task==0.1.6
django-extensions==1.1.1
django-mptt==0.5.5
django-social-auth==0.7.22
django-storages==1.1.8
django-tinymce==1.5.1b4
djangorestframework==2.2.6
docutils==0.10
httplib2==0.8
importlib==1.0.2
oauth2==1.5.211
ordereddict==1.1
python-dateutil==1.5
python-openid==2.2.5
pytz==2013b
selenium==2.32.0
six==1.3.0
wsgiref==0.1.2

builder transcript

16:43:46.608001: [www] I am snapshotsworker_00/ec2-23-22-131-20, and I will be your builder today.
16:44:02.918066: [www] Requirement already satisfied (use --upgrade to upgrade): Django==1.5.1 in /opt/ve/2.6/lib/python2.6/site-packages (from -r requirements.txt (line 1))
16:44:02.918522: [www] Downloading/unpacking MySQL-python==1.2.4 (from -r requirements.txt (line 2))
  Downloading MySQL-python-1.2.4.zip (113Kb): 113Kb downloaded13Kb): 
16:44:23.028019: [www]   Storing download in cache at /home/dotcloud/.pip-cache/http%3A%2F%2Fpypi.python.org%2Fpackages%2Fsource%2FM%2FMySQL-python%2FMySQL-python-1.2.4.zip
16:44:23.028471: [www]   Running setup.py egg_info for package MySQL-python
16:44:23.808020: [www]     The required version of distribute (>=0.6.28) is not available,
16:44:23.808477: [www]     and can't be installed while this script is running. Please
16:44:23.808732: [www]     install a more recent version first, using
16:44:23.808985: [www]     'easy_install -U distribute'.
16:44:23.809487: [www]     (Currently using distribute 0.6.10 (/opt/ve/2.6/lib/python2.6/site-packages))
16:44:23.828053: [www]     Complete output from command python setup.py egg_info:
16:44:23.828490: [www]     The required version of distribute (>=0.6.28) is not available,
16:44:23.828999: [www] and can't be installed while this script is running. Please
16:44:23.829503: [www] install a more recent version first, using
16:44:23.830016: [www] 'easy_install -U distribute'.
16:44:23.831304: [www] (Currently using distribute 0.6.10 (/opt/ve/2.6/lib/python2.6/site-packages))
16:44:23.832167: [www] ----------------------------------------
16:44:23.832633: [www] Command python setup.py egg_info failed with error code 2 in /opt/ve/2.6/build/MySQL-python
16:44:23.833106: [www] Storing complete log in /home/dotcloud/.pip/pip.log
16:44:24.598341: [www] -- Build failed: "/home/dotcloud/env/bin/pip install --download-cache=~/.pip-cache -r requirements.txt" failed with return code 1
16:44:24.677501: [www] Build failed for service (www)
¿Fue útil?

Solución

I found a workaround using a pre-build hook. The easy_install suggestion given in the builder transcript didn't work, but it did work with pip. Here are the details.

dotcloud.yml

www:
  type: python
  prebuild: ./prebuild
db:
  type: mysql

prebuild (chmod +x)

pip install --upgrade distribute==0.6.36
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top