mirror of
https://github.com/pentoo/pentoo-overlay
synced 2026-04-19 21:31:10 +02:00
empire: prepare for python3.8 support
This commit is contained in:
parent
9132cbdc12
commit
06da2dc343
9 changed files with 43 additions and 217 deletions
|
|
@ -1,2 +1,3 @@
|
|||
DIST dropbox-sdk-10.1.1.tar.gz 1204066 BLAKE2B 8634915c24f1f1d3199103917987ae28c4df25146099da2a41e7c3dc185441b4c6fe887b49caf18ca65fcc66a214df9199e043f78754b4d23371e2c1a9dc6a7a SHA512 0af92e4460c2f2c3f520054d1c28678612ad92d1ea64451a26036b23876896f527aed2d959af398bbd0f7b7f21ee39afbf27bc3168a2c7636af8f76db64c4e67
|
||||
DIST dropbox-sdk-9.3.0.tar.gz 1065639 BLAKE2B f4f5a547cc2e6b391c4f432a64ddd905ad984a5b6d680d5b1172d69b381586f0f0df9c5dffc98ba0bae10221e2a79350591dedf8b89b890a2f7d30ad70c16e98 SHA512 ba20098f1a6ff0df79edf026ad94b1106f1056de2f0eec0bd74d25176e2eaeea20a7e95bdea9425ed60852e49a51ac904e596051ff79a60e3cd82bca144544e4
|
||||
DIST dropbox-sdk-9.4.0.tar.gz 1107947 BLAKE2B 773779791f81fb4ff5cb6d2c31f1ff83ddf58601d821fae22b78f7b33e06db6eea1b93ddfd4f38edacd36d92b9a36600ea797c7660c7dc27708ab3eb7273ba02 SHA512 977212f9d41221509b80ac91935e406659e31f3611e80330cea7122a351dc758573ba9fad7b3cd7a95fea3839514f99e02223fb0e25ab18d052f5af378eddbf2
|
||||
|
|
|
|||
36
dev-python/dropbox-sdk/dropbox-sdk-10.1.1.ebuild
Normal file
36
dev-python/dropbox-sdk/dropbox-sdk-10.1.1.ebuild
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
PYTHON_COMPAT=( python3_{6,7,8} )
|
||||
EGO_PN=github.com/dropbox/${PN}-python
|
||||
|
||||
inherit distutils-r1
|
||||
|
||||
DESCRIPTION="A Python SDK for integrating with the Dropbox API v2."
|
||||
HOMEPAGE="https://github.com/dropbox/dropbox-sdk-python"
|
||||
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
EGIT_COMMIT="v${PV}"
|
||||
SRC_URI="https://${EGO_PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
IUSE=""
|
||||
|
||||
RDEPEND=">=dev-python/requests-2.16.2[${PYTHON_USEDEP}]
|
||||
>=dev-python/six-1.12.0[${PYTHON_USEDEP}]"
|
||||
DEPEND="${RDEPEND}
|
||||
dev-python/setuptools[${PYTHON_USEDEP}]"
|
||||
#test? 'pytest-runner',
|
||||
# 'pytest',
|
||||
|
||||
S="${WORKDIR}/${PN}-python-${PV}"
|
||||
|
||||
python_prepare_all() {
|
||||
sed -e '/setup_requires=setup_requires/d' -i setup.py
|
||||
sed -e '/tests_require=test_reqs/d' -i setup.py
|
||||
distutils-r1_python_prepare_all
|
||||
}
|
||||
|
|
@ -1,2 +1 @@
|
|||
DIST pefile-2018.8.8.tar.gz 62505 BLAKE2B 767b236342708d349085118ff4f0ce0c3a466e0634ca3304cdb28bcfad718b1cb42256e707a7ef8faa6abc1d7fccb8bdf22d5e319c698ad5208b6afa9aa1a7e7 SHA512 44e8ed40f03e795badcc17cc6567165b3430aa80034f1b02b35fc15c94ce6b544ac195dedcea5858664c169fc4241e999df09a36f1a8a6635ce536af40284d29
|
||||
DIST pefile-2019.4.18.tar.gz 62374 BLAKE2B 0688c29d0360680b69ae6ae573da945664387e667f4d7911daa5efe3867697d0be15250898abf328a81114199dc785f3edffc570b53c5d941dd00cec73f2238e SHA512 33c53120fd6a0fde22f4076c19ed8f69fc2b53b16d0c581133446d0d770e290dcb2ddd1e9941e8d8debc28c1cb4ff64ff055c2b8c0958015d9121de72ae20c76
|
||||
|
|
|
|||
|
|
@ -1,19 +0,0 @@
|
|||
# Copyright 1999-2018 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
|
||||
PYTHON_COMPAT=( python2_7 python3_{4,5,6} )
|
||||
inherit distutils-r1 eutils
|
||||
|
||||
DESCRIPTION="Module to read and work with Portable Executable (PE) files"
|
||||
HOMEPAGE="https://github.com/erocarrera/pefile"
|
||||
SRC_URI="https://github.com/erocarrera/pefile/releases/download/v${PV}/${P}.tar.gz"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
IUSE=""
|
||||
|
||||
DEPEND="dev-python/future"
|
||||
RDEPEND="${DEPEND}"
|
||||
|
|
@ -1,9 +1,9 @@
|
|||
# Copyright 1999-2019 Gentoo Authors
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
PYTHON_COMPAT=( python2_7 python3_{4,5,6,7} )
|
||||
|
||||
PYTHON_COMPAT=( python2_7 python3_{6,7,8} )
|
||||
inherit distutils-r1
|
||||
|
||||
DESCRIPTION="Module to read and work with Portable Executable (PE) files"
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
EAPI=7
|
||||
|
||||
PYTHON_COMPAT=( python3_{6,7} )
|
||||
PYTHON_COMPAT=( python3_{6,7,8} )
|
||||
|
||||
inherit distutils-r1 vcs-snapshot
|
||||
|
||||
|
|
|
|||
|
|
@ -1,191 +0,0 @@
|
|||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=5
|
||||
|
||||
# PyInstaller assumes CPython internals and is hence currently incompatible with
|
||||
# alternative interpreters (e.g., PyPy).
|
||||
PYTHON_COMPAT=( python3_{6,7} )
|
||||
|
||||
# "waf" requires a threading-enabled Python interpreter.
|
||||
PYTHON_REQ_USE='threads(+)'
|
||||
|
||||
# Order of operations is significant here. Since we explicitly call "waf-utils"
|
||||
# but *NOT* "distutils-r1" phase functions, ensure the latter remain the default
|
||||
# by inheriting the latter *AFTER* the former.
|
||||
inherit waf-utils distutils-r1
|
||||
|
||||
DESCRIPTION="Program converting Python programs into stand-alone executables"
|
||||
HOMEPAGE="http://www.pyinstaller.org"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
|
||||
IUSE="clang debug doc leak-detector"
|
||||
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
|
||||
|
||||
#FIXME: Interestingly, PyInstaller itself has no hard or soft dependencies
|
||||
#excluding the expected build-time dependency of "setuptools". Its unit tests,
|
||||
#however, require an elaborate set of pure-Python packages, C-based Python
|
||||
#extensions, and system-wide shared libraries. It's fairly extreme --
|
||||
#sufficiently extreme, in fact, that we do *NOT* currently bother. For an
|
||||
#exhaustive list of such dependencies, see "tests/test-requirements.txt".
|
||||
|
||||
RDEPEND="${PYTHON_DEPS}
|
||||
>=dev-python/macholib-1.8[${PYTHON_USEDEP}]
|
||||
dev-python/altgraph[${PYTHON_USEDEP}]
|
||||
>=dev-python/pefile-2018.08.08[${PYTHON_USEDEP}]"
|
||||
DEPEND="${RDEPEND}
|
||||
leak-detector? ( dev-libs/boehm-gc )
|
||||
clang? ( sys-devel/clang )
|
||||
!clang? ( sys-devel/gcc )
|
||||
"
|
||||
|
||||
# While the typical "waf" project permits "waf" to be run from outside the
|
||||
# directory containing "waf", PyInstaller requires "waf" to be run from inside
|
||||
# such directory in a relative manner. Ensure this.
|
||||
WAF_BINARY="./waf"
|
||||
|
||||
# Since the "waf" script bundled with PyInstaller does *NOT* support the
|
||||
# conventionel "--libdir" option, prevent such option from being passed.
|
||||
NO_WAF_LIBDIR=1
|
||||
|
||||
QA_FLAGS_IGNORED="usr/lib.*/python.*/site-packages/PyInstaller/bootloader/Linux-.*bit/.*"
|
||||
QA_PRESTRIPPED="usr/lib.*/python.*/site-packages/PyInstaller/bootloader/Linux-.*bit/.*"
|
||||
|
||||
if [[ ${PV} == 9999 ]]; then
|
||||
inherit git-r3
|
||||
|
||||
EGIT_REPO_URI="https://github.com/pyinstaller/pyinstaller"
|
||||
EGIT_BRANCH="develop"
|
||||
SRC_URI=""
|
||||
KEYWORDS=""
|
||||
else
|
||||
MY_PN="PyInstaller"
|
||||
MY_P="${MY_PN}-${PV}"
|
||||
SRC_URI="https://github.com/pyinstaller/pyinstaller/releases/download/v${PV}/${MY_P}.tar.gz"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
S="${WORKDIR}/${MY_P}"
|
||||
fi
|
||||
|
||||
python_prepare_all() {
|
||||
#FIXME: This is almost certainly wrong. We almost certainly want to use
|
||||
#actual USE flags instead: e.g.,
|
||||
#
|
||||
# local arch_word_size
|
||||
# if use amd64; then
|
||||
# arch_word_size=64
|
||||
# elif use x86; then
|
||||
# arch_word_size=32
|
||||
# else
|
||||
# die "Architecture \"${ARCH}\" unsupported."
|
||||
# fi
|
||||
|
||||
# Word size for the current architecture. (There simply *MUST* be a more
|
||||
# Gentooish way of determining this. I couldn't find it. While we should
|
||||
# arguably test "[[ "$(getconf LONG_BIT)" == 64 ]]" instead, such magic is
|
||||
# arguably even kludgier. Your mileage may vary.)
|
||||
local arch_word_size
|
||||
case "${ARCH}" in
|
||||
amd64) arch_word_size=64;;
|
||||
*) arch_word_size=32;;
|
||||
esac
|
||||
|
||||
# Install only the Linux bootloader specific to:
|
||||
#
|
||||
# * The architecture of the current machine.
|
||||
# * The release type requested for the current installation. Specifically:
|
||||
# * If the "debug" USE flag is enabled, only install the "run_d" binary.
|
||||
# * Else, only install the "run" binary.
|
||||
local bootloader_basename='run'
|
||||
use debug && bootloader_basename+='_d'
|
||||
sed -i \
|
||||
-e '/.*bootloader\/\*\/*.*/s~\*/\*~Linux-'${arch_word_size}'bit/'${bootloader_basename}'~' \
|
||||
setup.py || die '"sed" failed.'
|
||||
|
||||
# Prevent badness during compilation. Specifically (in order):
|
||||
#
|
||||
# * Avoid stripping bootloader binaries.
|
||||
# * Prevent the bootloader from being compiled under:
|
||||
# * Hard-coded ${CFLAGS}.
|
||||
# * gcc option "-Werror", converting compiler warnings to errors and hence
|
||||
# failing on the first (inevitable) warning.
|
||||
sed -i \
|
||||
-e "s~\\(\\s*\\)ctx.env.append_value('CFLAGS', '-O2')$~\\1pass~" \
|
||||
-e "/'CFLAGS',\\s*'-Werror'/d" \
|
||||
bootloader/wscript || die '"sed" failed.'
|
||||
|
||||
# Continue with the default behaviour.
|
||||
distutils-r1_python_prepare_all
|
||||
}
|
||||
|
||||
python_configure() {
|
||||
# CLI options to be passed to the "waf configure" command run below.
|
||||
local -a waf_configure_options; waf_configure_options=(
|
||||
# Since Gentoo is *NOT* LSB-compliant, a non-LSB-compliant bootloader
|
||||
# must be built. Sadly, doing so could reduce the portability of the
|
||||
# resulting bootloader and hence applications frozen under that
|
||||
# bootloader. Until Gentoo supplies an ebuild for building at least
|
||||
# version 4.0 of the LSB tools, there's little we can do here.
|
||||
--no-lsb
|
||||
)
|
||||
use debug && waf_configure_options+=( --debug )
|
||||
use clang && waf_configure_options+=( --clang )
|
||||
use leak-detector && waf_configure_options+=( --leak-detector )
|
||||
|
||||
# Configure the Linux bootloader.
|
||||
cd bootloader
|
||||
waf-utils_src_configure "${waf_configure_options[@]}"
|
||||
|
||||
# Continue with the default behaviour.
|
||||
cd "${S}"
|
||||
distutils-r1_python_configure
|
||||
}
|
||||
|
||||
python_compile() {
|
||||
# Compile the non-debug Linux bootloader. Ideally, we would simply call
|
||||
# waf-utils_src_compile() to do so. Unfortunately, that function attempts to
|
||||
# run the "build" WAF task, which for PyInstaller *ALWAYS* fails with the
|
||||
# following fatal error:
|
||||
#
|
||||
# Call "python waf all" to compile all bootloaders.
|
||||
#
|
||||
# Since the "waf-utils" eclass does *NOT* support running of alternative
|
||||
# tasks, we reimplement waf-utils_src_compile() to do so. (Since this is
|
||||
# lame, we should probably file a feature request with the author of the
|
||||
# "waf-utils" eclass.)
|
||||
cd bootloader
|
||||
local _mywafconfig
|
||||
[[ "${WAF_VERBOSE}" ]] && _mywafconfig="--verbose"
|
||||
local jobs="--jobs=$(makeopts_jobs)"
|
||||
echo "\"${WAF_BINARY}\" build_release ${_mywafconfig} ${jobs}"
|
||||
"${WAF_BINARY}" build_release ${_mywafconfig} ${jobs} ||
|
||||
die "Bootloader compilation failed."
|
||||
|
||||
# Move the binaries for such bootloader to "PyInstaller/bootloader" *BEFORE*
|
||||
# compiling the non-bootloader portion of PyInstaller, which requires such
|
||||
# binaries. (Note that the "install_release" task does *NOT* install files
|
||||
# to ${IMAGE}, despite the "install" in such task name.)
|
||||
"${WAF_BINARY}" install_release || die "Bootloader installation failed."
|
||||
|
||||
# Continue with the default behaviour.
|
||||
cd "${S}"
|
||||
distutils-r1_python_compile
|
||||
}
|
||||
|
||||
python_install_all() {
|
||||
distutils-r1_python_install_all
|
||||
|
||||
# Install plaintext documentation.
|
||||
dodoc README.rst doc/*.rst
|
||||
|
||||
# If requested, install non-plaintext documentation as well.
|
||||
if use doc; then
|
||||
# Install HTML documentation.
|
||||
dohtml -r doc/*
|
||||
|
||||
# Install PDF documentation.
|
||||
docinto pdf
|
||||
dodoc doc/*.pdf
|
||||
fi
|
||||
}
|
||||
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
EAPI=7
|
||||
|
||||
PYTHON_COMPAT=( python3_{6,7} )
|
||||
PYTHON_COMPAT=( python3_{6,7,8} )
|
||||
PYTHON_REQ_USE='threads(+)'
|
||||
|
||||
inherit distutils-r1
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
# Copyright 1999-2018 Gentoo Authors
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
PYTHON_COMPAT=( python2_7 python3_{5,6,7} )
|
||||
PYTHON_COMPAT=( python3_{6,7,8} )
|
||||
inherit distutils-r1
|
||||
|
||||
DESCRIPTION="Wrapper around zlib with custom header crc32."
|
||||
|
|
|
|||
Loading…
Reference in a new issue