You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

164 lines
6.0 KiB

##
## python2-setup.spec -- OpenPKG RPM Package Specification
## Copyright (c) 2000-2022 OpenPKG Project <http://openpkg.org/>
##
## Permission to use, copy, modify, and distribute this software for
## any purpose with or without fee is hereby granted, provided that
## the above copyright notice and this permission notice appear in all
## copies.
##
## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
## SUCH DAMAGE.
##
# package version
%define V_python 2.7
%define V_setuptools 46.4.0
%define V_setuptools_git 1.2
%define V_setuptools_scm 5.0.2
%define V_pip 21.1.3
%define V_pbr 5.6.0
%define V_cython 0.29.26
%define V_wheel 0.36.2
# package information
Name: python2-setup
Summary: Python V2 Setup Tools
URL: http://pypi.python.org/pypi/setuptools/
Vendor: Phillip J. Eby
Packager: OpenPKG Project
Distribution: OpenPKG Community
Class: EVAL
Group: Language
License: PSF/ZPL
Version: %{V_python}
Release: 20211218
# list of sources
Source0: https://files.pythonhosted.org/packages/source/s/setuptools/setuptools-%{V_setuptools}.zip
Source1: https://files.pythonhosted.org/packages/source/p/pip/pip-%{V_pip}.tar.gz
Source2: https://files.pythonhosted.org/packages/source/p/pbr/pbr-%{V_pbr}.tar.gz
Source3: https://files.pythonhosted.org/packages/source/C/Cython/Cython-%{V_cython}.tar.gz
Source4: https://files.pythonhosted.org/packages/source/s/setuptools-git/setuptools-git-%{V_setuptools_git}.tar.gz
Source5: https://files.pythonhosted.org/packages/source/s/setuptools_scm/setuptools_scm-%{V_setuptools_scm}.tar.gz
Source6: https://files.pythonhosted.org/packages/source/w/wheel/wheel-%{V_wheel}.tar.gz
Patch0: python2-setup.patch
# build information
BuildPreReq: OpenPKG, openpkg >= 20160101, python2 >= %{V_python}
PreReq: OpenPKG, openpkg >= 20160101, python2 >= %{V_python}
%description
This packages provides the Python V2 setup tools.
%track
prog python2-setup:setuptools = {
version = %{V_setuptools}
url = http://pypi.python.org/pypi/setuptools/
regex = setuptools-(46\.\d+\.\d+)\.zip
}
prog python2-setup:pip = {
version = %{V_pip}
url = http://pypi.python.org/pypi/pip/
regex = pip-(__VER__)\.tar\.gz
}
prog python2-setup:pbr = {
version = %{V_pbr}
url = http://pypi.python.org/pypi/pbr/
regex = pbr-(__VER__)\.tar\.gz
}
prog python2-setup:cython = {
version = %{V_cython}
url = http://pypi.python.org/pypi/Cython/
regex = Cython-(__VER__)\.tar\.gz
}
prog python2-setup:setuptools-git = {
version = %{V_setuptools_git}
url = http://pypi.python.org/pypi/setuptools-git/
regex = setuptools-git-(__VER__)\.tar\.gz
}
prog python2-setup:setuptools-scm = {
version = %{V_setuptools_scm}
url = http://pypi.python.org/pypi/setuptools_scm/
regex = setuptools_scm-(__VER__)\.tar\.gz
}
prog python2-setup:wheel = {
version = %{V_wheel}
url = http://pypi.python.org/pypi/wheel/
regex = wheel-(__VER__)\.tar\.gz
}
%prep
%setup -q -c
%setup -q -T -D -a 1
%setup -q -T -D -a 2
%setup -q -T -D -a 3
%setup -q -T -D -a 4
%setup -q -T -D -a 5
%setup -q -T -D -a 6
%patch -p0
%build
( cd setuptools-%{V_setuptools}
mv "setuptools/script (dev).tmpl" "setuptools/script-dev.tmpl"
rm -f "build/lib/setuptools/command/launcher manifest.xml"
rm -f "setuptools/command/launcher manifest.xml"
) || exit $?
%install
export PYTHONPATH=$RPM_BUILD_ROOT%{l_prefix}/lib/python%{V_python}/site-packages
( cd setuptools-%{V_setuptools}
%{l_prefix}/bin/python2 setup.py install \
--root=$RPM_BUILD_ROOT \
--prefix=%{l_prefix}
) || exit $?
( cd pip-%{V_pip}
%{l_prefix}/bin/python2 setup.py install \
--root=$RPM_BUILD_ROOT \
--prefix=%{l_prefix}
) || exit $?
( cd pbr-%{V_pbr}
%{l_prefix}/bin/python2 setup.py install \
--root=$RPM_BUILD_ROOT \
--prefix=%{l_prefix}
) || exit $?
( cd Cython-%{V_cython}
%{l_prefix}/bin/python2 setup.py install \
--root=$RPM_BUILD_ROOT \
--prefix=%{l_prefix}
) || exit $?
( cd setuptools-git-%{V_setuptools_git}
%{l_prefix}/bin/python2 setup.py install \
--root=$RPM_BUILD_ROOT \
--prefix=%{l_prefix}
) || exit $?
( cd setuptools_scm-%{V_setuptools_scm}
%{l_prefix}/bin/python2 setup.py install \
--root=$RPM_BUILD_ROOT \
--prefix=%{l_prefix}
) || exit $?
( cd wheel-%{V_wheel}
%{l_prefix}/bin/python2 setup.py install \
--root=$RPM_BUILD_ROOT \
--prefix=%{l_prefix}
) || exit $?
for exe in cygdb cython cythonize easy_install pbr pip wheel; do
mv $RPM_BUILD_ROOT%{l_prefix}/bin/$exe \
$RPM_BUILD_ROOT%{l_prefix}/bin/${exe}2
done
%{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
%files -f files
%clean