Numerous packages to verify python-pbr (#4329)
* Numerous packages to verify python-pbr Please note that this only ONE part of a long chain of packages that seem to depend upon eachother for building and validation including some stuff that is already in MINGW-W64 PKGBUILD’s such as setuptools and pbr as well as some other stuff. The idea is build something that’s good enough to build everything else in hopefully manner including some stuff such as opencv, eigen, vtm numerous gnome packages, and who knows what else. I may have made mistakes and numerous omissios so please bear with me. mingw-w64-python2-subprocess32 - 0.6.0 mingw-w64-python-pyperclip - 1.6.4 mingw-w64-python-pyreadline - 2.1 mingw-w64-python2-cmd2 - 0.8.6 mingw-w64-python3-cmd2 – 0.9.4 mingw-w64-python-stevedore – 1.29.0 mingw-w64-python-unicodecsv – 0.14.1 mingw-w64-python-pytest-forked – 0.2 cliff-2.13.0-1 mingw-w64-python-pytest-xdist – 1.23.0 mingw-w64-python-execnet – 1.50 mingw-w64-python-testrepository – 0.20 mingw-w64-python-testresources – 2.0.1 mingw-w64-python-cliff - cliff-2.13.0 mingw-w64-python-voluptuous – 0.15.1 * python-hacking - 1.1.0 * More necessary packages for tests and afix for nose and sphinx. Also tried to fix most mentioned previous except for "testrepository" That was deliberate because it refers to the name of a package. * Numerous modules that I built for testins stestr thare useful elesewhere. I also updated sqlchemy and decorator to the latest versions. Some times the testing here may not work but I'm hoping to lay more solid groundwork and quite a bit can be conibalized by others for fixing things already in git. * Remove Python2 dependency for python3 package. * python-jsonschemea - 2.6.0 - make sure .EXE works. Added dependency on python2-functools32 python2-functutils32 - 3.2.3-2 - new package required for jsonshcemas Python2 version. Verified this with PIP. * python-matplotlib - require backports.functools_lru_cache backports.functools_lru_cache - 1.5 - new package requried for python-maplotlib in Python2 - verified with PIP
This commit is contained in:
164
mingw-w64-python-netaddr/PKGBUILD
Normal file
164
mingw-w64-python-netaddr/PKGBUILD
Normal file
@@ -0,0 +1,164 @@
|
||||
# Maintainer: J. Peter Mugaas <jpmugaas@suddenlink.net>.
|
||||
|
||||
_realname=netaddr
|
||||
pkgbase=mingw-w64-python-${_realname}
|
||||
pkgname=("${MINGW_PACKAGE_PREFIX}-python2-${_realname}" "${MINGW_PACKAGE_PREFIX}-python3-${_realname}")
|
||||
pkgver=0.7.19
|
||||
pkgrel=1
|
||||
pkgdesc="Pure Python network address representation and manipulation library (mingw-w64)"
|
||||
arch=('any')
|
||||
url='https://github.com/drkjam/netaddr'
|
||||
license=('BSD')
|
||||
makedepends=("${MINGW_PACKAGE_PREFIX}-python2"
|
||||
"${MINGW_PACKAGE_PREFIX}-python3"
|
||||
"${MINGW_PACKAGE_PREFIX}-python3-sphinx"
|
||||
"${MINGW_PACKAGE_PREFIX}-python2-sphinx"
|
||||
"${MINGW_PACKAGE_PREFIX}-python3-setuptools"
|
||||
"${MINGW_PACKAGE_PREFIX}-python2-setuptools")
|
||||
checkdepends=("${MINGW_PACKAGE_PREFIX}-python3-pytest"
|
||||
"${MINGW_PACKAGE_PREFIX}-python2-pytest")
|
||||
options=('staticlibs' 'strip' '!debug')
|
||||
source=(${_realname}-${pkgver}.tar.gz::https://github.com/drkjam/${_realname}/archive/${_realname}-${pkgver}.tar.gz
|
||||
fix-${pkgver}-python3.patch
|
||||
pep479-return-instead-of-raise-StopIteration.patch)
|
||||
sha512sums=('f07fb4de08aef4925dbc429b4ee93b25855273f083405d4e763c2fbc996ee35b09b87b10117040b073d45ac9f51512083116883ff48216e68aa1e429f83d5278'
|
||||
'8db4e6cbaf03b95092561dfcf881616920da2ab45f205d8bd29f1f6e9e7681a7d591c0a52dbdb772a41cac0b42d643c2dafcad22a659524a35cb6b06dd98d38d'
|
||||
'ff4b46184cc98c360ba377a72ead48a64fd78477080c7061652f79dc44d7b6803111cee885502b7d98e08d66d440e7b9afd65faa97674b2c487a2ba78e684e9d')
|
||||
|
||||
|
||||
# Helper macros to help make tasks easier #
|
||||
apply_patch_with_msg() {
|
||||
for _patch in "$@"
|
||||
do
|
||||
msg2 "Applying $_patch"
|
||||
patch -Nbp1 -i "${srcdir}/$_patch"
|
||||
done
|
||||
}
|
||||
|
||||
del_file_exists() {
|
||||
for _fname in "$@"
|
||||
do
|
||||
if [ -f $_fname ]; then
|
||||
rm -rf $_fname
|
||||
fi
|
||||
done
|
||||
}
|
||||
# =========================================== #
|
||||
|
||||
prepare() {
|
||||
cd "${srcdir}"
|
||||
pushd "${_realname}-${_realname}-${pkgver}"
|
||||
sed -r 's|#!/usr/bin/env python||g' -i netaddr/eui/ieee.py netaddr/ip/iana.py
|
||||
apply_patch_with_msg "fix-${pkgver}-python3.patch" \
|
||||
"pep479-return-instead-of-raise-StopIteration.patch"
|
||||
popd
|
||||
for builddir in python{2,3}-build-${CARCH}; do
|
||||
rm -rf ${builddir} | true
|
||||
cp -r "${_realname}-${_realname}-${pkgver}" "${builddir}"
|
||||
done
|
||||
# Set version for setuptools_scm
|
||||
export SETUPTOOLS_SCM_PRETEND_VERSION=$pkgver
|
||||
}
|
||||
|
||||
# Note that build() is sometimes skipped because it's done in
|
||||
# the packages setup.py install for simplicity if you can do so.
|
||||
# but sometimes, you want to do a check before install which would
|
||||
# also trigger the build.
|
||||
build() {
|
||||
for pver in {2,3}; do
|
||||
msg "Python ${pver} build for ${CARCH}"
|
||||
cd "${srcdir}/python${pver}-build-${CARCH}"
|
||||
${MINGW_PREFIX}/bin/python${pver} setup.py build
|
||||
cd docs
|
||||
make text
|
||||
# make man
|
||||
done
|
||||
}
|
||||
|
||||
check() {
|
||||
msg "Python 2 test for ${CARCH}"
|
||||
cd "${srcdir}/python2-build-${CARCH}"
|
||||
LC_ALL='en_US.UTF-8' ${MINGW_PREFIX}/bin/py.test2
|
||||
msg "Python 3 test for ${CARCH}"
|
||||
cd "${srcdir}/python3-build-${CARCH}"
|
||||
LC_ALL='en_US.UTF-8' ${MINGW_PREFIX}/bin/py.test
|
||||
}
|
||||
|
||||
package_python3-netaddr() {
|
||||
depends=("${MINGW_PACKAGE_PREFIX}-python3")
|
||||
optdepends=("${MINGW_PACKAGE_PREFIX}-python3-ipython: netaddr interractive command support")
|
||||
|
||||
#This package install is needed for .fixups with .EXE's
|
||||
#in the bit directory. The install files "python-exe-installs"
|
||||
#and should be renamed to your _realname .
|
||||
install=${_realname}3-${CARCH}.install
|
||||
|
||||
cd "${srcdir}/python3-build-${CARCH}"
|
||||
MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \
|
||||
${MINGW_PREFIX}/bin/python3 setup.py install --prefix=${MINGW_PREFIX} \
|
||||
--root="${pkgdir}" --optimize=1 --skip-build
|
||||
|
||||
install -Dm 644 LICENSE "${pkgdir}${MINGW_PREFIX}/share/licenses/python3-${_realname}/LICENSE"
|
||||
install -Dm 644 README.md "${pkgdir}${MINGW_PREFIX}/share/doc/python3-${_realname}/README.md"
|
||||
install -Dm 644 docs/build/text/* -t "${pkgdir}${MINGW_PREFIX}/share/doc/python3-${_realname}/"
|
||||
# install -Dm 644 docs/build/man/netaddr.1 "${pkgdir}${MINGW_PREFIX}/share/man/man1/netaddr.1"
|
||||
|
||||
# This entire section should be removed if the package does NOT install
|
||||
# anything in the /mingw*/bin directory.
|
||||
### begin section ###
|
||||
local PREFIX_WIN=$(cygpath -wm ${MINGW_PREFIX})
|
||||
# fix python command in files
|
||||
for _f in "${pkgdir}${MINGW_PREFIX}"/bin/*; do
|
||||
sed -e "s|/usr/bin/env |${MINGW_PREFIX}/bin/|g" \
|
||||
-e "s|${PREFIX_WIN}|${MINGW_PREFIX}|g" -i ${_f}
|
||||
done
|
||||
#### end section ####
|
||||
}
|
||||
|
||||
package_python2-netaddr() {
|
||||
depends=("${MINGW_PACKAGE_PREFIX}-python2")
|
||||
optdepends=("${MINGW_PACKAGE_PREFIX}-python3-ipython: netaddr interractive command supprt")
|
||||
install=${_realname}2-${CARCH}.install
|
||||
|
||||
cd "${srcdir}/python2-build-${CARCH}"
|
||||
MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \
|
||||
${MINGW_PREFIX}/bin/python2 setup.py install --prefix=${MINGW_PREFIX} \
|
||||
--root="${pkgdir}" --optimize=1 --skip-build
|
||||
|
||||
install -Dm 644 LICENSE "${pkgdir}${MINGW_PREFIX}/share/licenses/python2-${_realname}/LICENSE"
|
||||
install -Dm 644 README.md "${pkgdir}${MINGW_PREFIX}/share/doc/python2-${_realname}/README.md"
|
||||
install -Dm 644 docs/build/text/* -t "${pkgdir}${MINGW_PREFIX}/share/doc/python2-${_realname}/"
|
||||
# install -Dm 644 docs/build/man/netaddr.1 "${pkgdir}${MINGW_PREFIX}/share/man/man1/netaddr.1"
|
||||
|
||||
# This entire section should be removed if the package does NOT install
|
||||
# anything in the /mingw*/bin directory.
|
||||
### begin section ###
|
||||
local PREFIX_WIN=$(cygpath -wm ${MINGW_PREFIX})
|
||||
# fix python command in files
|
||||
for _f in "${pkgdir}${MINGW_PREFIX}"/bin/*; do
|
||||
sed -e "s|python[^3]|python|" \
|
||||
-e "s|/usr/bin/env |${MINGW_PREFIX}/bin/|g" \
|
||||
-e "s|${PREFIX_WIN}|${MINGW_PREFIX}/|g" -i ${_f}
|
||||
done
|
||||
|
||||
for f in netaddr; do
|
||||
mv "${pkgdir}${MINGW_PREFIX}"/bin/${f}{,2}
|
||||
done
|
||||
#### end section ####
|
||||
}
|
||||
|
||||
package_mingw-w64-i686-python2-netaddr() {
|
||||
package_python2-netaddr
|
||||
}
|
||||
|
||||
package_mingw-w64-i686-python3-netaddr() {
|
||||
package_python3-netaddr
|
||||
}
|
||||
|
||||
package_mingw-w64-x86_64-python2-netaddr() {
|
||||
package_python2-netaddr
|
||||
}
|
||||
|
||||
package_mingw-w64-x86_64-python3-netaddr() {
|
||||
package_python3-netaddr
|
||||
}
|
||||
50
mingw-w64-python-netaddr/fix-0.7.19-python3.patch
Normal file
50
mingw-w64-python-netaddr/fix-0.7.19-python3.patch
Normal file
@@ -0,0 +1,50 @@
|
||||
From 2ab73f10be7069c9412e853d2d0caf29bd624012 Mon Sep 17 00:00:00 2001
|
||||
From: David Moss <drkjam@gmail.com>
|
||||
Date: Mon, 16 Jan 2017 22:17:16 +0000
|
||||
Subject: [PATCH] - fixed broken tests in issue #149 (python 3 regression in
|
||||
0.7.19) - only affects test suite
|
||||
|
||||
---
|
||||
netaddr/tests/eui/test_ieee_parsers.py | 8 ++++----
|
||||
1 file changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/netaddr/tests/eui/test_ieee_parsers.py b/netaddr/tests/eui/test_ieee_parsers.py
|
||||
index 7877f09..81f1faa 100644
|
||||
--- a/netaddr/tests/eui/test_ieee_parsers.py
|
||||
+++ b/netaddr/tests/eui/test_ieee_parsers.py
|
||||
@@ -12,7 +12,7 @@
|
||||
def test_oui_parser_py2():
|
||||
from cStringIO import StringIO
|
||||
outfile = StringIO()
|
||||
- with open(os.path.join(SAMPLE_DIR, 'sample_oui.txt')) as infile:
|
||||
+ with open(os.path.join(SAMPLE_DIR, 'sample_oui.txt'), 'rb') as infile:
|
||||
iab_parser = OUIIndexParser(infile)
|
||||
iab_parser.attach(FileIndexer(outfile))
|
||||
iab_parser.parse()
|
||||
@@ -23,7 +23,7 @@ def test_oui_parser_py2():
|
||||
def test_iab_parser_py2():
|
||||
from cStringIO import StringIO
|
||||
outfile = StringIO()
|
||||
- with open(os.path.join(SAMPLE_DIR, 'sample_iab.txt')) as infile:
|
||||
+ with open(os.path.join(SAMPLE_DIR, 'sample_iab.txt'), 'rb') as infile:
|
||||
iab_parser = IABIndexParser(infile)
|
||||
iab_parser.attach(FileIndexer(outfile))
|
||||
iab_parser.parse()
|
||||
@@ -34,7 +34,7 @@ def test_iab_parser_py2():
|
||||
def test_oui_parser_py3():
|
||||
from io import StringIO
|
||||
outfile = StringIO()
|
||||
- with open(os.path.join(SAMPLE_DIR, 'sample_oui.txt')) as infile:
|
||||
+ with open(os.path.join(SAMPLE_DIR, 'sample_oui.txt'), 'rb') as infile:
|
||||
iab_parser = OUIIndexParser(infile)
|
||||
iab_parser.attach(FileIndexer(outfile))
|
||||
iab_parser.parse()
|
||||
@@ -45,7 +45,7 @@ def test_oui_parser_py3():
|
||||
def test_iab_parser_py3():
|
||||
from io import StringIO
|
||||
outfile = StringIO()
|
||||
- with open(os.path.join(SAMPLE_DIR, 'sample_iab.txt')) as infile:
|
||||
+ with open(os.path.join(SAMPLE_DIR, 'sample_iab.txt'), 'rb') as infile:
|
||||
iab_parser = IABIndexParser(infile)
|
||||
iab_parser.attach(FileIndexer(outfile))
|
||||
iab_parser.parse()
|
||||
14
mingw-w64-python-netaddr/netaddr2-i686.install
Normal file
14
mingw-w64-python-netaddr/netaddr2-i686.install
Normal file
@@ -0,0 +1,14 @@
|
||||
post_install() {
|
||||
cd mingw32
|
||||
local _prefix=$(pwd -W)
|
||||
cd -
|
||||
local _it
|
||||
for _it in netaddr2; do
|
||||
sed -e "s|/mingw32|${_prefix}|g" \
|
||||
-i mingw32/bin/${_it}
|
||||
done
|
||||
}
|
||||
|
||||
post_upgrade() {
|
||||
post_install
|
||||
}
|
||||
14
mingw-w64-python-netaddr/netaddr2-x86_64.install
Normal file
14
mingw-w64-python-netaddr/netaddr2-x86_64.install
Normal file
@@ -0,0 +1,14 @@
|
||||
post_install() {
|
||||
cd mingw64
|
||||
local _prefix=$(pwd -W)
|
||||
cd -
|
||||
local _it
|
||||
for _it in netaddr2; do
|
||||
sed -e "s|/mingw64|${_prefix}|g" \
|
||||
-i mingw64/bin/${_it}
|
||||
done
|
||||
}
|
||||
|
||||
post_upgrade() {
|
||||
post_install
|
||||
}
|
||||
17
mingw-w64-python-netaddr/netaddr3-i686.install
Normal file
17
mingw-w64-python-netaddr/netaddr3-i686.install
Normal file
@@ -0,0 +1,17 @@
|
||||
post_install() {
|
||||
cd mingw32
|
||||
local _prefix=$(pwd -W)
|
||||
cd -
|
||||
local _it
|
||||
# "somepackage" should be replaced with the name of your .EXE w/o 2 and .exe ext
|
||||
# Like this:
|
||||
# For "myexe.exe", it would be "myexe" .
|
||||
for _it in netaddr; do
|
||||
sed -e "s|/mingw32|${_prefix}|g" \
|
||||
-i mingw32/bin/${_it}
|
||||
done
|
||||
}
|
||||
|
||||
post_upgrade() {
|
||||
post_install
|
||||
}
|
||||
14
mingw-w64-python-netaddr/netaddr3-x86_64.install
Normal file
14
mingw-w64-python-netaddr/netaddr3-x86_64.install
Normal file
@@ -0,0 +1,14 @@
|
||||
post_install() {
|
||||
cd mingw64
|
||||
local _prefix=$(pwd -W)
|
||||
cd -
|
||||
local _it
|
||||
for _it in netaddr; do
|
||||
sed -e "s|/mingw64|${_prefix}|g" \
|
||||
-i mingw64/bin/${_it}
|
||||
done
|
||||
}
|
||||
|
||||
post_upgrade() {
|
||||
post_install
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
From 292e2fd4b52409eab05149b0d63e0291bec3786a Mon Sep 17 00:00:00 2001
|
||||
From: Sergey Kozlov <sergey.kozlov@intel.com>
|
||||
Date: Mon, 11 Dec 2017 17:04:20 +0100
|
||||
Subject: [PATCH] PEP 479: 'return' instead of 'raise StopIteration'.
|
||||
|
||||
Fro details please visit https://www.python.org/dev/peps/pep-0479/
|
||||
---
|
||||
netaddr/ip/__init__.py | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/netaddr/ip/__init__.py b/netaddr/ip/__init__.py
|
||||
index 489badf..ecf72d0 100644
|
||||
--- a/netaddr/ip/__init__.py
|
||||
+++ b/netaddr/ip/__init__.py
|
||||
@@ -1258,7 +1258,7 @@ def subnet(self, prefixlen, count=None, fmt=None):
|
||||
|
||||
if not self.prefixlen <= prefixlen:
|
||||
# Don't return anything.
|
||||
- raise StopIteration
|
||||
+ return
|
||||
|
||||
# Calculate number of subnets to be returned.
|
||||
width = self._module.width
|
||||
Reference in New Issue
Block a user