* [PATCH 1/3] gnu: Add python-pytest-pep8.
@ 2016-09-11 14:07 Marius Bakke
2016-09-11 14:07 ` [PATCH 2/3] gnu: Add python-pytest-flakes Marius Bakke
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Marius Bakke @ 2016-09-11 14:07 UTC (permalink / raw)
To: guix-devel
* gnu/packages/python.scm (python-pytest-pep8, python2-pytest-pep8): New
variables.
---
gnu/packages/python.scm | 33 +++++++++++++++++++++++++++++++++
1 file changed, 33 insertions(+)
diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 8b9273c..21eda38 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -10327,3 +10327,36 @@ Python to manipulate OpenDocument 1.2 files.")
(native-inputs
`(("python2-setuptools" ,python2-setuptools)
,@(package-native-inputs base))))))
+
+(define-public python-pytest-pep8
+ (package
+ (name "python-pytest-pep8")
+ (version "1.0.6")
+ (source (origin
+ (method url-fetch)
+ (uri (pypi-uri "pytest-pep8" version))
+ (sha256
+ (base32
+ "06032agzhw1i9d9qlhfblnl3dw5hcyxhagn7b120zhrszbjzfbh3"))))
+ (build-system python-build-system)
+ (arguments
+ `(#:tests? #f ; Fails with recent pytest and pep8. See upstream issues #8 and #12.
+ ;; Prevent creation of the egg. This works around
+ ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=20765 .
+ #:configure-flags '("--single-version-externally-managed" "--root=/")))
+ (native-inputs
+ `(("python-pytest" ,python-pytest)))
+ (propagated-inputs
+ `(("python-pep8" ,python-pep8)))
+ (home-page "https://bitbucket.org/pytest-dev/pytest-pep8")
+ (synopsis "Py.test plugin to check PEP8 requirements")
+ (description "Pytest plugin for efficiently checking PEP8 compliance")
+ (license license:expat)
+ (properties `((python2-variant . ,(delay python2-pytest-pep8))))))
+
+(define-public python2-pytest-pep8
+ (let ((base (package-with-python2 (strip-python2-variant python-pytest-pep8))))
+ (package (inherit base)
+ (native-inputs
+ `(("python2-setuptools" ,python2-setuptools)
+ ,@(package-native-inputs base))))))
--
2.9.3
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 2/3] gnu: Add python-pytest-flakes.
2016-09-11 14:07 [PATCH 1/3] gnu: Add python-pytest-pep8 Marius Bakke
@ 2016-09-11 14:07 ` Marius Bakke
2016-09-14 21:42 ` Leo Famulari
2016-09-11 14:07 ` [PATCH 3/3] gnu: Add python-natsort Marius Bakke
2016-09-14 21:41 ` [PATCH 1/3] gnu: Add python-pytest-pep8 Leo Famulari
2 siblings, 1 reply; 7+ messages in thread
From: Marius Bakke @ 2016-09-11 14:07 UTC (permalink / raw)
To: guix-devel
* gnu/packages/python.scm (python-pytest-flakes, python2-pytest-flakes):
New variables.
---
gnu/packages/python.scm | 42 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 42 insertions(+)
diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 21eda38..bd70cb6 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -10360,3 +10360,45 @@ Python to manipulate OpenDocument 1.2 files.")
(native-inputs
`(("python2-setuptools" ,python2-setuptools)
,@(package-native-inputs base))))))
+
+(define-public python-pytest-flakes
+ (package
+ (name "python-pytest-flakes")
+ (version "1.0.1")
+ (source (origin
+ (method url-fetch)
+ (uri (pypi-uri "pytest-flakes" version))
+ (sha256
+ (base32
+ "0flag3n33kbhyjrhzmq990rvg4yb8hhhl0i48q9hw0ll89jp28lw"))))
+ (build-system python-build-system)
+ (arguments
+ `(;; Prevent creation of the egg. This works around
+ ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=20765 .
+ #:configure-flags '("--single-version-externally-managed" "--root=/")
+ #:phases
+ (modify-phases %standard-phases
+ (delete 'check)
+ (add-after 'install 'check
+ (lambda _ ; It's easier to run tests after install.
+ (zero? (system* "py.test" "-vv")))))))
+ (native-inputs
+ `(("python-coverage" ,python-coverage)
+ ("python-pytest" ,python-pytest)
+ ("python-pytest-cache" ,python-pytest-cache)
+ ("python-pytest-pep8" ,python-pytest-pep8)))
+ (propagated-inputs
+ `(("python-pyflakes" ,python-pyflakes)))
+ (home-page "https://github.com/fschulze/pytest-flakes")
+ (synopsis "Py.test plugin to check source code with pyflakes")
+ (description "Pytest plugin for efficiently checking python source
+with pyflakes.")
+ (license license:expat)
+ (properties `((python2-variant . ,(delay python2-pytest-flakes))))))
+
+(define-public python2-pytest-flakes
+ (let ((base (package-with-python2 (strip-python2-variant python-pytest-flakes))))
+ (package (inherit base)
+ (native-inputs
+ `(("python2-setuptools" ,python2-setuptools)
+ ,@(package-native-inputs base))))))
--
2.9.3
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 3/3] gnu: Add python-natsort.
2016-09-11 14:07 [PATCH 1/3] gnu: Add python-pytest-pep8 Marius Bakke
2016-09-11 14:07 ` [PATCH 2/3] gnu: Add python-pytest-flakes Marius Bakke
@ 2016-09-11 14:07 ` Marius Bakke
2016-09-15 0:57 ` Leo Famulari
2016-09-14 21:41 ` [PATCH 1/3] gnu: Add python-pytest-pep8 Leo Famulari
2 siblings, 1 reply; 7+ messages in thread
From: Marius Bakke @ 2016-09-11 14:07 UTC (permalink / raw)
To: guix-devel
* gnu/packages/python.scm (python-natsort, python2-natsort): New variables.
---
gnu/packages/python.scm | 49 +++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 49 insertions(+)
diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index bd70cb6..f8e25d4 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -10402,3 +10402,52 @@ with pyflakes.")
(native-inputs
`(("python2-setuptools" ,python2-setuptools)
,@(package-native-inputs base))))))
+
+(define-public python-natsort
+ (package
+ (name "python-natsort")
+ (version "5.0.1")
+ (source (origin
+ (method url-fetch)
+ (uri (pypi-uri "natsort" version))
+ (sha256
+ (base32
+ "1abld5p4a6n5zjnyw5mi2pv37gqalcybv2brjr2y6l9l2p8v9mja"))))
+ (build-system python-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-before 'check 'set-cachedir
+ ;; Tests require write access to $HOME by default
+ (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t)))))
+ (native-inputs
+ `(("python-hypothesis" ,python-hypothesis)
+ ("python-pytest-cache" ,python-pytest-cache)
+ ("python-pytest-cov" ,python-pytest-cov)
+ ("python-pytest-flakes" ,python-pytest-flakes)
+ ("python-pytest-pep8" ,python-pytest-pep8)))
+ (propagated-inputs ; TODO: Add python-fastnumbers.
+ `(("python-pyicu" ,python-pyicu)))
+ (home-page "https://github.com/SethMMorton/natsort")
+ (synopsis "Natural sorting for python and shell")
+ (description
+ "Natsort lets you apply natural sorting on lists instead of
+lexicographical. If you use the built-in @code{sorted} method in python
+on a list such as @code{['a20', 'a9', 'a1', 'a4', 'a10']}, it would be
+returned as @code{['a1', 'a10', 'a20', 'a4', 'a9']}. Natsort provides a
+function @code{natsorted} that identifies numbers and sorts them separately
+from strings. It can also sort version numbers, real numbers, mixed types
+and more, and comes with a shell command @command{natsort} that exposes this
+functionality in the command line.")
+ (license license:expat)
+ (properties `((python2-variant . ,(delay python2-natsort))))))
+
+(define-public python2-natsort
+ (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
+ (package (inherit base)
+ (native-inputs
+ `(("python2-setuptools" ,python2-setuptools)
+ ("python2-pathlib" ,python2-pathlib)
+ ("python2-mock" ,python2-mock)
+ ("python2-enum34" ,python2-enum34)
+ ,@(package-native-inputs base))))))
--
2.9.3
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 1/3] gnu: Add python-pytest-pep8.
2016-09-11 14:07 [PATCH 1/3] gnu: Add python-pytest-pep8 Marius Bakke
2016-09-11 14:07 ` [PATCH 2/3] gnu: Add python-pytest-flakes Marius Bakke
2016-09-11 14:07 ` [PATCH 3/3] gnu: Add python-natsort Marius Bakke
@ 2016-09-14 21:41 ` Leo Famulari
2016-09-14 22:39 ` Marius Bakke
2 siblings, 1 reply; 7+ messages in thread
From: Leo Famulari @ 2016-09-14 21:41 UTC (permalink / raw)
To: Marius Bakke; +Cc: guix-devel
On Sun, Sep 11, 2016 at 03:07:35PM +0100, Marius Bakke wrote:
> * gnu/packages/python.scm (python-pytest-pep8, python2-pytest-pep8): New
> variables.
Overall LGTM...
> + (description "Pytest plugin for efficiently checking PEP8 compliance")
I think we can drop "efficiently". I can do that before committing if
you agree; no need to send an updated patch.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 2/3] gnu: Add python-pytest-flakes.
2016-09-11 14:07 ` [PATCH 2/3] gnu: Add python-pytest-flakes Marius Bakke
@ 2016-09-14 21:42 ` Leo Famulari
0 siblings, 0 replies; 7+ messages in thread
From: Leo Famulari @ 2016-09-14 21:42 UTC (permalink / raw)
To: Marius Bakke; +Cc: guix-devel
On Sun, Sep 11, 2016 at 03:07:36PM +0100, Marius Bakke wrote:
> * gnu/packages/python.scm (python-pytest-flakes, python2-pytest-flakes):
> New variables.
> + (description "Pytest plugin for efficiently checking python source
> +with pyflakes.")
I have the same question about removing "efficiently" as about
python-pytest-pep8.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/3] gnu: Add python-pytest-pep8.
2016-09-14 21:41 ` [PATCH 1/3] gnu: Add python-pytest-pep8 Leo Famulari
@ 2016-09-14 22:39 ` Marius Bakke
0 siblings, 0 replies; 7+ messages in thread
From: Marius Bakke @ 2016-09-14 22:39 UTC (permalink / raw)
To: Leo Famulari; +Cc: guix-devel
Leo Famulari <leo@famulari.name> writes:
> On Sun, Sep 11, 2016 at 03:07:35PM +0100, Marius Bakke wrote:
>> * gnu/packages/python.scm (python-pytest-pep8, python2-pytest-pep8): New
>> variables.
>
> Overall LGTM...
>
>> + (description "Pytest plugin for efficiently checking PEP8 compliance")
>
> I think we can drop "efficiently". I can do that before committing if
> you agree; no need to send an updated patch.
Thanks! Please do that for both the pep8 and flakes pytest plugins.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 3/3] gnu: Add python-natsort.
2016-09-11 14:07 ` [PATCH 3/3] gnu: Add python-natsort Marius Bakke
@ 2016-09-15 0:57 ` Leo Famulari
0 siblings, 0 replies; 7+ messages in thread
From: Leo Famulari @ 2016-09-15 0:57 UTC (permalink / raw)
To: Marius Bakke; +Cc: guix-devel
On Sun, Sep 11, 2016 at 03:07:37PM +0100, Marius Bakke wrote:
> * gnu/packages/python.scm (python-natsort, python2-natsort): New variables.
Thanks! I pushed the patch series as
5467ea6200e7cf9fa57f340849b6ec1becc87b3d
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2016-09-15 0:57 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-11 14:07 [PATCH 1/3] gnu: Add python-pytest-pep8 Marius Bakke
2016-09-11 14:07 ` [PATCH 2/3] gnu: Add python-pytest-flakes Marius Bakke
2016-09-14 21:42 ` Leo Famulari
2016-09-11 14:07 ` [PATCH 3/3] gnu: Add python-natsort Marius Bakke
2016-09-15 0:57 ` Leo Famulari
2016-09-14 21:41 ` [PATCH 1/3] gnu: Add python-pytest-pep8 Leo Famulari
2016-09-14 22:39 ` Marius Bakke
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.