[python-bugzilla] [PATCH] Add contrib scripts and relevant

Cole Robinson crobinso at redhat.com
Tue Nov 12 14:33:21 UTC 2013


On 11/10/2013 06:44 PM, Arun Neelicattu wrote:
> hmm, hard to say for sure however, I reckon it has got something to do with the pip version available
> 
> It seems to be using the source for pip from:
>> /usr/lib/python2.7/s...ort/pip-1.0.2.tar.gz
> 
> Not sure if this is the issue, but it could be that the 1.0.2 version was not python 3 ready?
> 

Ah, good call. I had some really old cache there, you can tell I don't use
pip/virtualenv much :)

> Also I noted this change in the activate-dev-env script:
> -            pip install -qr "${REQ}"
> +            pip install -qr "${REQ}" || exit 1
> 
> That might not be a good idea as we are sourcing the script. This will kill the shell.
> 

Without that, when the python3 init failed, the script continued on and ran
the tests as usual, which all pass since we were still running in the python2
env, which was quite misleading. There may be a better place to stick the
'exit 1' or similar.

Thanks,
Cole

> 
> ----- Original Message -----
>> From: "Cole Robinson" <crobinso at redhat.com>
>> To: "Arun Neelicattu" <abn at redhat.com>, "python-bugzilla user/developer list"
>> <python-bugzilla at lists.fedorahosted.org>
>> Sent: Sunday, November 10, 2013 5:19:16 AM
>> Subject: Re: [python-bugzilla] [PATCH] Add contrib scripts and relevant
>>
>>> From: Arun Babu Neelicattu <abn at redhat.com>
>>>
>>> ---
>>>  .gitignore               |  3 +++
>>>  HACKING                  | 47 +++++++++++++++++++++++++++++++------
>>>  contrib/activate-dev-env | 60
>>>  ++++++++++++++++++++++++++++++++++++++++++++++++
>>>  contrib/run-tests        | 21 +++++++++++++++++
>>>  setup.py                 |  2 +-
>>>  5 files changed, 125 insertions(+), 8 deletions(-)
>>>  create mode 100644 contrib/activate-dev-env
>>>  create mode 100755 contrib/run-tests
>>
>> Thanks, I've pushed this now. But I'm hitting an issue with
>> contrib/run-tests.
>> The python2 virtualenv setup works, but the python3 one fails:
>>
>> INFO: Running tests for python3
>> INFO: Creating virtualenv dev-env-python3
>> Running virtualenv with interpreter /usr/bin/python3
>> New python executable in dev-env-python3/bin/python3
>> Also creating executable in dev-env-python3/bin/python
>> A globally installed setuptools was found (in
>> /usr/lib/python3.3/site-packages)
>> Use the --no-site-packages option to use distribute in the virtualenv.
>> Installing
>> distribute..................................................................................................................................................................................................................................................................................................................................................................................................done.
>> Installing pip....
>>   Complete output from command /home/crobinso/src/p...-python3/bin/python3
>> /home/crobinso/src/p...on3/bin/easy_install
>> /usr/lib/python2.7/s...ort/pip-1.0.2.tar.gz:
>>   /home/crobinso/src/python-bugzilla/dev-env-python3/bin/python3: can't open
>> file '/home/crobinso/src/python-bugzilla/dev-env-python3/bin/easy_install':
>> [Errno 2] No such file or directory
>> ----------------------------------------
>> ...Installing pip...done.
>> Traceback (most recent call last):
>>   File
>> "/usr/lib/python2.7/site-packages/virtualenv-1.6.4-py2.7.egg/virtualenv.py",
>> line 1952, in <module>
>>     main()
>>   File
>> "/usr/lib/python2.7/site-packages/virtualenv-1.6.4-py2.7.egg/virtualenv.py",
>> line 810, in main
>>     never_download=options.never_download)
>>   File
>> "/usr/lib/python2.7/site-packages/virtualenv-1.6.4-py2.7.egg/virtualenv.py",
>> line 912, in create_environment
>>     install_pip(py_executable, search_dirs=search_dirs,
>> never_download=never_download)
>>   File
>> "/usr/lib/python2.7/site-packages/virtualenv-1.6.4-py2.7.egg/virtualenv.py",
>> line 648, in install_pip
>>     filter_stdout=_filter_setup)
>>   File
>> "/usr/lib/python2.7/site-packages/virtualenv-1.6.4-py2.7.egg/virtualenv.py",
>> line 878, in call_subprocess
>>     % (cmd_desc, proc.returncode))
>> OSError: Command /home/crobinso/src/p...-python3/bin/python3
>> /home/crobinso/src/p...on3/bin/easy_install
>> /usr/lib/python2.7/s...ort/pip-1.0.2.tar.gz failed with error code 2
>> INFO: Activating virtualenv at dev-env-python3
>> ./contrib/activate-dev-env: line 24: dev-env-python3/bin/activate: No such
>> file or directory
>>
>> Any ideas?
>>
>> - Cole
>>



More information about the python-bugzilla mailing list