[SERVER-22135] pick up python from environment rather from system default path Created: 11/Jan/16  Updated: 05/Feb/16  Resolved: 20/Jan/16

Status: Closed
Project: Core Server
Component/s: Build
Affects Version/s: None
Fix Version/s: 3.3.1

Type: Improvement Priority: Major - P3
Reporter: Valentin Kuznetsov Assignee: Ramon Fernandez Marina
Resolution: Done Votes: 0
Labels: dnsf
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Minor Change
Participants:

 Description   

The python files used in MognoDB source contains #/usr/bin/python clause which force to use system python executable. To use custom python or non-standard location it is better to use #/usr/bin/env python prefix.



 Comments   
Comment by Ramon Fernandez Marina [ 20/Jan/16 ]

Thanks for your pull request vkuznet; your change is now part of the code base and will be included in the next development release, 3.3.1.

Regards,
Ramón.

PS: I patched the FTS scripts, which also were using a hardcoded path, for completeness.

Comment by Githook User [ 20/Jan/16 ]

Author:

{u'name': u'Ramon Fernandez', u'email': u'ramon@mongodb.com'}

Message: SERVER-22135 Take python from environment rather system default path
Branch: master
https://github.com/mongodb/mongo/commit/61a6addc9151f34850641f4eaa11163cfcf58e18

Comment by Githook User [ 15/Jan/16 ]

Author:

{u'username': u'vkuznet', u'name': u'Valentin Kuznetsov', u'email': u'vkuznet@gmail.com'}

Message: SERVER-22135 Take python from environment rather system default path

Signed-off-by: Ramon Fernandez <ramon@mongodb.com>

Closes #1056
Branch: master
https://github.com/mongodb/mongo/commit/5492a19aaf5fb02856cfe7d711c249472f84ccfc

Comment by Ramon Fernandez Marina [ 13/Jan/16 ]

Thanks for signing the contributor agreement vkuznet, we're reviewing the PR now.

Comment by Ramon Fernandez Marina [ 12/Jan/16 ]

Hmmm, I don't see you on the list yet; maybe there's a cache refresh timeout I have to wait for. Will check again tomorrow.

A quick look at your pull request looked good to me; there's the question of the removal of the -u switch in one of the scripts, but we can patch that later.

Comment by Valentin Kuznetsov [ 12/Jan/16 ]

I've signed the contributor agreement.

Comment by Ramon Fernandez Marina [ 11/Jan/16 ]

My apologies vkuznet, I read things too hastily. Before we can accept your contribution you'll need to sign the contributor agreement. Once the agreement is signed we can take a look at the PR details.

Thanks,
Ramón.

Comment by Valentin Kuznetsov [ 11/Jan/16 ]

The issue is note done and neither resolved, don't close it blindly.
Please re-open and investigate.

Comment by Valentin Kuznetsov [ 11/Jan/16 ]

No, the Andrew's solution does not help in that specific case, since all your
python files starts with
#!/usr/bin/python

i.e. explicit path. The common practice in python community to use

#!/usr/bin/env python

and this let's user define which python to use.

Unfortunately, we need to fix manually all MongoDB python files to pick up
correct version of python we need.

Please keep this issue open and investigate.
Best,
Valentin.

Comment by Ramon Fernandez Marina [ 11/Jan/16 ]

vkuznet, does Andrew's explanation on SERVER-22134 should allow you to choose which python to use, so I'm resolving this ticket. Please let me know if that's not the case.

Regards,
Ramón.

Comment by Valentin Kuznetsov [ 11/Jan/16 ]

Proposed fix: https://github.com/mongodb/mongo/pull/1056

Generated at Thu Feb 08 03:59:29 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.