[SERVER-29853] The buildscripts directory should not be a Python package Created: 26/Jun/17 Updated: 06/Dec/22 Resolved: 11/May/20 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Testing Infrastructure |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Yves Duhem | Assignee: | Backlog - Server Tooling and Methods (STM) (Inactive) |
| Resolution: | Won't Fix | Votes: | 0 |
| Labels: | stm, tig-resmoke | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Assigned Teams: |
Server Tooling & Methods
|
| Participants: |
| Description |
|
The buildscripts directory is currently a Python package but doesn't need to be and shouldn't be as it makes path management more complicated. |
| Comments |
| Comment by Ryan Timmons [ 11/May/20 ] |
|
There is currently an _init_.py file in the buildscripts dir; there is little value in doing anything else. |
| Comment by Yves Duhem [ 26/Jun/17 ] |
|
Yes, the directory containing the script (buildscripts) would be added to the path and we should be able to reference all other packages and modules from there (like import resmokelib as you mentioned). |
| Comment by Max Hirschhorn [ 26/Jun/17 ] |
yves.duhem, why wouldn't modifying sys.path be necessary if buildscripts wasn't a package? It seems like running python buildscripte/resmoke.py causes the buildscripts/ directory to be added to sys.path. Would we just need to adjust the from buildscripts import resmokelib-style imports to be import resmokelib? |