unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
From: Antwane Mason <ad.mason1413@gmail.com>
To: help-guix@gnu.org
Subject: Python Tox Dependencies Invisible to Pip
Date: Thu, 26 Aug 2021 08:29:24 -0400	[thread overview]
Message-ID: <CAAztfgKJSJZk_MMBJZWS=d52knvYzvHumprzq-xe-Pt05gsYtw@mail.gmail.com> (raw)

I am currently trying to build a package for python-virtualenv-clone with
the eventual goal of submitting a patch. While building the package, tox is
used to perform tests and it needs but cannot find pytest and virtualenv
despite being included as build dependencies. I suspect that tox has done
something to the environment variables guix uses to expose python packages
from store. However, I have no experience with tox and need some guidance
on how to fix this. Any help would be appreciated. I still haven't been
able to build onlykey-cli package due to chasing down dependencies such as
this package.

Here is a tox log showing that pip cannot find pytest dependency.
------------------------------------------------
action: py38, msg: getenv
cwd: /tmp/guix-build-python-virtualenv-clone-0.5.6.drv-0/source
cmd:
/tmp/guix-build-python-virtualenv-clone-0.5.6.drv-0/source/.tox/py38/bin/python
-m pip install pytest virtualenv
WARNING: The directory '/homeless-shelter/.cache/pip' or its parent
directory is not owned or is not writable by the current user. The cache
has been disabled. Check the permissions and owner of that directory. If
executing pip with sudo, you may want sudo's -H flag.
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None,
status=None)) after connection broken by
'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object
at 0x7ffff5faab50>: Failed to establish a new connection: [Errno -2] Name
or service not known')': /simple/pytest/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None,
status=None)) after connection broken by
'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object
at 0x7ffff5fbe730>: Failed to establish a new connection: [Errno -2] Name
or service not known')': /simple/pytest/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None,
status=None)) after connection broken by
'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object
at 0x7ffff5fbe6d0>: Failed to establish a new connection: [Errno -2] Name
or service not known')': /simple/pytest/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None,
status=None)) after connection broken by
'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object
at 0x7ffff5fbe8e0>: Failed to establish a new connection: [Errno -2] Name
or service not known')': /simple/pytest/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None,
status=None)) after connection broken by
'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object
at 0x7ffff5fbeaf0>: Failed to establish a new connection: [Errno -2] Name
or service not known')': /simple/pytest/
ERROR: Could not find a version that satisfies the requirement pytest (from
versions: none)
ERROR: No matching distribution found for pytest
-----------------------------------------------

Here is a snippet from build output that makes me think tox is discarding
the environment variable that points to python packages in guix store.

-----------------------------------------------
py38 installdeps: pytest, virtualenv
WARNING: Discarding $PYTHONPATH from environment, to override specify
PYTHONPATH in 'passenv' in your configuration.
-----------------------------------------------

Here is the package definition. I had to change the usual style of using
pypi to get code because the tarball in pypi is missing tox.ini that can be
found in the github tarball for the same version. This can be verified by
checking the contents and you can also see a difference in hashes between
github and pypi. I plan on opening an issue on their github repo soon on
this.
------------------------------------------------
(define-public python-virtualenv-clone
  (package
    (name "python-virtualenv-clone")
    (version "0.5.6")
    (source
      (origin
        (method git-fetch)
        (uri
         (git-reference (url "
https://github.com/edwardgeorge/virtualenv-clone")
                        (commit version)))
        (sha256
          (base32
            "0xb20fhl99dw5vnyb43sjpj9628nbdnwp5g7m8f2id7w8kpwzvfw"))))
    (native-inputs
     `(("python-pytest" ,python-pytest)
       ("python-tox" ,python-tox)
       ("python-virtualenv" ,python-virtualenv)))
    (build-system python-build-system)
    (home-page
      "https://github.com/edwardgeorge/virtualenv-clone")
    (synopsis "script to clone virtualenvs.")
    (description "script to clone virtualenvs.")
    (license license:expat)))
------------------------------------------------

Regards,
Antwane

             reply	other threads:[~2021-08-26 12:29 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-26 12:29 Antwane Mason [this message]
2021-08-27  1:53 ` Python Tox Dependencies Invisible to Pip Antwane Mason

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAAztfgKJSJZk_MMBJZWS=d52knvYzvHumprzq-xe-Pt05gsYtw@mail.gmail.com' \
    --to=ad.mason1413@gmail.com \
    --cc=help-guix@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).