Skip to content

Commit

Permalink
dev-python/aniso8601: version bump to 4.0.1
Browse files Browse the repository at this point in the history
Signed-off-by: Tim Harder <[email protected]>
  • Loading branch information
radhermit committed Dec 27, 2018
1 parent bf68e8d commit 693eb81
Show file tree
Hide file tree
Showing 3 changed files with 140 additions and 0 deletions.
1 change: 1 addition & 0 deletions dev-python/aniso8601/Manifest
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
DIST aniso8601-1.3.0.tar.gz 57730 BLAKE2B 7844add7f785371f69a8a473c0706edb76f994fccc99ae2cce3b56cd3a55041364bd08848acbd606453f4b8bfa3a80d063fc86ed49155817dc9fb8b7024c8e73 SHA512 33054b3bb07c26fda4af09c606dfa90be1fdebaa49efa8f508df72d339eb8f8b525ac2bad5d410098bbf1c88483823ad663649cf32f2806a9ee6e9ad46d53e8f
DIST aniso8601-3.0.0.tar.gz 69371 BLAKE2B 7dabeb013df414db6ade982595cb95514eb408855641ac2a6552f4ab1e646d478c2435a2b1537149fcbcffa076a913b45b644163585377cf98036d898ed1154c SHA512 bea2b9dad8f8ac2c5314570ce49846ef0cdf6459019065b5529966fbaf20a79d76b7af5a93f5bb8e1d811d3355a217877ae90d295529f3e9a7b2b20e6465b1c7
DIST aniso8601-3.0.2.tar.gz 69520 BLAKE2B 84cc774b72b04055fb7fe79456fa8c47b7ca3b2406dbbee5022912bf13bbe3663fc67ea663ba4654d27362df5bba6b9ce811ca89fc919fae9c0f5732087c43d4 SHA512 c367a9f783fc5e18bd761ce501ee7331cfd2b3f209578f90a16817ef47a16c45ea7ddc0ece648bcf91cc9e249f8f01b8d63fd1fd4bfa585bf2d959a4a12a3d6f
DIST aniso8601-4.0.1.tar.gz 109849 BLAKE2B 487bf340e181997219c2e39ed887161c3f5daa336cee79ce947b55a11c463b439086c3985fc93184de550f5e34e03f2d855ccb9a3072c0dc16ac21bf02a7e78f SHA512 5638ebf82a1a1aceee866eb17e8e4b5c8023961a9e31ce3e12123b89dba0ea0924e10a6aa458c838fcfdb72b94af4e81b3e9e8805cb534a1eccaf5a51f2026c9
26 changes: 26 additions & 0 deletions dev-python/aniso8601/aniso8601-4.0.1.ebuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Copyright 1999-2018 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=7
PYTHON_COMPAT=( python2_7 python3_{4,5,6,7} pypy pypy3 )

inherit distutils-r1

DESCRIPTION="A library for parsing ISO 8601 strings"
HOMEPAGE="https://bitbucket.org/nielsenb/aniso8601/ https://pypi.org/project/aniso8601/"
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"

LICENSE="GPL-3+"
SLOT="0"
KEYWORDS="~amd64 ~arm64 ~x86"
IUSE="test"

RDEPEND=">=dev-python/python-dateutil-2.7.3[${PYTHON_USEDEP}]"
DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]
test? ( $(python_gen_cond_dep 'dev-python/mock[${PYTHON_USEDEP}]' python2_7) )"

PATCHES=( "${FILESDIR}"/${P}-mock.patch )

python_test() {
"${PYTHON}" -m unittest discover ${PN}/tests -v || die "tests fail with ${EPYTHON}"
}
113 changes: 113 additions & 0 deletions dev-python/aniso8601/files/aniso8601-4.0.1-mock.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
From 12c2e06a88832fa208c9c0361e5ce91436a5d5ac Mon Sep 17 00:00:00 2001
From: Tim Harder <[email protected]>
Date: Thu, 27 Dec 2018 01:42:45 -0600
Subject: [PATCH] Use mock from unittest for python3.

---
aniso8601/tests/test_builder.py | 5 ++++-
aniso8601/tests/test_date.py | 5 ++++-
aniso8601/tests/test_duration.py | 5 ++++-
aniso8601/tests/test_interval.py | 5 ++++-
aniso8601/tests/test_time.py | 5 ++++-
aniso8601/tests/test_timezone.py | 5 ++++-
6 files changed, 24 insertions(+), 6 deletions(-)

diff --git a/aniso8601/tests/test_builder.py b/aniso8601/tests/test_builder.py
index 453f781..aafc7fe 100644
--- a/aniso8601/tests/test_builder.py
+++ b/aniso8601/tests/test_builder.py
@@ -9,7 +9,10 @@
import datetime
import pickle
import unittest
-import mock
+try:
+ from unittest import mock
+except ImportError:
+ import mock
import aniso8601
import dateutil.relativedelta

diff --git a/aniso8601/tests/test_date.py b/aniso8601/tests/test_date.py
index 2c60245..a991be1 100644
--- a/aniso8601/tests/test_date.py
+++ b/aniso8601/tests/test_date.py
@@ -7,7 +7,10 @@
# of the BSD license. See the LICENSE file for details.

import unittest
-import mock
+try:
+ from unittest import mock
+except ImportError:
+ import mock
import aniso8601

from aniso8601.exceptions import ISOFormatError
diff --git a/aniso8601/tests/test_duration.py b/aniso8601/tests/test_duration.py
index ed8383f..b835e1b 100644
--- a/aniso8601/tests/test_duration.py
+++ b/aniso8601/tests/test_duration.py
@@ -7,7 +7,10 @@
# of the BSD license. See the LICENSE file for details.

import unittest
-import mock
+try:
+ from unittest import mock
+except ImportError:
+ import mock
import aniso8601

from aniso8601.exceptions import ISOFormatError, NegativeDurationError
diff --git a/aniso8601/tests/test_interval.py b/aniso8601/tests/test_interval.py
index d05909d..d14045d 100644
--- a/aniso8601/tests/test_interval.py
+++ b/aniso8601/tests/test_interval.py
@@ -7,7 +7,10 @@
# of the BSD license. See the LICENSE file for details.

import unittest
-import mock
+try:
+ from unittest import mock
+except ImportError:
+ import mock
import aniso8601

from aniso8601.exceptions import ISOFormatError
diff --git a/aniso8601/tests/test_time.py b/aniso8601/tests/test_time.py
index 6cca13d..bade083 100644
--- a/aniso8601/tests/test_time.py
+++ b/aniso8601/tests/test_time.py
@@ -7,7 +7,10 @@
# of the BSD license. See the LICENSE file for details.

import unittest
-import mock
+try:
+ from unittest import mock
+except ImportError:
+ import mock
import aniso8601

from aniso8601.resolution import TimeResolution
diff --git a/aniso8601/tests/test_timezone.py b/aniso8601/tests/test_timezone.py
index 77903cb..1f43052 100644
--- a/aniso8601/tests/test_timezone.py
+++ b/aniso8601/tests/test_timezone.py
@@ -7,7 +7,10 @@
# of the BSD license. See the LICENSE file for details.

import unittest
-import mock
+try:
+ from unittest import mock
+except ImportError:
+ import mock
import aniso8601

from aniso8601.exceptions import ISOFormatError
--
2.20.1

0 comments on commit 693eb81

Please sign in to comment.