install python module to site-dir (ROOT-3316)#73
install python module to site-dir (ROOT-3316)#73xantares wants to merge 1 commit intoroot-project:masterfrom xantares:bugfix/ROOT-3316
Conversation
|
@wlav should have a look as he seemed to have good reasons against such a change on https://sft.its.cern.ch/jira/browse/ROOT-3316. |
|
Hi, yes, my objections are all documented in that jira report. I strongly Best regards, On Thursday 2015-09-03 05:08, Axel Naumann wrote:
WLavrijsen@lbl.gov -- +1 (510) 486 6411 -- www.lavrijsen.net |
|
hello @wlav, I was confused to have to set PYTHONPATH in the first place, like Andy was :) Forgive me but your objections do not seem rock-solid:
regards |
|
Hi, On Thursday 2015-09-03 10:56, xantares wrote:
sure, on Linux. Did you try all main platforms? (And do add at least p2.5,
A package manager can install wherever it wants and can make its own So the only upside there seems to be is removing of this teeny-weeny Debugging a setup problem is very time consuming and frustrating: the In sum, I see no upside to speak of, but do see enormous downsides. And Best regards, WimWLavrijsen@lbl.gov -- +1 (510) 486 6411 -- www.lavrijsen.net |
|
@wlav A) it's also valid when installing as user to ~/.local (like when you install a python module with --user) As for the downsides, I think this solution is just simpler (not mentioning cleaner), maybe this will get you less bug reports. |
|
Hi, very last time and then I give up ...
But they do.
Ugly scripts that are seldom seen. I care more about humans than computers.
Straight of the bat, the whole nightly build system would roll over and Like I said, this is my last word on it. It's not worth my time if you Best regards, WimWLavrijsen@lbl.gov -- +1 (510) 486 6411 -- www.lavrijsen.net |
For small unit tests like the RooFit pythonization tests, the overhead
of starting the Python interpreter is dominant. That means the tests
should not be too granular. I think testing the RooFit pythonizations
with separate Python executions at the level of the different RooFit
classes was indeed too granular. Therefore, this commit suggests to have
a single RooFit pythonization unit test.
Running the unit tests before (single thread):
```txt
Test project /home/rembserj/code/root/root_build/bindings/pyroot/pythonizations/test
Start 64: pyunittests-bindings-pyroot-pythonizations-pyroot-roofit-rooabscollection
1/14 Test root-project#64: pyunittests-bindings-pyroot-pythonizations-pyroot-roofit-rooabscollection ....... Passed 1.09 sec
Start 65: pyunittests-bindings-pyroot-pythonizations-pyroot-roofit-rooabspdf-fitto
2/14 Test root-project#65: pyunittests-bindings-pyroot-pythonizations-pyroot-roofit-rooabspdf-fitto ........ Passed 1.13 sec
Start 66: pyunittests-bindings-pyroot-pythonizations-pyroot-roofit-rooabsreal-ploton
3/14 Test root-project#66: pyunittests-bindings-pyroot-pythonizations-pyroot-roofit-rooabsreal-ploton ...... Passed 1.14 sec
Start 67: pyunittests-bindings-pyroot-pythonizations-pyroot-roofit-rooarglist
4/14 Test root-project#67: pyunittests-bindings-pyroot-pythonizations-pyroot-roofit-rooarglist ............. Passed 0.93 sec
Start 68: pyunittests-bindings-pyroot-pythonizations-pyroot-roofit-roocmdarg
5/14 Test root-project#68: pyunittests-bindings-pyroot-pythonizations-pyroot-roofit-roocmdarg .............. Passed 0.95 sec
Start 69: pyunittests-bindings-pyroot-pythonizations-pyroot-roofit-roodatahist-numpy
6/14 Test root-project#69: pyunittests-bindings-pyroot-pythonizations-pyroot-roofit-roodatahist-numpy ...... Passed 1.32 sec
Start 70: pyunittests-bindings-pyroot-pythonizations-pyroot-roofit-roodatahist-ploton
7/14 Test root-project#70: pyunittests-bindings-pyroot-pythonizations-pyroot-roofit-roodatahist-ploton ..... Passed 1.09 sec
Start 71: pyunittests-bindings-pyroot-pythonizations-pyroot-roofit-roodataset
8/14 Test root-project#71: pyunittests-bindings-pyroot-pythonizations-pyroot-roofit-roodataset ............. Passed 1.03 sec
Start 72: pyunittests-bindings-pyroot-pythonizations-pyroot-roofit-roodataset-numpy
9/14 Test root-project#72: pyunittests-bindings-pyroot-pythonizations-pyroot-roofit-roodataset-numpy ....... Passed 1.70 sec
Start 73: pyunittests-bindings-pyroot-pythonizations-pyroot-roofit-rooglobalfunc
10/14 Test root-project#73: pyunittests-bindings-pyroot-pythonizations-pyroot-roofit-rooglobalfunc .......... Passed 1.21 sec
Start 74: pyunittests-bindings-pyroot-pythonizations-pyroot-roofit-roojsonfactorywstool
11/14 Test root-project#74: pyunittests-bindings-pyroot-pythonizations-pyroot-roofit-roojsonfactorywstool ... Passed 1.40 sec
Start 75: pyunittests-bindings-pyroot-pythonizations-pyroot-roofit-roolinkedlist
12/14 Test root-project#75: pyunittests-bindings-pyroot-pythonizations-pyroot-roofit-roolinkedlist .......... Passed 0.87 sec
Start 76: pyunittests-bindings-pyroot-pythonizations-pyroot-roofit-roosimultaneous
13/14 Test root-project#76: pyunittests-bindings-pyroot-pythonizations-pyroot-roofit-roosimultaneous ........ Passed 1.09 sec
Start 77: pyunittests-bindings-pyroot-pythonizations-pyroot-roofit-rooworkspace
14/14 Test root-project#77: pyunittests-bindings-pyroot-pythonizations-pyroot-roofit-rooworkspace ........... Passed 1.21 sec
100% tests passed, 0 tests failed out of 14
Label Time Summary:
python = 16.16 sec*proc (14 tests)
python_runtime_deps = 3.02 sec*proc (2 tests)
Total Test time (real) = 16.17 sec
```
With this commit:
```txt
Test project /home/rembserj/code/root/root_build/bindings/pyroot/pythonizations/test
Start 64: pyunittests-bindings-pyroot-pythonizations-pyroot-roofit
1/1 Test root-project#64: pyunittests-bindings-pyroot-pythonizations-pyroot-roofit ... Passed 3.27 sec
100% tests passed, 0 tests failed out of 1
Label Time Summary:
python = 3.27 sec*proc (1 test)
Total Test time (real) = 3.27 sec
```
For small unit tests like the RooFit pythonization tests, the overhead
of starting the Python interpreter is dominant. That means the tests
should not be too granular. I think testing the RooFit pythonizations
with separate Python executions at the level of the different RooFit
classes was indeed too granular. Therefore, this commit suggests to have
a single RooFit pythonization unit test.
Running the unit tests before (single thread):
```txt
Test project /home/rembserj/code/root/root_build/bindings/pyroot/pythonizations/test
Start 64: pyunittests-bindings-pyroot-pythonizations-pyroot-roofit-rooabscollection
1/14 Test #64: pyunittests-bindings-pyroot-pythonizations-pyroot-roofit-rooabscollection ....... Passed 1.09 sec
Start 65: pyunittests-bindings-pyroot-pythonizations-pyroot-roofit-rooabspdf-fitto
2/14 Test #65: pyunittests-bindings-pyroot-pythonizations-pyroot-roofit-rooabspdf-fitto ........ Passed 1.13 sec
Start 66: pyunittests-bindings-pyroot-pythonizations-pyroot-roofit-rooabsreal-ploton
3/14 Test #66: pyunittests-bindings-pyroot-pythonizations-pyroot-roofit-rooabsreal-ploton ...... Passed 1.14 sec
Start 67: pyunittests-bindings-pyroot-pythonizations-pyroot-roofit-rooarglist
4/14 Test #67: pyunittests-bindings-pyroot-pythonizations-pyroot-roofit-rooarglist ............. Passed 0.93 sec
Start 68: pyunittests-bindings-pyroot-pythonizations-pyroot-roofit-roocmdarg
5/14 Test #68: pyunittests-bindings-pyroot-pythonizations-pyroot-roofit-roocmdarg .............. Passed 0.95 sec
Start 69: pyunittests-bindings-pyroot-pythonizations-pyroot-roofit-roodatahist-numpy
6/14 Test #69: pyunittests-bindings-pyroot-pythonizations-pyroot-roofit-roodatahist-numpy ...... Passed 1.32 sec
Start 70: pyunittests-bindings-pyroot-pythonizations-pyroot-roofit-roodatahist-ploton
7/14 Test #70: pyunittests-bindings-pyroot-pythonizations-pyroot-roofit-roodatahist-ploton ..... Passed 1.09 sec
Start 71: pyunittests-bindings-pyroot-pythonizations-pyroot-roofit-roodataset
8/14 Test #71: pyunittests-bindings-pyroot-pythonizations-pyroot-roofit-roodataset ............. Passed 1.03 sec
Start 72: pyunittests-bindings-pyroot-pythonizations-pyroot-roofit-roodataset-numpy
9/14 Test #72: pyunittests-bindings-pyroot-pythonizations-pyroot-roofit-roodataset-numpy ....... Passed 1.70 sec
Start 73: pyunittests-bindings-pyroot-pythonizations-pyroot-roofit-rooglobalfunc
10/14 Test #73: pyunittests-bindings-pyroot-pythonizations-pyroot-roofit-rooglobalfunc .......... Passed 1.21 sec
Start 74: pyunittests-bindings-pyroot-pythonizations-pyroot-roofit-roojsonfactorywstool
11/14 Test #74: pyunittests-bindings-pyroot-pythonizations-pyroot-roofit-roojsonfactorywstool ... Passed 1.40 sec
Start 75: pyunittests-bindings-pyroot-pythonizations-pyroot-roofit-roolinkedlist
12/14 Test #75: pyunittests-bindings-pyroot-pythonizations-pyroot-roofit-roolinkedlist .......... Passed 0.87 sec
Start 76: pyunittests-bindings-pyroot-pythonizations-pyroot-roofit-roosimultaneous
13/14 Test #76: pyunittests-bindings-pyroot-pythonizations-pyroot-roofit-roosimultaneous ........ Passed 1.09 sec
Start 77: pyunittests-bindings-pyroot-pythonizations-pyroot-roofit-rooworkspace
14/14 Test #77: pyunittests-bindings-pyroot-pythonizations-pyroot-roofit-rooworkspace ........... Passed 1.21 sec
100% tests passed, 0 tests failed out of 14
Label Time Summary:
python = 16.16 sec*proc (14 tests)
python_runtime_deps = 3.02 sec*proc (2 tests)
Total Test time (real) = 16.17 sec
```
With this commit:
```txt
Test project /home/rembserj/code/root/root_build/bindings/pyroot/pythonizations/test
Start 64: pyunittests-bindings-pyroot-pythonizations-pyroot-roofit
1/1 Test #64: pyunittests-bindings-pyroot-pythonizations-pyroot-roofit ... Passed 3.27 sec
100% tests passed, 0 tests failed out of 1
Label Time Summary:
python = 3.27 sec*proc (1 test)
Total Test time (real) = 3.27 sec
```
This patch installs python modules to python site-dir standard location (see some doc here:https://docs.python.org/2/library/site.html), see https://sft.its.cern.ch/jira/browse/ROOT-3316
It avoids to have to set PYTHONPATH when installing to a system folder /usr or /usr/local, and even the user site-dir ~/.local
Packaging may have to be reworked though (https://www.debian.org/doc/packaging-manuals/python-policy/ch-python.html#s-paths)