GNU bug report logs -
#49833
[PATCH 3/7] gnu: Add python-dotenv.
Previous Next
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 49833 in the body.
You can then email your comments to 49833 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
guix-patches <at> gnu.org
:
bug#49833
; Package
guix-patches
.
(Mon, 02 Aug 2021 18:16:04 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Giacomo Leidi <goodoldpaul <at> autistici.org>
:
New bug report received and forwarded. Copy sent to
guix-patches <at> gnu.org
.
(Mon, 02 Aug 2021 18:16:04 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
* gnu/packages/python-xyz.scm (python-dotenv): New variable.
---
gnu/packages/python-xyz.scm | 27 +++++++++++++++++++++++++++
1 file changed, 27 insertions(+)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index cdfc78478c..f415d8b2c8 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -26239,3 +26239,30 @@ enabling you to write CommonMark inside of Docutils & Sphinx projects.")
Qhull} for the computation of the convex hull, Delaunay triangulation, and
Voronoi diagram.")
(license license:expat)))
+
+(define-public python-dotenv
+ (package
+ (name "python-dotenv")
+ (version "0.18.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "python-dotenv" version))
+ (sha256
+ (base32
+ "0b90br3f48ykx5ddfpx2zmsh4vmdqw6s812drcy9pn2q3qyarypg"))))
+ (build-system python-build-system)
+ (propagated-inputs
+ `(("python-click" ,python-click-5)))
+ (native-inputs
+ `(("python-mock" ,python-mock)
+ ("python-pytest" ,python-pytest)
+ ("python-sh" ,python-sh)))
+ (home-page
+ "https://github.com/theskumar/python-dotenv")
+ (synopsis
+ "Setup environment variables according to .env files")
+ (description
+ "This package provides the @code{python-dotenv} Python module to
+read key-value pairs from a .env file and set them as environment variables")
+ (license license:bsd-3)))
--
2.32.0
Information forwarded
to
guix-patches <at> gnu.org
:
bug#49833
; Package
guix-patches
.
(Wed, 04 Aug 2021 18:36:03 GMT)
Full text and
rfc822 format available.
Message #10 received at 49833 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Hello,
While we don't actually require doing this when pypi packages don't have
tests, on a lark I went ahead and switched the source to upstream and
enabled tests to make sure they passed. It looks like two are failing,
but I'm not sure why. I've attached the patch to enable tests and the
test output.
Giacomo Leidi <goodoldpaul <at> autistici.org> writes:
> * gnu/packages/python-xyz.scm (python-dotenv): New variable.
> ---
> gnu/packages/python-xyz.scm | 27 +++++++++++++++++++++++++++
> 1 file changed, 27 insertions(+)
>
> diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
> index cdfc78478c..f415d8b2c8 100644
> --- a/gnu/packages/python-xyz.scm
> +++ b/gnu/packages/python-xyz.scm
> @@ -26239,3 +26239,30 @@ enabling you to write CommonMark inside of Docutils & Sphinx projects.")
> Qhull} for the computation of the convex hull, Delaunay triangulation, and
> Voronoi diagram.")
> (license license:expat)))
> +
> +(define-public python-dotenv
> + (package
> + (name "python-dotenv")
> + (version "0.18.0")
> + (source
> + (origin
> + (method url-fetch)
> + (uri (pypi-uri "python-dotenv" version))
> + (sha256
> + (base32
> + "0b90br3f48ykx5ddfpx2zmsh4vmdqw6s812drcy9pn2q3qyarypg"))))
> + (build-system python-build-system)
> + (propagated-inputs
> + `(("python-click" ,python-click-5)))
> + (native-inputs
> + `(("python-mock" ,python-mock)
> + ("python-pytest" ,python-pytest)
> + ("python-sh" ,python-sh)))
> + (home-page
> + "https://github.com/theskumar/python-dotenv")
^ Nitpick: this can go on one line.
> + (synopsis
> + "Setup environment variables according to .env files")
^ Likewise.
> + (description
> + "This package provides the @code{python-dotenv} Python module to
> +read key-value pairs from a .env file and set them as environment variables")
> + (license license:bsd-3)))
[python-dotenv-0.18.0.diff (text/x-patch, inline)]
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index f4f3b7fb3f..a5b700f2d3 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -26282,16 +26282,31 @@ Voronoi diagram.")
(version "0.18.0")
(source
(origin
- (method url-fetch)
- (uri (pypi-uri "python-dotenv" version))
+ (method git-fetch)
+ (uri
+ (git-reference
+ (url "https://github.com/theskumar/python-dotenv")
+ (commit (string-append "v" version))))
(sha256
(base32
- "0b90br3f48ykx5ddfpx2zmsh4vmdqw6s812drcy9pn2q3qyarypg"))))
+ "1jdccd9s7ypsldafiv0mqgh616662fm5a5ppbhphnin44qv7mir1"))))
(build-system python-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (replace 'check
+ (lambda* (#:key tests? inputs outputs #:allow-other-keys)
+ (when tests?
+ (setenv "PATH"
+ (string-append (assoc-ref outputs "out") "/bin:"
+ (getenv "PATH")))
+ (add-installed-pythonpath inputs outputs)
+ (invoke "py.test" "tests/")))))))
(propagated-inputs
`(("python-click" ,python-click-5)))
(native-inputs
- `(("python-mock" ,python-mock)
+ `(("python-ipython" ,python-ipython)
+ ("python-mock" ,python-mock)
("python-pytest" ,python-pytest)
("python-sh" ,python-sh)))
(home-page
[python-dotenv-0.18.0-tests.log (text/plain, inline)]
starting phase `check'
============================= test session starts ==============================
platform linux -- Python 3.8.2, pytest-5.3.5, py-1.8.1, pluggy-0.13.1
rootdir: /tmp/guix-build-python-dotenv-0.18.0.drv-0/source, inifile: setup.cfg
plugins: hypothesis-5.4.1
collected 132 items
tests/test_cli.py ..F............F.......... [ 19%]
tests/test_ipython.py ... [ 21%]
tests/test_main.py ..................................................... [ 62%]
[ 62%]
tests/test_parser.py ........................................... [ 94%]
tests/test_utils.py . [ 95%]
tests/test_variables.py ...... [100%]
=================================== FAILURES ===================================
______________________________ test_list_no_file _______________________________
cli = <click.testing.CliRunner object at 0x7ffff5ed8100>
def test_list_no_file(cli):
result = cli.invoke(dotenv.cli.list, [])
> assert (result.exit_code, result.output) == (1, "")
E AssertionError: assert (-1, '') == (1, '')
E At index 0 diff: -1 != 1
E Use -v to get the full diff
tests/test_cli.py:31: AssertionError
__________________________ test_set_non_existent_file __________________________
cli = <click.testing.CliRunner object at 0x7ffff5f53cd0>
def test_set_non_existent_file(cli):
result = cli.invoke(dotenv.cli.set, ["a", "b"])
> assert (result.exit_code, result.output) == (1, "")
E AssertionError: assert (-1, '') == (1, '')
E At index 0 diff: -1 != 1
E Use -v to get the full diff
tests/test_cli.py:113: AssertionError
=============================== warnings summary ===============================
tests/test_ipython.py::test_ipython_existing_variable_no_override
tests/test_ipython.py::test_ipython_existing_variable_override
tests/test_ipython.py::test_ipython_new_variable
/gnu/store/m6wza0kv26bnpfaavw8xs1gw2cls6369-python-ipython-7.9.0/lib/python3.8/site-packages/IPython/paths.py:67: UserWarning: IPython parent '/' is not a writable location, using a temp directory.
warn("IPython parent '{0}' is not a writable location,"
-- Docs: https://docs.pytest.org/en/latest/warnings.html
================== 2 failed, 130 passed, 3 warnings in 4.49s ===================
[Message part 4 (text/plain, inline)]
--
Sarah
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Wed, 29 Dec 2021 12:24:06 GMT)
Full text and
rfc822 format available.
This bug report was last modified 2 years and 80 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.