[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 09/10] gnu: Add python-natsort.
From: |
Ricardo Wurmus |
Subject: |
Re: [PATCH 09/10] gnu: Add python-natsort. |
Date: |
Thu, 21 Apr 2016 17:09:01 +0200 |
Ben Woodcroft <address@hidden> writes:
> * gnu/packages/python.scm (python-natsort, python2-natsort): New
> variables.
> ---
> gnu/packages/python.scm | 44 ++++++++++++++++++++++++++++++++++++++++++++
> 1 file changed, 44 insertions(+)
>
> diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
> index ea9f47a..7aae6fc 100644
> --- a/gnu/packages/python.scm
> +++ b/gnu/packages/python.scm
> @@ -8901,6 +8901,50 @@ The same is true of requests in terms of caching.")
> (inherit base)
> (native-inputs `(("python2-setuptools" ,python2-setuptools))))))
>
> +(define-public python-natsort
> + (package
> + (name "python-natsort")
> + (version "4.0.4")
> + (source
> + (origin
> + (method url-fetch)
> + (uri (string-append
> + "https://pypi.python.org/packages/source/n/natsort/natsort-"
> + version
> + ".tar.gz"))
Could you use “(pypi-uri "natsort" version)” instead?
> + (sha256
> + (base32
> + "0f8q66pyczgy1cm3nh8rkh7hgl9h49zx9r06mivg4y5sbzla6sy7"))))
> + (build-system python-build-system)
> + (native-inputs
> + `(("python-pytest" ,python-pytest)
> + ("python-pytest-flakes" ,python-pytest-flakes)
> + ("python-pytest-cov" ,python-pytest-cov)
> + ("python-pytest-cache" ,python-pytest-cache)
> + ("python-hypothesis" ,python-hypothesis)
> + ("python-pytest-pep8", python-pytest-pep8)))
> + (home-page "https://github.com/SethMMorton/natsort")
> + (synopsis "Sort lists naturally")
> + (description "When you try to sort a list of strings that contain
> numbers,
> +the normal python sort algorithm sorts lexicographically, so you might not
> get
> +the results that you expect. @code{natsort} provides a function
> address@hidden that helps sort lists 'naturally', either as real
> +numbers (i.e. signed/unsigned floats or ints), or as versions.")
> + (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
> + (append (package-native-inputs base)
> + `(("python2-mock" ,python2-mock)
> + ("python2-pathlib" ,python2-pathlib)
> + ("python2-enum34" ,python2-enum34)
> + ("python2-setuptools" ,python2-setuptools)))))))
> +
> (define-public python-cysignals
> (package
> (name "python-cysignals")
The rest looks fine to me.
~~ Ricardo
- Re: [PATCH 02/10] gnu: Add python-bz2file., (continued)
- [PATCH 01/10] gnu: Add python2-pytest-cache., Ben Woodcroft, 2016/04/21
- [PATCH 05/10] gnu: Add python-future., Ben Woodcroft, 2016/04/21
- [PATCH 07/10] gnu: python-tornado: Use 'python2-variant'., Ben Woodcroft, 2016/04/21
- [PATCH 08/10] gnu: python-ipython: Use 'python2-variant'., Ben Woodcroft, 2016/04/21
- [PATCH 09/10] gnu: Add python-natsort., Ben Woodcroft, 2016/04/21
- Re: [PATCH 09/10] gnu: Add python-natsort.,
Ricardo Wurmus <=
- [PATCH 10/10] gnu: Add python-scikit-bio., Ben Woodcroft, 2016/04/21
- [PATCH 04/10] gnu: Add python-pytest-flakes., Ben Woodcroft, 2016/04/21
- [PATCH 06/10] gnu: Add python-cachecontrol., Ben Woodcroft, 2016/04/21
- [PATCH 2/2] gnu: Add python-scikit-bio., Ben Woodcroft, 2016/04/24
- [PATCH v2] Add python-scikit-bio., Ben Woodcroft, 2016/04/24