Python 2 Removal - Round 2 (#1874)

* cygrunsrv: Remove Python 2 dependency

Looks unused

* elinks: Move to Python 3

* gyp: Update and build with Python 3

* doxygen: Build with Python 3

* file: Drop Python 2 module

* glib2: Build with Python 3

* libevent: Use Python 3

* setconf: Use Python 3

* jsoncpp: Build with Python 3
This commit is contained in:
Christoph Reiter
2020-02-28 07:36:23 +01:00
committed by GitHub
parent 8e911977e8
commit 60697c0d21
9 changed files with 22 additions and 28 deletions

View File

@@ -2,13 +2,12 @@
pkgname=cygrunsrv
pkgver=1.62
pkgrel=1
pkgrel=2
pkgdesc="${pkgname} is a windows services tool"
_realname=cygrunsrv
arch=('i686' 'x86_64')
url="https://cygwin.org/"
license=('GPL')
depends=('python2')
makedepends=('gcc' 'git' 'make')
source=(${pkgname}-${pkgver}::git+https://sourceware.org/git/cygwin-apps/${pkgname}.git#tag=rel${pkgver//./-}
msysize.patch)

View File

@@ -3,14 +3,14 @@
pkgname=doxygen
pkgver=1.8.17
pkgrel=1
pkgrel=2
pkgdesc="A documentation system for C++, C, Java, IDL and PHP"
arch=('i686' 'x86_64')
url="http://www.doxygen.org/"
options=('strip' 'staticlibs')
license=('GPL')
depends=("gcc-libs" "libsqlite" "libiconv")
makedepends=("cmake" "gcc" "flex" "python2" "libsqlite-devel" "libiconv-devel")
makedepends=("cmake" "gcc" "flex" "python3" "libsqlite-devel" "libiconv-devel")
source=(${pkgname}-${pkgver}.tar.gz::https://github.com/doxygen/doxygen/archive/Release_${pkgver//./_}.tar.gz
"doxygen-segfault.patch")
#noextract=("${pkgname}-${pkgver}.tar.gz")

View File

@@ -3,7 +3,7 @@
pkgname=elinks-git
_ver_base=0.13
pkgver=0.13.4008.f86be659
pkgrel=3
pkgrel=4
epoch=
pkgdesc="Full-Featured Text WWW Browser (net-utils)"
arch=("i686" "x86_64")
@@ -30,7 +30,7 @@ depends=('doxygen'
'libtre'
'libunistring'
'perl'
'python2'
'python3'
'xmlto'
'zlib')
makedepends=('git'
@@ -76,7 +76,7 @@ prepare() {
build() {
cd ${srcdir}/${pkgname}
export PYTHON=/usr/bin/python2
export PYTHON=/usr/bin/python3
./configure \
--prefix=/usr \
--sysconfdir=/etc \

View File

@@ -2,14 +2,14 @@
pkgname=file
pkgver=5.38
pkgrel=1
pkgrel=2
pkgdesc="File type identification utility"
arch=('i686' 'x86_64')
license=('custom')
groups=('base' 'base-devel')
url="https://www.darwinsys.com/file/"
depends=('gcc-libs' 'msys2-runtime' 'zlib')
makedepends=('python2' 'python3' 'zlib-devel')
makedepends=('python3' 'zlib-devel')
options=('!libtool')
source=(#ftp://ftp.astron.com/pub/${pkgname}/${pkgname}-${pkgver}.tar.gz
ftp://ftp.astron.com/pub/file/${pkgname}-${pkgver}.tar.gz
@@ -43,12 +43,9 @@ package() {
install -Dm644 COPYING ${pkgdir}/usr/share/licenses/${pkgname}/COPYING
PYTHON_SITELIB=$(python2 -c 'from distutils.sysconfig import * ; print get_python_lib(0,0);')
PYTHON3_SITELIB=$(python3 -c 'from distutils.sysconfig import * ; print(get_python_lib(0,0));')
mkdir -p ${pkgdir}/$PYTHON_SITELIB
mkdir -p ${pkgdir}/$PYTHON3_SITELIB
cp -f ${srcdir}/${pkgname}-${pkgver}/python/magic.py ${pkgdir}/$PYTHON_SITELIB
cp -f ${srcdir}/${pkgname}-${pkgver}/python/magic.py ${pkgdir}/$PYTHON3_SITELIB
cat ${srcdir}/${pkgname}-${pkgver}/magic/Magdir/* > ${pkgdir}/usr/share/misc/magic

View File

@@ -3,11 +3,12 @@
pkgbase=glib2
pkgname=(glib2 glib2-devel glib2-docs)
pkgver=2.54.3
pkgrel=1
pkgrel=2
pkgdesc="Common C routines used by GTK+ and other libs"
license=(LGPL2)
url="https://www.gtk.org/"
arch=('i686' 'x86_64')
makedepends=('pkg-config' 'python' 'libxslt-devel' 'docbook-xsl' 'pcre-devel' 'libffi-devel' 'libiconv-devel' 'gamin-devel' 'gtk-doc' 'zlib-devel')
makedepends=('pkg-config' 'python3' 'libxslt-devel' 'docbook-xsl' 'pcre-devel' 'libffi-devel' 'libiconv-devel' 'gamin-devel' 'gtk-doc' 'zlib-devel')
source=(https://download.gnome.org/sources/glib/${pkgver%.*}/glib-$pkgver.tar.xz
2.36.3-not-win32.patch
2.36.4-gspawn-cygwin.patch
@@ -52,6 +53,7 @@ prepare() {
build() {
export lt_cv_deplibs_check_method='pass_all'
cd glib-${pkgver}
export CFLAGS="$CFLAGS -Wno-error=format-overflow"
./configure \
--build=${CHOST} \
--host=${CHOST} \
@@ -81,7 +83,7 @@ check() {
package_glib2() {
depends=('libxslt' 'libpcre' 'libffi' 'libiconv' 'zlib')
optdepends=('gamin: for gio fam module'
'python2: for gdbus-codegen and gtester-report')
'python3: for gdbus-codegen and gtester-report')
options=('!docs' '!emptydirs')
license=('LGPL')

View File

@@ -3,7 +3,7 @@
_realname=gyp
pkgname=${_realname}-git
pkgver=r2114.a2738d85
pkgver=r2162.2eef1129
pkgrel=1
pkgdesc="GYP can Generate Your Projects."
url="https://code.google.com/p/gyp/"
@@ -12,7 +12,7 @@ provides=("gyp")
conflicts=("gyp")
replaces=("gyp-svn")
makedepends=('git')
depends=('python2' 'python2-setuptools')
depends=('python3' 'python3-setuptools')
license=('custom')
source=("git+https://chromium.googlesource.com/external/gyp"
'0001-msys-ize.patch')
@@ -34,5 +34,5 @@ prepare() {
package() {
cd "${srcdir}"/${_realname}
python2 setup.py install --root="${pkgdir}"
python3 setup.py install --root="${pkgdir}"
}

View File

@@ -3,7 +3,7 @@
pkgbase="jsoncpp"
pkgname=("${pkgbase}" "${pkgbase}-devel")
pkgver=1.9.1
pkgrel=1
pkgrel=2
pkgdesc="A C++ library for interacting with JSON"
arch=('any')
url="https://github.com/open-source-parsers/jsoncpp"
@@ -11,7 +11,7 @@ license=('MIT')
depends=("gcc-libs")
makedepends=("gcc"
"cmake"
"python2")
"python3")
options=('staticlibs' '!strip' '!buildflags')
source=(${pkgname}-${pkgver}.tar.gz::"https://github.com/open-source-parsers/jsoncpp/archive/${pkgver}.tar.gz")
sha256sums=('c7b40f5605dd972108f503f031b20186f5e5bca2b65cd4b8bd6c3e4ba8126697')

View File

@@ -2,7 +2,7 @@
pkgname=('libevent' 'libevent-devel')
pkgver=2.1.11
pkgrel=1
pkgrel=2
pkgdesc="An event notification library"
arch=('i686' 'x86_64')
url="https://libevent.org/"
@@ -34,7 +34,7 @@ check() {
package_libevent() {
depends=('openssl')
optdepends=('python2: to use event_rpcgen.py')
optdepends=('python3: to use event_rpcgen.py')
mkdir -p $pkgdir/usr/bin
cp -rf $srcdir/dest/usr/bin $pkgdir/usr/

View File

@@ -2,19 +2,15 @@
pkgname=setconf
pkgver=0.7.6
pkgrel=1
pkgrel=2
pkgdesc='Utility to easily change settings in configuration files'
arch=('any')
url='https://setconf.roboticoverlords.org/'
license=('GPL2')
depends=('python2')
depends=('python3')
source=("https://setconf.roboticoverlords.org/$pkgname-$pkgver.tar.xz")
sha256sums=('98bd51861f0141508a20a81fc325204e9500f3b7305bc518f62bf5af91db8486')
prepare() {
sed -i 's:usr/bin/python:usr/bin/python2:' "$pkgname-$pkgver/$pkgname.py"
}
package() {
cd "$pkgname-$pkgver"