Several python support packages

This commit is contained in:
layman 2022-07-22 16:58:53 +02:00
parent 284402f17d
commit 752b3f7934
6 changed files with 219 additions and 0 deletions

View File

@ -0,0 +1,50 @@
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI=7
PYTHON_COMPAT=( python3_{9,10} )
DISTUTILS_USE_SETUPTOOLS=rdepend
inherit distutils-r1
DESCRIPTION="Fully featured framework for fast, easy and documented API development with Flask"
HOMEPAGE="https://github.com/python-restx/flask-restx"
SRC_URI="https://github.com/python-restx/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="BSD"
SLOT="0"
KEYWORDS="amd64 x86"
IUSE="doc examples test"
RDEPEND="
>=dev-python/aniso8601-4.0.1[${PYTHON_USEDEP}]
>=dev-python/flask-0.8[${PYTHON_USEDEP}]
>=dev-python/six-1.3.0[${PYTHON_USEDEP}]
dev-python/pytz[${PYTHON_USEDEP}]
dev-python/jsonschema[${PYTHON_USEDEP}]
"
DEPEND="${RDEPEND}
doc? (
~dev-python/alabaster-0.7.12[${PYTHON_USEDEP}]
dev-python/sphinx[${PYTHON_USEDEP}]
~dev-python/sphinx-issues-1.2.0[${PYTHON_USEDEP}]
)
test? (
dev-python/nose[${PYTHON_USEDEP}]
dev-python/rednose[${PYTHON_USEDEP}]
dev-python/blinker[${PYTHON_USEDEP}]
dev-python/tzlocal[${PYTHON_USEDEP}]
)
"
src_prepare() {
use test || rm -rf "${S}"/tests
distutils-r1_src_prepare
}
python_test() {
nosetests -v || die "Tests fail with ${EPYTHON}"
rm -rf "${BUILD_DIR}"/../tests/ || die
}

View File

@ -0,0 +1,20 @@
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=7
PYTHON_COMPAT=( python3_{9,10} )
DISTUTILS_USE_SETUPTOOLS=rdepend
inherit distutils-r1
DESCRIPTION="Unified API for parsing NZB files"
HOMEPAGE="https://pypi.python.org/pypi/pynzb/"
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
LICENSE="BSD"
SLOT="0"
KEYWORDS="amd64 x86"
IUSE=""
DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]"
RDEPEND=""

View File

@ -0,0 +1,4 @@
AUX pytzdata-2020.1-system-zoneinfo.patch 3482 BLAKE2B 26c62593303e02d4037aba6e7b4ec7645610f3e73eadef9fcf483db5567e31d407efe92859d4157e672ce9683d135c2fcf2e63d427898d8bab1b0ead8db09299 SHA512 707afdd4bff5fb70f3bc4e20c88a1962f3fd56c15b3ff3e5896446d1eff55aaceefd53509fef1b4941d797e2c2aea41b72a87276fa64e562ad71609fa717a78e
DIST tzdata-2022.1.tar.gz 178166 BLAKE2B baefa7e5591c6790d68786eb01cd1107ae055e731757e94ce7aea3c4efabe334782759850af4921de553b33f3c2713951e992fa1b7ca63a9756cbeb5820c1e5e SHA512 2f495955dd14d0b064f8e9d49e589bf3c75d0753f2cf55819fe86317acb1ec041a22692ed94ed3c9a7f680c0f046c095c2059de3a1901fbb12258a44bdc13e8b
EBUILD tzdata-2022.1.ebuild 495 BLAKE2B 19a49fcfedb8fdf8493d712f772647ecc2154e55f0a28fa37e90370afd3d853661b09d574a94356701e0cc344d91e261c16af733fd49bfb3f3bd12b7449b763f SHA512 cd263f1d1296d25ebb06cc672b24fd45e83e6e806258f939ebf36f9d306bf7390011c74432ac149e3c18ed2c1e05991953e43542800e8feaae180543d1413b54
MISC metadata.xml 414 BLAKE2B 4b6e7f935a42ed815b92d7fec75b4db6fd3fa46386b5055462bb317bb6ac8526e3a965c803d6e207382ec396bc132d514ef083af91c9ac45ad2eaf67998b0b9e SHA512 80c0e415716770a0f18bd237e9039f72bdab0056c11e98ad2359431b14d0b239ae7a88840d774aa6d3b390fbc86bcf30e42a4981e52acda8e99666219982f445

View File

@ -0,0 +1,115 @@
From f0d2c5fd28dbe2aa9ecb59e140ab42b11d677a33 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
Date: Fri, 9 Jul 2021 10:15:51 +0200
Subject: [PATCH] Use system zoneinfo database by default
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: Michał Górny <mgorny@gentoo.org>
---
pytzdata/__init__.py | 2 +-
tests/test_set_directory.py | 8 +++-----
tests/test_tz_file.py | 5 ++---
tests/test_tz_path.py | 5 ++---
4 files changed, 8 insertions(+), 12 deletions(-)
diff --git a/pytzdata/__init__.py b/pytzdata/__init__.py
index 22940da..6c3bcb9 100644
--- a/pytzdata/__init__.py
+++ b/pytzdata/__init__.py
@@ -8,7 +8,7 @@ from ._compat import FileNotFoundError
DEFAULT_DIRECTORY = os.path.join(
- os.path.dirname(__file__),
+ '/usr/share',
'zoneinfo'
)
diff --git a/tests/test_set_directory.py b/tests/test_set_directory.py
index 430d239..6c078e6 100644
--- a/tests/test_set_directory.py
+++ b/tests/test_set_directory.py
@@ -2,7 +2,7 @@
import os
import pytest
-from pytzdata import set_directory, tz_path, TimezoneNotFound
+from pytzdata import set_directory, tz_path, TimezoneNotFound, DEFAULT_DIRECTORY
fixtures_path = os.path.join(os.path.dirname(__file__), 'fixtures', 'tz')
@@ -30,9 +30,8 @@ def test_set_directory():
with pytest.raises(TimezoneNotFound):
tz_path('America/New_York')
- here = os.path.realpath(os.path.dirname(__file__))
filepath = os.path.realpath(
- os.path.join(here, '..', 'pytzdata', 'zoneinfo', 'America', 'New_York')
+ os.path.join(DEFAULT_DIRECTORY, 'America', 'New_York')
)
set_directory()
@@ -51,9 +50,8 @@ def test_env_variable():
del os.environ['PYTZDATA_TZDATADIR']
- here = os.path.realpath(os.path.dirname(__file__))
filepath = os.path.realpath(
- os.path.join(here, '..', 'pytzdata', 'zoneinfo', 'America', 'New_York')
+ os.path.join(DEFAULT_DIRECTORY, 'America', 'New_York')
)
set_directory()
diff --git a/tests/test_tz_file.py b/tests/test_tz_file.py
index 8b912b5..b20c08b 100644
--- a/tests/test_tz_file.py
+++ b/tests/test_tz_file.py
@@ -3,7 +3,7 @@
import os
import pytest
-from pytzdata import tz_file, set_directory
+from pytzdata import tz_file, set_directory, DEFAULT_DIRECTORY
from pytzdata.exceptions import TimezoneNotFound
@@ -22,9 +22,8 @@ def teardown_module(module):
def test_tz_file():
- here = os.path.realpath(os.path.dirname(__file__))
filepath = os.path.realpath(
- os.path.join(here, '..', 'pytzdata', 'zoneinfo', 'Europe', 'Paris')
+ os.path.join(DEFAULT_DIRECTORY, 'Europe', 'Paris')
)
with open(filepath) as f1:
diff --git a/tests/test_tz_path.py b/tests/test_tz_path.py
index fd4db48..77c8c74 100644
--- a/tests/test_tz_path.py
+++ b/tests/test_tz_path.py
@@ -3,7 +3,7 @@
import os
import pytest
-from pytzdata import tz_path, set_directory
+from pytzdata import tz_path, set_directory, DEFAULT_DIRECTORY
from pytzdata.exceptions import TimezoneNotFound
@@ -22,9 +22,8 @@ def teardown_module(module):
def test_tz_path():
- here = os.path.realpath(os.path.dirname(__file__))
filepath = os.path.realpath(
- os.path.join(here, '..', 'pytzdata', 'zoneinfo', 'Europe', 'Paris')
+ os.path.join(DEFAULT_DIRECTORY, 'Europe', 'Paris')
)
assert filepath == tz_path('Europe/Paris')
--
2.32.0

View File

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>jsmolic@gentoo.org</email>
<name>Jakov Smolić</name>
</maintainer>
<stabilize-allarches/>
<upstream>
<remote-id type="github">sdispater/pytzdata</remote-id>
<remote-id type="pypi">pytzdata</remote-id>
</upstream>
</pkgmetadata>

View File

@ -0,0 +1,17 @@
# Copyright 2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DISTUTILS_USE_SETUPTOOLS=pyproject.toml
PYTHON_COMPAT=( python3_{8..10} )
inherit distutils-r1
DESCRIPTION="Python package wrapping the IANA time zone database"
HOMEPAGE="https://github.com/python/tzdata"
SRC_URI="https://github.com/python/tzdata/archive/${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="amd64 ~arm ~arm64 ~ppc64 ~x86"
distutils_enable_tests pytest