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

Add professor2 #2891

Merged
merged 2 commits into from Mar 13, 2017
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions cmssw-tool-conf.spec
Expand Up @@ -108,6 +108,7 @@ Requires: fftjet-toolfile
Requires: lapack-toolfile
Requires: pyminuit2-toolfile
Requires: professor-toolfile
Requires: professor2-toolfile
Requires: xz-toolfile
Requires: protobuf-toolfile
Requires: lcov-toolfile
Expand Down
29 changes: 29 additions & 0 deletions professor2-toolfile.spec
@@ -0,0 +1,29 @@
### RPM external professor2-toolfile 1.0
Requires: professor2
%prep

%build

%install

mkdir -p %i/etc/scram.d
cat << \EOF_TOOLFILE >%i/etc/scram.d/professor2.xml
<tool name="professor2" version="@TOOL_VERSION@">
<client>
<environment name="PROFESSOR2_BASE" default="@TOOL_ROOT@"/>
</client>
<use name="py2-numpy"/>
<use name="py2-sympy"/>
Copy link
Contributor

Choose a reason for hiding this comment

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

here and elsewhere, the py2-sympy tool won't be directly available - you should depend on py2-pippkgs instead.

Copy link
Contributor

Choose a reason for hiding this comment

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

@davidlange6 , all of the py2-pippkgs tools are also separately available. So it is better to explicitly mention the dependency.

scram tool info py2-sympy
Tool info as configured in location /tmp/muzaffar/CMSSW_9_1_X_2017-03-07-2300
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Name : py2-sympy
Version : 1.0
++++++++++++++++++++
SCRAM_PROJECT=no
USE=py2-pippkgs

<use name="py2-matplotlib"/>
<use name="root"/>
<use name="cython"/>
<use name="yoda"/>
<use name="eigen"/>
<runtime name="PATH" value="$PROFESSOR2_BASE/bin" type="path"/>
<runtime name="PYTHONPATH" value="$PROFESSOR2_BASE/lib/python@PYTHONV@/site-packages" type="path"/>
</tool>
EOF_TOOLFILE

export PYTHONV=$(echo $PYTHON_VERSION | cut -f1,2 -d.)

## IMPORT scram-tools-post
16 changes: 16 additions & 0 deletions professor2.spec
@@ -0,0 +1,16 @@
### RPM external professor2 2.2.1
## INITENV +PATH PYTHONPATH %i/lib/python`echo $PYTHON_VERSION | cut -d. -f 1,2`/site-packages
Source: http://www.hepforge.org/archive/professor/Professor-%{realversion}.tar.gz

Requires: py2-numpy py2-sympy py2-matplotlib root cython yoda eigen
%prep
%setup -n Professor-%{realversion}

%build
make CPPFLAGS=-I${EIGEN_ROOT}/include/eigen3

%install
make install PREFIX=%{i}

find %{i} -type f -exec sed -ideleteme '1 { s|^#!.*/bin/python|#!/usr/bin/env python| }' {} \;
find %{i} -name '*deleteme' -delete