Commit 15a9e5c
Fix env duplication on merged-usr systems (#200)
On modern (merged-usr) Linux systems, `/bin`, `/sbin` and `/usr/sbin`
are symlinks to `/usr/bin`. There is no point in reporting the same
Python installation four times, so canonicalize search paths before
searching.
Before:
Breakdown for finding Environments:
-----------------------------------
GlobalVirtualEnvs : 17.412201ms
Locators : 225.284494ms
Path : 433.162905ms
Workspaces : 2.161556ms
Environments (41):
------------------
GlobalPaths : 14
LinuxGlobal : 16
VirtualEnvWrapper : 11
After:
Breakdown for finding Environments:
-----------------------------------
GlobalVirtualEnvs : 16.595382ms
Locators : 223.759511ms
Path : 313.276036ms
Workspaces : 1.418024ms
Environments (21):
------------------
GlobalPaths : 2
LinuxGlobal : 8
VirtualEnvWrapper : 11
---------
Co-authored-by: Karthik Nadig <[email protected]>1 parent d5b5bb0 commit 15a9e5c
File tree
3 files changed
+23
-47
lines changed- crates
- pet-env-var-path/src
- pet-linux-global-python/src
- pet/tests
3 files changed
+23
-47
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
| 6 | + | |
5 | 7 | | |
6 | 8 | | |
7 | 9 | | |
| |||
16 | 18 | | |
17 | 19 | | |
18 | 20 | | |
19 | | - | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
20 | 24 | | |
21 | 25 | | |
22 | | - | |
| 26 | + | |
23 | 27 | | |
24 | 28 | | |
25 | 29 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
41 | 48 | | |
42 | | - | |
| 49 | + | |
43 | 50 | | |
44 | | - | |
| 51 | + | |
45 | 52 | | |
46 | 53 | | |
47 | 54 | | |
| |||
103 | 110 | | |
104 | 111 | | |
105 | 112 | | |
106 | | - | |
| 113 | + | |
107 | 114 | | |
108 | 115 | | |
109 | 116 | | |
110 | | - | |
| 117 | + | |
111 | 118 | | |
112 | 119 | | |
113 | 120 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | 74 | | |
89 | 75 | | |
90 | | - | |
| 76 | + | |
91 | 77 | | |
92 | 78 | | |
93 | 79 | | |
94 | 80 | | |
95 | | - | |
96 | | - | |
97 | | - | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
98 | 84 | | |
99 | 85 | | |
100 | 86 | | |
| |||
112 | 98 | | |
113 | 99 | | |
114 | 100 | | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | 101 | | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | | - | |
| 102 | + | |
138 | 103 | | |
139 | 104 | | |
140 | 105 | | |
| |||
0 commit comments