summary refs log tree commit diff
path: root/gnu
diff options
context:
space:
mode:
authorRicardo Wurmus <rekado@elephly.net>2020-04-29 13:38:22 +0200
committerRicardo Wurmus <rekado@elephly.net>2020-04-29 13:46:07 +0200
commitd08782d16c21998a493e50e2c90a183a3d4a53bb (patch)
treede7d7942a7077e666d5447dd2cd1a11c6e66ff6c /gnu
parent39a96b99fe66c2cf7ff8ff023f3839647332ebd9 (diff)
downloadguix-d08782d16c21998a493e50e2c90a183a3d4a53bb.tar.gz
gnu: Add python-port-for.
* gnu/packages/python-web.scm (python-port-for): New variable.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/python-web.scm32
1 files changed, 32 insertions, 0 deletions
diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm
index 30cd22fddb..c0be3fa5d1 100644
--- a/gnu/packages/python-web.scm
+++ b/gnu/packages/python-web.scm
@@ -3595,3 +3595,35 @@ and rendering come directly from GitHub, so you'll know exactly how it will
 appear.  Changes you make to the file will be instantly reflected in the browser
 without requiring a page refresh.")
       (license license:expat))))
+
+(define-public python-port-for
+  (package
+    (name "python-port-for")
+    (version "0.4")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "port-for" version))
+       (sha256
+        (base32
+         "1pncxlj25ggw99r0ijfbkq70gd7cbhqdx5ivsxy4jdp0z14cpda7"))))
+    (build-system python-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'use-urllib3
+           (lambda _
+             (substitute* "port_for/_download_ranges.py"
+               (("urllib2") "urllib3"))
+             #t)))))
+    (propagated-inputs
+     `(("python-urllib3" ,python-urllib3)))
+    (native-inputs
+     `(("python-mock" ,python-mock)))
+    (home-page "https://github.com/kmike/port-for/")
+    (synopsis "TCP localhost port finder and association manager")
+    (description
+     "This package provides a utility that helps with local TCP ports
+management.  It can find an unused TCP localhost port and remember the
+association.")
+    (license license:expat)))