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

Addition python package cleanups #3864

Merged
merged 11 commits into from Mar 22, 2018
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
1 change: 0 additions & 1 deletion cmssw-tool-conf.spec
Expand Up @@ -163,7 +163,6 @@ Requires: py2-pip-toolfile
# Only for Linux platform.
%if %islinux
Requires: openldap-toolfile
Requires: python-ldap-toolfile
Requires: google-perftools-toolfile

%if %isnotppc64le_be
Expand Down
22 changes: 0 additions & 22 deletions cython-toolfile.spec

This file was deleted.

23 changes: 0 additions & 23 deletions cython.spec

This file was deleted.

2 changes: 1 addition & 1 deletion frontier_client.spec
@@ -1,5 +1,5 @@
### RPM external frontier_client 2.8.20
## INITENV +PATH PYTHONPATH %{i}/python/lib
## INITENV +PATH PYTHON27PATH %{i}/python/lib

Source: http://frontier.cern.ch/dist/%{n}__%{realversion}__src.tar.gz
%define online %(case %cmsplatf in (*onl_*_*) echo true;; (*) echo false;; esac)
Expand Down
1 change: 0 additions & 1 deletion gosam.spec
Expand Up @@ -14,7 +14,6 @@ CXX="$(which c++) -fPIC"
CC="$(which gcc) -fPIC"
FC="$(which gfortran)"
PLATF_CONF_OPTS="--enable-shared --disable-static"
export PYTHONPATH=${CYTHON_ROOT}/${PYTHON_LIB_SITE_PACKAGES}
python setup.py install --prefix=%{i}

%install
Expand Down
10 changes: 5 additions & 5 deletions lhapdf.spec
Expand Up @@ -13,21 +13,21 @@ Source6: https://www.hepforge.org/archive/lhapdf/pdfsets/6.1/MMHT2014nlo68cl.tar

Source7: lhapdf_pdfsetsindex

Requires: yaml-cpp python
BuildRequires: cython
Requires: python
BuildRequires: py2-cython

%define keep_archives true

%prep
%setup -q -n LHAPDF-%{realversion}

./configure --prefix=%{i} --with-yaml-cpp=${YAML-CPP_ROOT} PYTHON=${PYTHON_ROOT}/bin/python CYTHON=${CYTHON_ROOT}/bin/cython PYTHONPATH=${CYTHON_ROOT}/${PYTHON_LIB_SITE_PACKAGES}
./configure --prefix=%{i}

%build
make all %makeprocesses PYTHONPATH=${CYTHON_ROOT}/${PYTHON_LIB_SITE_PACKAGES}
make all %makeprocesses

%install
make install PYTHONPATH=${CYTHON_ROOT}/${PYTHON_LIB_SITE_PACKAGES}
make install
mkdir -p %{i}/share/LHAPDF
cd %{i}/share/LHAPDF
cp %{_sourcedir}/cteq6l1.tar.gz .
Expand Down
2 changes: 1 addition & 1 deletion py2-numpy.spec
Expand Up @@ -37,7 +37,7 @@ EOF
mkdir -p %i/${PYTHON_LIB_SITE_PACKAGES}

python setup.py build %{makeprocesses} --fcompiler=gnu95
PYTHONPATH=%i/${PYTHON_LIB_SITE_PACKAGES}:$PYTHONPATH python setup.py install --prefix=%i
PYTHON27PATH=%i/${PYTHON_LIB_SITE_PACKAGES}:$PYTHON27PATH python setup.py install --prefix=%i
sed -ideleteme 's|#!.*/bin/python|#!/usr/bin/env python|' \
%{i}/bin/f2py \
%{i}/lib/python*/site-packages/numpy-*/EGG-INFO/scripts/f2py \
Expand Down
2 changes: 2 additions & 0 deletions py2-pippkgs.spec
Expand Up @@ -95,6 +95,8 @@ BuildRequires: py2-avro
BuildRequires: py2-fs
BuildRequires: py2-lizard
BuildRequires: py2-flawfinder
BuildRequires: python-ldap

%prep

%build
Expand Down
2 changes: 1 addition & 1 deletion py2-sqlalchemy.spec
Expand Up @@ -21,5 +21,5 @@ python setup.py build

%install
mkdir -p %{i}/${PYTHON_LIB_SITE_PACKAGES}
PYTHONPATH=%{i}/${PYTHON_LIB_SITE_PACKAGES}:${PYTHONPATH} python setup.py install --skip-build --prefix=%{i}
PYTHON27PATH=%{i}/${PYTHON_LIB_SITE_PACKAGES}:${PYTHON27PATH} python setup.py install --skip-build --prefix=%{i}

26 changes: 0 additions & 26 deletions python-ldap-toolfile.spec

This file was deleted.

16 changes: 3 additions & 13 deletions python-ldap.spec
@@ -1,22 +1,12 @@
### RPM external python-ldap 2.4.10
## INITENV +PATH PYTHON27PATH %{i}/${PYTHON_LIB_SITE_PACKAGES}

Source: http://pypi.python.org/packages/source/p/%{n}/%{n}-%{realversion}.tar.gz
Requires: python openssl openldap

%prep
%setup -q -n %{n}-%{realversion}
%define PipBuildOptions --global-option=build_ext --global-option="-L${OPENSSL_ROOT}/lib" --global-option="-L${PYTHON_ROOT}/lib" --global-option="-L${OPENLDAP_ROOT}/lib" --global-option="-I${OPENSSL_ROOT}/include" --global-option="-I${PYTHON_ROOT}/include" --global-option="-I${OPENLDAP_ROOT}/include" --global-option="-UHAVE_SASL"

%build
sed -i'' "s:\(library_dirs =\)\(.*\):\1 ${OPENSSL_ROOT}\/lib ${PYTHON_ROOT}\/lib ${OPENLDAP_ROOT}\/lib:g" setup.cfg
sed -i'' "s:\(include_dirs =\)\(.*\):\1 ${OPENSSL_ROOT}\/include ${PYTHON_ROOT}\/include ${OPENLDAP_ROOT}\/include:g" setup.cfg
sed -i'' "s:\(defines = \)\(.*\):\1 HAVE_TLS HAVE_LIBLDAP_R:g" setup.cfg
%define pip_name python-ldap

python setup.py build

%install
## IMPORT build-with-pip

mkdir -p %{i}/${PYTHON_LIB_SITE_PACKAGES}
export PYTHONPATH=%{i}/${PYTHON_LIB_SITE_PACKAGES}:${PYTHONPATH}

python setup.py install --skip-build --prefix=%{i}
5 changes: 2 additions & 3 deletions rivet.spec
Expand Up @@ -32,16 +32,15 @@ done
./configure --disable-silent-rules --prefix=%{i} --with-hepmc=${HEPMC_ROOT} \
--with-fastjet=${FASTJET_ROOT} --with-gsl=$GSL_ROOT --with-yoda=${YODA_ROOT} \
--disable-doxygen --disable-pdfmanual --with-pic \
PYTHONPATH=${CYTHON_ROOT}/${PYTHON_LIB_SITE_PACKAGES} \
CXX="$(which g++)" CPPFLAGS="-I${BOOST_ROOT}/include"

# The following hack insures that the bins with the library linked explicitly
# rather than indirectly, as required by the gold linker
perl -p -i -e "s|LIBS = $|LIBS = -lHepMC|g" bin/Makefile
%build
make %{makeprocesses} all PYTHONPATH=${CYTHON_ROOT}/${PYTHON_LIB_SITE_PACKAGES}
make %{makeprocesses} all
%install
make install PYTHONPATH=${CYTHON_ROOT}/${PYTHON_LIB_SITE_PACKAGES}
make install

%post
%{relocateConfig}bin/rivet-config
Expand Down
3 changes: 1 addition & 2 deletions scram-project-build.file
Expand Up @@ -64,7 +64,7 @@ Requires: glibc
%endif

%if "%{?configtag:set}" != "set"
%define configtag V05-05-82
%define configtag V05-05-83
%endif

%if "%{?cvssrc:set}" != "set"
Expand Down Expand Up @@ -217,7 +217,6 @@ perl %i/config/SCRAM/findDependencies.pl -rel %i -arch %cmsplatf -scramroot $SCR
gzip -f %i/etc/dependencies/*.out
%endif

(eval `%scramcmd run -sh` ; echo $PYTHONPATH | sed -e "s/:/','/g" | awk '{print "#!/usr/bin/env python \n\ncmsswPythonPaths=['"'"'"$1"'"'"']"}' > %i/python/cmsswPaths.py) || true

eval `%scramcmd run -sh`
for cmd in edmPluginRefresh ; do
Expand Down
2 changes: 1 addition & 1 deletion sip.spec
@@ -1,5 +1,5 @@
### RPM external sip 4.17
## INITENV +PATH PYTHONPATH %i/lib/python$(echo $PYTHON_VERSION |cut -d. -f 1,2)/site-packages
## INITENV +PATH PYTHON27PATH %i/lib/python$(echo $PYTHON_VERSION |cut -d. -f 1,2)/site-packages
%define tag f5f49b1c14cd058c2736ade2fef0abb0765b8be4
%define branch cms/v%{realversion}
%define github_user cms-externals
Expand Down