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

adds py2-pippkgs to manage pip based python packages #2720

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion cmssw-tool-conf.spec
Expand Up @@ -172,7 +172,7 @@ Requires: md5-toolfile
Requires: py2-setuptools-toolfile
Requires: madgraph5amcatnlo-toolfile
Requires: histogrammar-toolfile
Requires: py2-rootpy-toolfile
Requires: py2-pippkgs-toolfile
#still a work in progress Requires: py2-notebook

# Only for Linux platform.
Expand Down
22 changes: 22 additions & 0 deletions py2-pippkgs-toolfile.spec
@@ -0,0 +1,22 @@
### RPM external py2-pippkgs-toolfile 1.0
Requires: py2-pippkgs
BuildRequires: python
%prep

%build

%install

mkdir -p %{i}/etc/scram.d
cat << \EOF_TOOLFILE >%{i}/etc/scram.d/py2-pippkgs.xml
<tool name="py2-pippkgs" version="@TOOL_VERSION@">
<client>
<environment name="PY2_PIPPKGS" default="@TOOL_ROOT@"/>
</client>
<runtime name="PYTHONPATH" value="$PY2_PIPPKGS/@PYTHON_LIB_SITE_PACKAGES@" type="path"/>
</tool>
EOF_TOOLFILE

export PYTHON_LIB_SITE_PACKAGES

## IMPORT scram-tools-post
29 changes: 29 additions & 0 deletions py2-pippkgs.spec
@@ -0,0 +1,29 @@
### RPM external py2-pippkgs 1.0
## INITENV +PATH PYTHONPATH %{i}/$PYTHON_LIB_SITE_PACKAGES
Source: none

BuildRequires: py2-rootpy
BuildRequires: py2-configparser
BuildRequires: py2-entrypoints

%prep

%build

%install
mkdir -p %{i}/$PYTHON_LIB_SITE_PACKAGES
for pkg in %builddirectpkgreqs ; do
SOURCE=%{cmsroot}/%{cmsplatf}/${pkg}/$PYTHON_LIB_SITE_PACKAGES
if [ -d $SOURCE ] ; then
echo "Checking for duplicates ...."
for f in $(ls $SOURCE) ; do
if [ -e %{i}/$PYTHON_LIB_SITE_PACKAGES/$f ] ; then
echo " Duplicate file found: $f"
exit 1
fi
done
echo "Copying $SOURCE in %{pkgrel}"
rsync -av $SOURCE/ %{i}/$PYTHON_LIB_SITE_PACKAGES/
fi
done

22 changes: 0 additions & 22 deletions py2-rootpy-toolfile.spec

This file was deleted.