Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python via pip in cmsdist #2678

Merged
merged 11 commits into from Dec 1, 2016

Conversation

davidlange6
Copy link
Contributor

Introduce the ability to build python packages from pip. More testing is certainly needed, however current implementation checks for any dependencies being installed by pip and fails in the case that there are (so still a one to one mapping of python package to spec file).

Two examples are added (py2-configparser and py2-entrypoints) that confirm that dependencies are handled correctly (both are part of the stack of dependencies that jupiter depends on).

The main outstanding issue is to retain the source somehow..

Otherwise, I add rootpy (which I will eventually change to install via pip...)

@cmsbuild
Copy link
Contributor

A new Pull Request was created by @davidlange6 (David Lange) for branch IB/CMSSW_9_0_X/gcc530.

@cmsbuild, @smuzaffar, @iahmad-khan, @davidlange6 can you please review it and eventually sign? Thanks.
You can sign-off by replying to this message having '+1' in the first line of your reply.
You can reject by replying to this message having '-1' in the first line of your reply.

%build

pip list
pip install --no-deps -t %{i}/$PYTHON_LIB_SITE_PACKAGES %{my_name}==%{realversion}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@davidlange6 , try the following. It allows pip to use our py2 tools

export PYTHONUSERBASE=%i
pip list
pip install --user %{my_name}==%{realversion}

and pip sysy

+ pip install --user entrypoints==0.2.2
Collecting entrypoints==0.2.2
  Using cached entrypoints-0.2.2-py2.py3-none-any.whl
Requirement already satisfied: configparser>=3.5; python_version == "2.7" in /var/build/muz/pip/w/slc6_amd64_gcc530/external/py2-configparser/3.5.0/lib/python2.7/site-packages (from entrypoints==0.2.2)
Installing collected packages: entrypoints
Successfully installed entrypoints-0.2.2

@davidlange6
Copy link
Contributor Author

Needs cms-sw/pkgtools#134
@smuzaffar -can you offer more advice for cleaning this up?

@smuzaffar
Copy link
Contributor

@davidlange6 , looks good to me.
Looks like this is going to grow the PYTHONPATH a lot. Should we introduce a meta package for example py2-pip-packages.spec which basically depend on all the py2-* pip based packages and all it does is to rsync py2 packages in on single directory and we make cmssw only depend on this mate package. This way we will have only one directory (for these pip based packages) in PYTHONPATH?

@cmsbuild
Copy link
Contributor

Pull request #2678 was updated.

@smuzaffar
Copy link
Contributor

please test
pkgtools changes are now in, so test should work now

@cmsbuild
Copy link
Contributor

cmsbuild commented Nov 29, 2016

The tests are being triggered in jenkins.
https://cmssdt.cern.ch/jenkins/job/cmsdist-test-pr/420/console

@cmsbuild
Copy link
Contributor

-1

Tested at: b0ab4d4

  • Build:

I found an error when building:

+ eval PKGTOOLS/cmsBuild -i /build/cmsbuild/jenkins-workarea/workspace/cmsdist-test-pr/testBuildDir --repository cms.week1 --arch slc6_amd64_gcc530 -j 24 build py2-rootpy-toolfile cmssw-tool-conf
++ PKGTOOLS/cmsBuild -i /build/cmsbuild/jenkins-workarea/workspace/cmsdist-test-pr/testBuildDir --repository cms.week1 --arch slc6_amd64_gcc530 -j 24 build py2-rootpy-toolfile cmssw-tool-conf
Bootstrapping cmsBuild area.
Done. Setup log can be found in /build/cmsbuild/jenkins-workarea/workspace/cmsdist-test-pr/testBuildDir/tmp/bootstrap.log.
/build/cmsbuild/jenkins-workarea/workspace/cmsdist-test-pr/CMSDIST/py2-notebook.spec
ERROR! File not found: /build/cmsbuild/jenkins-workarea/workspace/cmsdist-test-pr/CMSDIST/py2-notebook.spec


You can see the results of the tests here:
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-2678/420/summary.html

@davidlange6
Copy link
Contributor Author

davidlange6 commented Nov 29, 2016 via email

@smuzaffar
Copy link
Contributor

ok, was going to remind you

@cmsbuild
Copy link
Contributor

Pull request #2678 was updated.

@davidlange6
Copy link
Contributor Author

davidlange6 commented Nov 30, 2016 via email

@cmsbuild
Copy link
Contributor

cmsbuild commented Nov 30, 2016

The tests are being triggered in jenkins.
https://cmssdt.cern.ch/jenkins/job/cmsdist-test-pr/424/console

@cmsbuild
Copy link
Contributor

-1

Tested at: bd3a03e

You can see the results of the tests here:
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-2678/424/summary.html

I found follow errors while testing this PR

Failed tests: UnitTests

  • Unit Tests:

I found errors in the following unit tests:

---> test runtestPythonAnalysis had ERRORS

@cmsbuild
Copy link
Contributor

Comparison job queued.

@cmsbuild
Copy link
Contributor

Comparison is ready
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-2678/424/summary.html

The workflows 1003.0, 1001.0, 1000.0, 140.53, 136.731, 4.22 have different files in step1_dasquery.log than the ones found in the baseline. You may want to check and retrigger the tests if necessary. You can check it in the "files" directory in the results of the comparisons

@davidlange6
Copy link
Contributor Author

davidlange6 commented Nov 30, 2016 via email

@cmsbuild
Copy link
Contributor

cmsbuild commented Nov 30, 2016

The tests are being triggered in jenkins.
Using cmssw from cms-sw/cmssw#16823
https://cmssdt.cern.ch/jenkins/job/cmsdist-cmssw-test-pr/80/console

@cmsbuild
Copy link
Contributor

@cmsbuild
Copy link
Contributor

Comparison job queued.

@davidlange6 davidlange6 merged commit 13e84ca into cms-sw:IB/CMSSW_9_0_X/gcc530 Dec 1, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants