guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#41459] [PATCH] gnu: Add python-flask-restx


From: Marius Bakke
Subject: [bug#41459] [PATCH] gnu: Add python-flask-restx
Date: Sat, 30 May 2020 15:04:23 +0200

Edouard Klein <edk@beaver-labs.com> writes:

> * gnu/packages/python-web.scm (python-flask-restx): New variable.
> * gnu/packages/python-check.scm (python-pytest-benchmark): New variable.
> * gnu/packages/python-check.scm (python-pytest-flask): New variable.
> * gnu/packages/python-xyz.scm (python-py-cpuinfo): New variable.

Can you split this into four different patches?

Please also fix the indentation on each package.

> diff --git a/gnu/packages/python-check.scm b/gnu/packages/python-check.scm
> index 50911673b2..70db8445ee 100644
> --- a/gnu/packages/python-check.scm
> +++ b/gnu/packages/python-check.scm
> @@ -362,6 +362,55 @@ framework.")
>  framework.")
>      (license license:expat)))
>  
> +(define-public python-pytest-benchmark
> +  (package
> +  (name "python-pytest-benchmark")
> +  (version "3.2.3")
> +  (source
> +    (origin
> +      (method url-fetch)
> +      (uri (pypi-uri "pytest-benchmark" version))
> +      (sha256
> +        (base32
> +          "0a4mpb4j73dsyk47hd1prrjpfk4r458s102cn80rf253jg818hxd"))))
> +  (build-system python-build-system)
> +  (native-inputs
> +    `(("python-pathlib2" ,python-pathlib2)
> +      ("python-py-cpuinfo" ,python-py-cpuinfo)
> +      ("python-pytest" ,python-pytest)))

py-cpuinfo should probably be propagated according to setup.py.

> +  (home-page "https://github.com/ionelmc/pytest-benchmark";)
> +  (synopsis
> +    "Pytest fixture for benchmarking code")

This line break is unnecessary.

[...]

> +(define-public python-pytest-flask
> +  (package
> +  (name "python-pytest-flask")
> +  (version "1.0.0")
> +  (source
> +    (origin
> +      (method url-fetch)
> +      (uri (pypi-uri "pytest-flask" version))
> +      (sha256
> +        (base32
> +          "1hln7mwgdzfi5ma0kqfsi768l7p24jhkw8l0imhifwy08nh7hmjd"))))
> +  (build-system python-build-system)
> +  (native-inputs
> +    `(("python-flask" ,python-flask)
> +      ("python-pytest" ,python-pytest)
> +      ("python-setuptools-scm" ,python-setuptools-scm)
> +      ("python-werkzeug" ,python-werkzeug)))
> +  (home-page
> +    "https://github.com/pytest-dev/pytest-flask";)
> +  (synopsis
> +    "Pytest fixtures to test Flask applications")

These line breaks are unncessary.

> +(define-public python-flask-restx
> +  (package
> +  (name "python-flask-restx")
> +  (version "0.2.0")
> +  (source
> +   ;; We fetch from the Git repo because there are no tests in the PyPI
> +   ;; archive.
> +   (origin
> +     (method git-fetch)
> +     (uri (git-reference
> +           (url "https://github.com/python-restx/flask-restx";)
> +           (commit version)))
> +     (file-name (git-file-name name version))
> +     (sha256
> +      (base32 "0xf2vkmdngp9cv9klznizai4byxjcf0iqh1pr4b83nann0jxqwy7"))))
> +  (build-system python-build-system)
> +  (propagated-inputs
> +   `(("python-aniso8601" ,python-aniso8601)
> +     ("python-flask" ,python-flask)
> +     ("python-jsonschema" ,python-jsonschema)
> +     ("python-pytz" ,python-pytz)))
> +  (native-inputs
> +   `(("python-blinker" ,python-blinker)
> +      ("python-faker" ,python-faker)
> +      ("python-pytest" ,python-pytest)
> +      ("python-pytest-benchmark"
> +       ,python-pytest-benchmark)
> +      ("python-pytest-flask" ,python-pytest-flask)
> +      ("python-pytest-mock" ,python-pytest-mock)))
> +  (arguments
> +   `(#:phases
> +     (modify-phases %standard-phases
> +       (replace 'check
> +         (lambda _
> +           (invoke "pytest" "--benchmark-skip" "-k"
> +                   ;; Those tests need internet access
> +                   "not test_check and not test_valid_value_check"))))))
> +  (home-page
> +    "https://github.com/python-restx/flask-restx";)

This line break is unnecessary.

> +(define-public python-py-cpuinfo
> +  (package
> +  (name "python-py-cpuinfo")
> +  (version "5.0.0")
> +  (source
> +    (origin
> +      (method url-fetch)
> +      (uri (pypi-uri "py-cpuinfo" version))
> +      (sha256
> +        (base32
> +          "0045y6832gqjg63jmw0qj2jwyypgjwr7sfdq3lfv49b6fxpl5xic"))))
> +  (build-system python-build-system)
> +  (home-page
> +    "https://github.com/workhorsy/py-cpuinfo";)

This line break is unnecessary.

> +  (synopsis "Get CPU info with pure Python 2 & 3")

Maybe just "Get CPU info with Python"

> +  (description
> +    "This module returns the CPU info by using the best sources of 
> information for
> + your OS.")

s/OS/operating system/

Can you send updated patches?  Please also make sure they are in the
correct order, i.e. this last package must come before
'python-pytest-benchmark'.

Thanks in advance!

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]