help-guix
[Top][All Lists]
Advanced

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

Python Tox Dependencies Invisible to Pip


From: Antwane Mason
Subject: Python Tox Dependencies Invisible to Pip
Date: Thu, 26 Aug 2021 08:29:24 -0400

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 via email to

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