Skip to content

Commit

Permalink
devel/py-freezegun: Update to 0.3.6, Modernize
Browse files Browse the repository at this point in the history
- Update PORTVERSION and distinfo checksum (0.3.6)
- Update dateutil RUN_DEPENDS version to match that in setup.py
- Add mock to TEST_DEPENDS (requirements.txt)
- post-extract: Remove binary files and cache dirs from WRKSRC [1]
- Patch setup.py to add test depends and add support for test command
- Update test target, using canonical setuptools test command
- Enable NO_ARCH (architecture independent)

Changes:

  https://github.com/spulec/freezegun/blob/0.3.6/CHANGELOG

[1] spulec/freezegun#139
[2] spulec/freezegun#134
  • Loading branch information
koobs committed Mar 3, 2016
1 parent 670a138 commit 1e14862
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 7 deletions.
16 changes: 11 additions & 5 deletions devel/py-freezegun/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# $FreeBSD$

PORTNAME= freezegun
PORTVERSION= 0.3.3
PORTVERSION= 0.3.6
CATEGORIES= devel python
MASTER_SITES= CHEESESHOP
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
Expand All @@ -14,14 +14,20 @@ LICENSE= APACHE20
LICENSE_FILE= ${WRKSRC}/LICENSE

RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}six>0:${PORTSDIR}/devel/py-six \
${PYTHON_PKGNAMEPREFIX}dateutil>=2.1:${PORTSDIR}/devel/py-dateutil
${PYTHON_PKGNAMEPREFIX}dateutil>=2.0:${PORTSDIR}/devel/py-dateutil
TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}nose>0:${PORTSDIR}/devel/py-nose \
${PYTHON_PKGNAMEPREFIX}sqlite3>0:${PORTSDIR}/databases/py-sqlite3
${PYTHON_PKGNAMEPREFIX}sqlite3>0:${PORTSDIR}/databases/py-sqlite3 \
${PYTHON_PKGNAMEPREFIX}mock>0:${PORTSDIR}/devel/py-mock

USES= python
USE_PYTHON= autoplist distutils

regression-test: build
@cd ${WRKSRC} && ${PYTHON_CMD} ${PYDISTUTILS_SETUP} nosetests
NO_ARCH= yes

post-extract:
${FIND} ${WRKSRC} -type d -name __pycache__ -or -type f -name '*.py[co]' -exec ${RM} -rf {} +

do-test:
@cd ${WRKSRC} && ${PYTHON_CMD} ${PYDISTUTILS_SETUP} test

.include <bsd.port.mk>
4 changes: 2 additions & 2 deletions devel/py-freezegun/distinfo
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
SHA256 (freezegun-0.3.3.tar.gz) = aa36a5ca26be474fc706c6a8153d027510e2c5ffdd3c4a4fdb3b7e52cb70df97
SIZE (freezegun-0.3.3.tar.gz) = 41913
SHA256 (freezegun-0.3.6.tar.gz) = 44cef08c4b34be212534aec8ab61eccdc75ba9e4d908f99d1fcc7f778b4cbaf8
SIZE (freezegun-0.3.6.tar.gz) = 45838
23 changes: 23 additions & 0 deletions devel/py-freezegun/files/patch-setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
--- setup.py.orig 2016-03-03 08:44:23 UTC
+++ setup.py
@@ -11,6 +11,11 @@ else:
# Py3k
requires += ['python-dateutil>=2.0']

+tests_require = [
+ 'nose',
+ 'mock',
+]
+
setup(
name='freezegun',
version='0.3.6',
@@ -20,6 +25,8 @@ setup(
url='https://github.com/spulec/freezegun',
packages=['freezegun'],
install_requires=requires,
+ tests_require=tests_require,
+ test_suite='nose.collector',
include_package_data=True,
license='Apache 2.0',
classifiers=[

0 comments on commit 1e14862

Please sign in to comment.