Bug 182313 - [new port] finance/py-stripe: Python bindings for the Stripe.com payment service
Summary: [new port] finance/py-stripe: Python bindings for the Stripe.com payment service
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Kubilay Kocak
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-09-23 09:20 UTC by Trevor Caira
Modified: 2013-10-26 08:01 UTC (History)
0 users

See Also:


Attachments
file.shar (3.39 KB, text/plain)
2013-09-23 09:20 UTC, Trevor Caira
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Trevor Caira 2013-09-23 09:20:00 UTC
New port: finance/py-stripe

Python bindings for the Stripe.com payment service REST API.

Fix: Shell archive attached.

Patch attached with submission follows:
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2013-09-23 09:20:08 UTC
Responsible Changed
From-To: freebsd-ports-bugs->freebsd-python

freebsd-python@ wants this port PRs (via the GNATS Auto Assign Tool)
Comment 2 Trevor Caira 2013-10-25 02:44:37 UTC
Following up to check the review status for this new port.

Trevor
Comment 3 Kubilay Kocak freebsd_committer freebsd_triage 2013-10-26 04:20:52 UTC
Responsible Changed
From-To: freebsd-python->koobs

I'll take it.
Comment 4 dfilter service freebsd_committer freebsd_triage 2013-10-26 07:16:27 UTC
Author: koobs
Date: Sat Oct 26 06:16:19 2013
New Revision: 331653
URL: http://svnweb.freebsd.org/changeset/ports/331653

Log:
  finance/py-stripe: Python bindings for Stripe.com [NEW PORT]
  
  Python bindings for the Stripe.com payment service REST API.
  
  WWW: https://github.com/stripe/stripe-python
  
  PR:		ports/182313
  Submitted by:	Trevor Caira <trevor@bitba.se>

Added:
  head/finance/py-stripe/
  head/finance/py-stripe/Makefile   (contents, props changed)
  head/finance/py-stripe/distinfo   (contents, props changed)
  head/finance/py-stripe/pkg-descr   (contents, props changed)
Modified:
  head/finance/Makefile

Modified: head/finance/Makefile
==============================================================================
--- head/finance/Makefile	Sat Oct 26 05:16:00 2013	(r331652)
+++ head/finance/Makefile	Sat Oct 26 06:16:19 2013	(r331653)
@@ -93,6 +93,7 @@
     SUBDIR += pear_Payment_DTA
     SUBDIR += php-tclink
     SUBDIR += prestashop
+    SUBDIR += py-stripe
     SUBDIR += py-vatnumber
     SUBDIR += qhacc
     SUBDIR += quantlib

Added: head/finance/py-stripe/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/finance/py-stripe/Makefile	Sat Oct 26 06:16:19 2013	(r331653)
@@ -0,0 +1,32 @@
+# Created by: Trevor Caira <trevor@bitba.se>
+# $FreeBSD$
+#
+
+PORTNAME=	stripe
+PORTVERSION=	1.9.5
+CATEGORIES=	finance python
+MASTER_SITES=	https://code.stripe.com/stripe/
+PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
+
+MAINTAINER=	trevor@bitba.se
+COMMENT=	Python bindings for the Stripe.com payment system
+
+LICENSE=	MIT
+
+RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}requests>=0.8.8:${PORTSDIR}/www/py-requests
+TEST_DEPENDS:=	${RUN_DEPENDS
+
+USE_PYTHON=		yes
+USE_PYDISTUTILS=	easy_install
+PYDISTUTILS_AUTOPLIST=	yes
+
+post-patch:
+	@${REINPLACE_CMD} 's/version=version\.VERSION,/version=version.VERSION, zip_safe=False,/' \
+		${WRKSRC}/setup.py
+
+NO_STAGE=	yes
+
+regression-test: build
+	@cd ${WRKSRC} && ${PYTHON_CMD} ${PYSETUP} test
+
+.include <bsd.port.mk>

Added: head/finance/py-stripe/distinfo
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/finance/py-stripe/distinfo	Sat Oct 26 06:16:19 2013	(r331653)
@@ -0,0 +1,2 @@
+SHA256 (stripe-1.9.5.tar.gz) = 5c01bab3ae831f8eb2ad72f9337777f66abb2f952cddc417bfb31038335d746c
+SIZE (stripe-1.9.5.tar.gz) = 142358

Added: head/finance/py-stripe/pkg-descr
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/finance/py-stripe/pkg-descr	Sat Oct 26 06:16:19 2013	(r331653)
@@ -0,0 +1,3 @@
+Python bindings for the Stripe.com payment service REST API.
+
+WWW: https://github.com/stripe/stripe-python
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 5 koobs 2013-10-26 07:23:55 UTC
Hi Trevor,

Quick review summary:

- NO_STAGE=yes is needed at the moment for Python ports that use
  setuptools, ie; when using USE_PYDISTUTILS=easy_install (via port
  test and portlint)

- Multiple MASTER_SITES are preferred (via portlint)

  It's preferred to have multiple MASTER_SITES or one fronted by a
  CDN or other High-Availability architecture. Unfortuntely the size of
  the DISTFILE on PyPI (CHEESESHOP) and stripe.com are different so they
  can't be used together (portlint). MASTER_SITES=CHEESESHOP is backed
  by multiple mirrors, I'll leave the decision to you as maintainer.

- Some directories were missing from pkg-plist (via port test)

   @dirrm %%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/stripe/test
   @dirrm %%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/stripe/data
   @dirrm %%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/stripe

- I added a regression-test target to run the test suite, and found one
  failure. This may be a requests 1.2 incompatibility, but I didn't
  investigate.

  ERROR: test_builds_url_correctly_with_base_url_query_params
  (stripe.test.test_stripe.StripeAPIRequestorTests)

Tips:

- PYDISTUTILS_AUTOPLIST=yes precludes the need to use a pkg-plist
  at all

- Run your ports through ports-mgmt/portlint or `port test -l` (a part
  of ports-mgmt/porttools) to pickup warnings and other issues

- Run your port through `port test` (a command of ports-mgmt/porttools)
  to pick up install, deinstall and other errors

Thanks for your submission!
Comment 6 dfilter service freebsd_committer freebsd_triage 2013-10-26 07:44:33 UTC
Author: koobs
Date: Sat Oct 26 06:44:26 2013
New Revision: 331654
URL: http://svnweb.freebsd.org/changeset/ports/331654

Log:
  finance/py-stripe: Update to 1.9.8
  
  - Update to 1.9.8
  
    I missed this during the initial port commit. It fixes the failing unit
    test.
  
  Changes:
  
   1.9.8 2013-10-17: Removed incorrect test.
   1.9.7 2013-10-10: Add support for metadata.
   1.9.6 2013-10-08: Fix issue with support for closing disputes.
  
  PR:		ports/182313

Modified:
  head/finance/py-stripe/Makefile
  head/finance/py-stripe/distinfo

Modified: head/finance/py-stripe/Makefile
==============================================================================
--- head/finance/py-stripe/Makefile	Sat Oct 26 06:16:19 2013	(r331653)
+++ head/finance/py-stripe/Makefile	Sat Oct 26 06:44:26 2013	(r331654)
@@ -3,7 +3,7 @@
 #
 
 PORTNAME=	stripe
-PORTVERSION=	1.9.5
+PORTVERSION=	1.9.8
 CATEGORIES=	finance python
 MASTER_SITES=	https://code.stripe.com/stripe/
 PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}

Modified: head/finance/py-stripe/distinfo
==============================================================================
--- head/finance/py-stripe/distinfo	Sat Oct 26 06:16:19 2013	(r331653)
+++ head/finance/py-stripe/distinfo	Sat Oct 26 06:44:26 2013	(r331654)
@@ -1,2 +1,2 @@
-SHA256 (stripe-1.9.5.tar.gz) = 5c01bab3ae831f8eb2ad72f9337777f66abb2f952cddc417bfb31038335d746c
-SIZE (stripe-1.9.5.tar.gz) = 142358
+SHA256 (stripe-1.9.8.tar.gz) = 6fa50635daf56340fda495b1cb6cbaeefea0b73ef3d1ef4e69cafe9437e52479
+SIZE (stripe-1.9.8.tar.gz) = 143137
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 7 Kubilay Kocak freebsd_committer freebsd_triage 2013-10-26 08:01:33 UTC
State Changed
From-To: open->closed

New port added, with changes. Thanks Trevor!