Skip to content
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 24 additions & 8 deletions build-with-pip.file
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
#Pip<Pre|Post><Section>: Extra macros to run extra commands for various sections e.g
#PipPostBuild to relocate hardcoded pyton paths
#define PipPostBuild perl -p -i -e "s|^#!.*python|#!/usr/bin/env python|" %{i}/bin/*
#PipPackageNameCommand to get the exact package name
#PipDepsMatch Command to find out pypi package dependencies
#PipDepsCommand to get package dependencies
#PipInstallCommand Command to install the package

## INITENV +PATH PYTHON3PATH %{i}/${PYTHON3_LIB_SITE_PACKAGES}

Expand Down Expand Up @@ -40,6 +44,18 @@
%if "%{?PipDepsPost:set}" != "set"
%define PipDepsPost %{nil}
%endif
%if "%{?PipPackageNameCommand:set}" != "set"
%define PipPackageNameCommand pip3 show %{pip_name} --disable-pip-version-check | grep '^Name:' | sed 's|^Name: *||;s| ||g'
%endif
%if "%{?PipDepsMatch:set}" != "set"
%define PipDepsMatch grep "^${PKG_NAME} *%{realversion} *requires " | sed 's|,.*||;s|.* |py3-|'
%endif
%if "%{?PipDepsCommand:set}" != "set"
%define PipDepsCommand pip3 check --disable-pip-version-check | %{PipDepsMatch} %{PipDepsPost} | tr '\\n' ' '
%endif
%if "%{?PipInstallCommand:set}" != "set"
%define PipInstallCommand pip3 install --no-clean --no-deps --no-index --no-build-isolation --no-cache-dir --disable-pip-version-check --user -v %{PipInstallOptions} %{PipBuildOptions} $PIPFILE
%endif

%define pip pip3&package_dependency=py3-pip
Requires: python3 py3-pip py3-setuptools
Expand Down Expand Up @@ -101,16 +117,16 @@ if [ $(cat files.list | wc -l) -eq 1 ] ; then
export PYTHONUSERBASE=%{i}
pip3 list --disable-pip-version-check
%{?PipPreBuildPy:%PipPreBuildPy}
pip3 install --no-clean --no-deps --no-index --no-build-isolation --no-cache-dir --disable-pip-version-check --user -v %{PipInstallOptions} %{PipBuildOptions} $PIPFILE
PKG_NAME=$(pip3 show %{pip_name} --disable-pip-version-check | grep '^Name:' | sed 's|^Name: *||;s| ||g')
%{PipInstallCommand}
PKG_NAME=$(%{PipPackageNameCommand})
[ "${PKG_NAME}" = "" ] && exit 1
DEPS=$(pip3 check --disable-pip-version-check | grep "^${PKG_NAME} *%{realversion} *requires " | sed 's|,.*||;s|.* |py3-|' %{PipDepsPost} | tr '\n' ' ')
DEPS=$(%{PipDepsCommand})
if [ "$DEPS" != "" ] ; then
echo "ERROR: Missing dependencies for %n (python3) found: $DEPS"
exit 1
fi
%{relocatePy3SitePackages}
%{?PipPostBuildPy:%PipPostBuildPy}
echo "ERROR: Missing dependencies for %n (python3) found: $DEPS"
exit 1
fi
%{relocatePy3SitePackages}
%{?PipPostBuildPy:%PipPostBuildPy}
else
echo "Sorry I don't know how to handle no/multiple install files yet"
cat %{_builddir}/files.list
Expand Down
5 changes: 3 additions & 2 deletions curl.spec
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
### RPM external curl 7.70.0
### RPM external curl 7.79.0
Source: http://curl.haxx.se/download/%{n}-%{realversion}.tar.gz
Requires: zlib

Expand All @@ -20,7 +20,8 @@ esac
--with-zlib=${ZLIB_ROOT} \
--without-nss \
--without-libssh2 \
--with-gssapi=${KERBEROS_ROOT}
--with-gssapi=${KERBEROS_ROOT} \
--with-openssl

make %{makeprocesses}

Expand Down
2 changes: 1 addition & 1 deletion pcre2.spec
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
### RPM external pcre2 10.33
### RPM external pcre2 10.36
Source0: http://downloads.sourceforge.net/pcre/%{n}-%{realversion}.tar.bz2

Requires: bz2lib zlib
Expand Down
2 changes: 1 addition & 1 deletion pip/numexpr.file
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Requires: py3-numpy
Requires: py3-numpy py3-packaging
6 changes: 1 addition & 5 deletions pip/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,6 @@ histbook==1.2.5
histoprint==2.2.0
histogrammar==1.0.25
html5lib==1.1
hyperas==0.4.1
hyperopt==0.2.5
idna==3.2
immutables==0.16
importlib-metadata==4.8.1
Expand Down Expand Up @@ -170,12 +168,10 @@ nbformat==5.1.3
nest-asyncio==1.5.1
networkx==2.6.2
neurolab==0.3.5
nose-parameterized==0.6.0
nose==1.3.7
node-semver==0.8.0
notebook==6.4.3
numba==0.54.0
numexpr==2.7.3
numexpr==2.8.1
numpy==1.21.2
onnx==1.10.1
onnxmltools==1.9.1
Expand Down
2 changes: 1 addition & 1 deletion py3-pip.spec
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
### RPM external py3-pip 20.3.3
### RPM external py3-pip 22.0.4
## INITENV +PATH PATH %{i}/bin
## INITENV +PATH LD_LIBRARY_PATH %{i}/lib
## INITENV +PATH PYTHON3PATH %{i}/${PYTHON3_LIB_SITE_PACKAGES}
Expand Down
6 changes: 2 additions & 4 deletions py3-setuptools.spec
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
### RPM external py3-setuptools 51.3.3
### RPM external py3-setuptools 60.9.3
## INITENV +PATH PYTHON3PATH %{i}/${PYTHON3_LIB_SITE_PACKAGES}

Source: https://github.com/pypa/setuptools/archive/v%{realversion}.tar.gz
Expand All @@ -9,14 +9,12 @@ Requires: python3
%setup -n setuptools-%{realversion}

%build
python3 bootstrap.py
python3 setup.py build
python3 setup.py egg_info

%install
python3 setup.py install --single-version-externally-managed --record=/dev/null --skip-build --prefix=%{i}
sed -i 's|#!.*python.*|#!/usr/bin/env python3|' \
%{i}/bin/* \
%{i}/${PYTHON3_LIB_SITE_PACKAGES}/setuptools/command/easy_install.py \
%{i}/${PYTHON3_LIB_SITE_PACKAGES}/pkg_resources/_vendor/appdirs.py
mv %{i}/bin/easy_install %{i}/bin/easy_install3