Skip to content

Commit

Permalink
Always use python2.7 for python binary alias
Browse files Browse the repository at this point in the history
  • Loading branch information
smcmahon committed Jul 18, 2016
1 parent d9d205d commit 8e10947
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
11 changes: 9 additions & 2 deletions HISTORY.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
Unreleased
1.2.10 (unreleased)

- Use the same alias for Python in both 4.x and 5.x, python2.7.
This only matters for tests.
[smcmahon]

- The way we use become_user is problematic for Ansible 2.1 unless pipelining is in use.
Set pipelining on in defaults.
[smcmahon]

- Symbolic link to self for testing fouled up vagrant on platforms without client extensions.
Change strategy to use ansible.cfg specification for roles.
[smcmahon]


1.2.9 2016-07-08

- Update to use Plone 5.0.5 as default.
Expand Down
4 changes: 2 additions & 2 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
mode=0755

- name: Python virtualenv
command: "{{ virtualenv_path | default() }}virtualenv --python={{ plone_python_path }} {{ instance_config.plone_target_path }}/Python-{{ plone_python_version }} \
command: "{{ virtualenv_path | default() }}virtualenv --python={{ plone_python_path }} {{ instance_config.plone_target_path }}/python{{ plone_python_version }} \
creates={{ instance_config.plone_target_path }}/Python-{{ plone_python_version }}"
when: instance_config.plone_version < '5.0'

Expand Down Expand Up @@ -218,7 +218,7 @@

# Plone < 5.0; use bootstrap
- name: Bootstrap buildout
command: ../Python-{{ plone_python_version }}/bin/python bootstrap.py --setuptools-version=8.0.4
command: ../Python-{{ plone_python_version }}/bin/python{{ plone_python_version }} bootstrap.py --setuptools-version=8.0.4
creates={{ plone_instance_home }}/bin/buildout
chdir={{ plone_instance_home }}
when: instance_config.plone_version < '5.0' and buildout_status.stat.exists == False
Expand Down

5 comments on commit 8e10947

@djowett
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@smcmahon This fails on 4.3 for me at line 220. I'm testing it now, but I think you need to replace the remaining "Python-" with "python" on lines 67 and especially 221.

@MrTango
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you please provide a trace ;)
Don't you have the python2.7 in the bin?
Which system do you use?

@djowett
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TASK [plone.plone_server : Bootstrap buildout] *********************************
fatal: [plone11]: FAILED! => {"changed": false, "cmd": "../Python-2.7/bin/python2.7 bootstrap.py --setuptools-version=8.0.4", "failed": true, "msg": "[Errno 2] No such file or directory", "rc": 2}

  1. Yes
  2. No - I have ../python2.7/ rather than ../Python-2.7
  3. Ubuntu

patch will come, but I'm trying to push something out quick at the mo

@Gomez
Copy link
Member

@Gomez Gomez commented on 8e10947 Jul 22, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can confirm, got the same problem. Change to ../python27 fixed the run.

@djowett
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @Gomez

My fix is in #92

I'm now getting an error like this (within Ansible), do you see that? Or know what to do?

$ sudo -u plone_buildout ../python2.7/bin/python2.7 bootstrap.py --setuptools-version=8.0.4
error: None
Traceback (most recent call last):
  File "bootstrap.py", line 172, in <module>
    "Failed to execute command:\n%s" % repr(cmd)[1:-1])
Exception: Failed to execute command:
'/usr/local/plone-4.3/highfields/../python2.7/bin/python2.7', '-c', 'from setuptools.command.easy_install import main; main()', '-mZqNxd', '/tmp/tmpnwlSux', 'zc.buildout==2.5.2'

Please sign in to comment.