Hello, On 30 juin 09:41, Den Ben wrote: > Hello,I'm trying to get pylint set up on Jenkins (Hudson) and am having > issues getting it to work completely. > I have a configuration that will execute successfully and display the main > report in jenkins, but the links to view the pylint errors in the actual > modules are built incorrectly. This is because the jenkins workspace is not > the same as the python root directory. > So I'm trying to figure out how to configure it so it will run only in my > webroot, and the links will format from the webroot as well. > Here's an example of my workspace: > $WORKSPACE (is the jenkins variable for my build's workspace). > The actual python source root folder is in the src folder:ie: > $WORKSPACE/trunk/www/source > So if I run this:cd $WORKSPACE find -iname "*.py" | xargs pylint > --rcfile=.pylintrc -f parseable $WORKSPACE/trunk | tee $WORKSPACE/pylint.out > then the pylint report works, and the links work in the report, but it causes > false import errors in all the modules within the source folder pylint must > be validating the imports based on it's relativity to the trunk folder (and > it's running pylint outside of the source folder which I don't care about). > So I tried this configuration:cd $WORKSPACE/trunk/www/source find -iname > "*.py" | xargs pylint --rcfile=.pylintrc -f parseable > $WORKSPACE/trunk/www/source | tee $WORKSPACE/trunk/www/source/pylint.out > and the report builds correctly, and it only reads from the source folder - > as I want, but the links don't work, the module's pylint reports aren't where > the links are pointing. I'm not sure why. > Does anyone have a possible configuration solution to this?
I'm not sure to understand your problem. Would you give an example of the output you get and the one you would expect? Regarding your first attempt, I suppose it doesn't work because you rely on the current working directory to get proper python path. Pylint **requires** proper python path to properly resolves import. You might want to try by setting PYTHONPATH environment variable explicitly. -- Sylvain Thénault, LOGILAB, Paris (01.45.32.03.12) - Toulouse (05.62.17.16.42) Formations Python, Debian, Méth. Agiles: http://www.logilab.fr/formations Développement logiciel sur mesure: http://www.logilab.fr/services CubicWeb, the semantic web framework: http://www.cubicweb.org _______________________________________________ Python-Projects mailing list Python-Projects@lists.logilab.org http://lists.logilab.org/mailman/listinfo/python-projects