I'm trying to package a Python application I'm writing. It runs on Guix from source with the python-pyside-2 package installed and runs on Debian using a Python venv. I've uploaded the application to PyPI. Doing a guix import pypi, I get this Guix definition:
(use-modules (guix packages) (guix download) (gnu packages python) (gnu packages qt) (guix build-system python) ((guix licenses) #:prefix license:)) (define-public python-t-rex-typer (package (name "python-t-rex-typer") (version "0.1.5") (source (origin (method url-fetch) (uri (pypi-uri "t_rex_typer" version)) (sha256 (base32 "0y08zacchwkx95dla1lbrqkxfnsknhm8ymr6ad08vijbwf5xircp")))) (build-system python-build-system) (propagated-inputs (list python-pyside-2)) (home-page "https://github.com/excalamus/t_rex_typer") (synopsis "Steno practice") (description "Steno practice") (license license:gpl3+))) python-t-rex-typer When I run guix package on this, it fails saying that the PySide2 dependency doesn't exist: starting phase `set-SOURCE-DATE-EPOCH' phase `set-SOURCE-DATE-EPOCH' succeeded after 0.0 seconds starting phase `set-paths' environment variable `PATH' set to `/gnu/store/j3cx0yaqdpw0mxizp5bayx93pya44dhn-python-wrapper-3.9.9/bin:/gnu/store/g2ajyl8xk9aarxrgjbng2hkj3qm2v0z2-tar-1.34/bin:/gnu/store/iixwcv3k49ks1rf34pjgfzmzyhhgwng3-gzip-1.10/bin:/gnu/store/s3hl12jxz9ybs7nsy7kq7ybzz7qnzmsg-bzip2-1.0.8/bin:/gnu/store/c8isj4jq6knv0icfgr43di6q3nvdzkx7-xz-5.2.5/bin:/gnu/store/4ic6244i3ca4b4rxc2wnrgllsidyishv-file-5.39/bin:/gnu/store/ahmmvw21p11ik80lg1f953y7fd8bqkjm-diffutils-3.8/bin:/gnu/store/z39hnrwds1dgcbpfgj8dnv2cngjb2xbl-patch-2.7.6/bin:/gnu/store/39rsx3nl4c31952jybbjb8d6idr5hx7r-findutils-4.8.0/bin:/gnu/store/690qz3fg334dpwn3pn6k59n4wc943p2b-gawk-5.1.0/bin:/gnu/store/wxgv6i8g0p24q5gcyzd0yr07s8kn9680-sed-4.8/bin:/gnu/store/xjwp2hsd9256icjjybfrmznppjicywf6-grep-3.6/bin:/gnu/store/d251rfgc9nm2clzffzhgiipdvfvzkvwi-coreutils-8.32/bin:/gnu/store/55cbpsi18mahg131nmiya6km5b4mscfa-make-4.3/bin:/gnu/store/4y5m9lb8k3qkb1y9m02sw9w9a6hacd16-bash-minimal-5.1.8/bin:/gnu/store/s2pg5k98fl2g2szg9dykxyd9zl3xihv9-ld-wrapper-0/bin:/gnu/store/rc781v4k0drhaqn90xfwwpspki5x0bvf-binutils-2.37/bin:/gnu/store/069aq2v993kpc41yabp5b6vm4wb9jkhg-gcc-10.3.0/bin:/gnu/store/5h2w4qi9hk1qzzgi1w83220ydslinr4s-glibc-2.33/bin:/gnu/store/5h2w4qi9hk1qzzgi1w83220ydslinr4s-glibc-2.33/sbin:/gnu/store/b6j1qw1a5rkbfvcy7lc9fm95abbzpa4x-python-3.9.9/bin:/gnu/store/i20kq00ymvnsjzawbrxy4qd3ps24zw0w-python-shiboken-2-5.15.2/bin' environment variable `GUIX_PYTHONPATH' set to `/gnu/store/562nb8gbfi0ba2li9wmj6ws38fk7swmy-python-pyside-2-5.15.2/lib/python3.9/site-packages:/gnu/store/b6j1qw1a5rkbfvcy7lc9fm95abbzpa4x-python-3.9.9/lib/python3.9/site-packages:/gnu/store/i20kq00ymvnsjzawbrxy4qd3ps24zw0w-python-shiboken-2-5.15.2/lib/python3.9/site-packages' environment variable `PYTHONTZPATH' unset environment variable `BASH_LOADABLES_PATH' unset environment variable `C_INCLUDE_PATH' set to `/gnu/store/562nb8gbfi0ba2li9wmj6ws38fk7swmy-python-pyside-2-5.15.2/include:/gnu/store/s3hl12jxz9ybs7nsy7kq7ybzz7qnzmsg-bzip2-1.0.8/include:/gnu/store/c8isj4jq6knv0icfgr43di6q3nvdzkx7-xz-5.2.5/include:/gnu/store/4ic6244i3ca4b4rxc2wnrgllsidyishv-file-5.39/include:/gnu/store/690qz3fg334dpwn3pn6k59n4wc943p2b-gawk-5.1.0/include:/gnu/store/55cbpsi18mahg131nmiya6km5b4mscfa-make-4.3/include:/gnu/store/rc781v4k0drhaqn90xfwwpspki5x0bvf-binutils-2.37/include:/gnu/store/069aq2v993kpc41yabp5b6vm4wb9jkhg-gcc-10.3.0/include:/gnu/store/5h2w4qi9hk1qzzgi1w83220ydslinr4s-glibc-2.33/include:/gnu/store/b6j1qw1a5rkbfvcy7lc9fm95abbzpa4x-python-3.9.9/include:/gnu/store/i20kq00ymvnsjzawbrxy4qd3ps24zw0w-python-shiboken-2-5.15.2/include:/gnu/store/6mjww4iz4xdan74d5bbjfh7il8rngfkk-linux-libre-headers-5.10.35/include' environment variable `CPLUS_INCLUDE_PATH' set to `/gnu/store/562nb8gbfi0ba2li9wmj6ws38fk7swmy-python-pyside-2-5.15.2/include:/gnu/store/s3hl12jxz9ybs7nsy7kq7ybzz7qnzmsg-bzip2-1.0.8/include:/gnu/store/c8isj4jq6knv0icfgr43di6q3nvdzkx7-xz-5.2.5/include:/gnu/store/4ic6244i3ca4b4rxc2wnrgllsidyishv-file-5.39/include:/gnu/store/690qz3fg334dpwn3pn6k59n4wc943p2b-gawk-5.1.0/include:/gnu/store/55cbpsi18mahg131nmiya6km5b4mscfa-make-4.3/include:/gnu/store/rc781v4k0drhaqn90xfwwpspki5x0bvf-binutils-2.37/include:/gnu/store/069aq2v993kpc41yabp5b6vm4wb9jkhg-gcc-10.3.0/include/c++:/gnu/store/069aq2v993kpc41yabp5b6vm4wb9jkhg-gcc-10.3.0/include:/gnu/store/5h2w4qi9hk1qzzgi1w83220ydslinr4s-glibc-2.33/include:/gnu/store/b6j1qw1a5rkbfvcy7lc9fm95abbzpa4x-python-3.9.9/include:/gnu/store/i20kq00ymvnsjzawbrxy4qd3ps24zw0w-python-shiboken-2-5.15.2/include:/gnu/store/6mjww4iz4xdan74d5bbjfh7il8rngfkk-linux-libre-headers-5.10.35/include' environment variable `LIBRARY_PATH' set to `/gnu/store/562nb8gbfi0ba2li9wmj6ws38fk7swmy-python-pyside-2-5.15.2/lib:/gnu/store/s3hl12jxz9ybs7nsy7kq7ybzz7qnzmsg-bzip2-1.0.8/lib:/gnu/store/c8isj4jq6knv0icfgr43di6q3nvdzkx7-xz-5.2.5/lib:/gnu/store/4ic6244i3ca4b4rxc2wnrgllsidyishv-file-5.39/lib:/gnu/store/690qz3fg334dpwn3pn6k59n4wc943p2b-gawk-5.1.0/lib:/gnu/store/rc781v4k0drhaqn90xfwwpspki5x0bvf-binutils-2.37/lib:/gnu/store/5h2w4qi9hk1qzzgi1w83220ydslinr4s-glibc-2.33/lib:/gnu/store/4jdghmc65q7i7ib89zmvq66l0ghf7jc4-glibc-2.33-static/lib:/gnu/store/fnr1z6xsan0437r0yg48d0y8k32kqxby-glibc-utf8-locales-2.33/lib:/gnu/store/b6j1qw1a5rkbfvcy7lc9fm95abbzpa4x-python-3.9.9/lib:/gnu/store/i20kq00ymvnsjzawbrxy4qd3ps24zw0w-python-shiboken-2-5.15.2/lib' environment variable `GUIX_LOCPATH' set to `/gnu/store/fnr1z6xsan0437r0yg48d0y8k32kqxby-glibc-utf8-locales-2.33/lib/locale' phase `set-paths' succeeded after 0.0 seconds starting phase `install-locale' using 'en_US.utf8' locale for category "LC_ALL" phase `install-locale' succeeded after 0.0 seconds starting phase `unpack' t_rex_typer-0.1.5/ t_rex_typer-0.1.5/PKG-INFO t_rex_typer-0.1.5/README.md t_rex_typer-0.1.5/setup.cfg t_rex_typer-0.1.5/setup.py t_rex_typer-0.1.5/t_rex_typer/ t_rex_typer-0.1.5/t_rex_typer/__init__.py t_rex_typer-0.1.5/t_rex_typer/__main__.py t_rex_typer-0.1.5/t_rex_typer/resources/ t_rex_typer-0.1.5/t_rex_typer/resources/keyboard_48.png t_rex_typer-0.1.5/t_rex_typer/resources/trex_48.png t_rex_typer-0.1.5/t_rex_typer/resources/trex_96.png t_rex_typer-0.1.5/t_rex_typer/resources/trex_w_board_48.png t_rex_typer-0.1.5/t_rex_typer/resources/trex_w_board_96.png t_rex_typer-0.1.5/t_rex_typer/t_rex_typer.py t_rex_typer-0.1.5/t_rex_typer/translation_dict.py t_rex_typer-0.1.5/t_rex_typer/widgets.py t_rex_typer-0.1.5/t_rex_typer.egg-info/ t_rex_typer-0.1.5/t_rex_typer.egg-info/PKG-INFO t_rex_typer-0.1.5/t_rex_typer.egg-info/SOURCES.txt t_rex_typer-0.1.5/t_rex_typer.egg-info/dependency_links.txt t_rex_typer-0.1.5/t_rex_typer.egg-info/entry_points.txt t_rex_typer-0.1.5/t_rex_typer.egg-info/requires.txt t_rex_typer-0.1.5/t_rex_typer.egg-info/top_level.txt phase `unpack' succeeded after 0.0 seconds starting phase `ensure-no-mtimes-pre-1980' phase `ensure-no-mtimes-pre-1980' succeeded after 0.0 seconds starting phase `enable-bytecode-determinism' phase `enable-bytecode-determinism' succeeded after 0.0 seconds starting phase `ensure-no-cythonized-files' phase `ensure-no-cythonized-files' succeeded after 0.0 seconds starting phase `patch-usr-bin-file' phase `patch-usr-bin-file' succeeded after 0.0 seconds starting phase `patch-source-shebangs' phase `patch-source-shebangs' succeeded after 0.0 seconds starting phase `patch-generated-file-shebangs' phase `patch-generated-file-shebangs' succeeded after 0.0 seconds starting phase `build' running "python setup.py" with command "build" and parameters () running build running build_py file t_rex_typer.py (for module t_rex_typer) not found creating build creating build/lib creating build/lib/t_rex_typer copying t_rex_typer/translation_dict.py -> build/lib/t_rex_typer copying t_rex_typer/__main__.py -> build/lib/t_rex_typer copying t_rex_typer/widgets.py -> build/lib/t_rex_typer copying t_rex_typer/__init__.py -> build/lib/t_rex_typer copying t_rex_typer/t_rex_typer.py -> build/lib/t_rex_typer creating build/lib/t_rex_typer/resources copying t_rex_typer/resources/trex_96.png -> build/lib/t_rex_typer/resources copying t_rex_typer/resources/keyboard_48.png -> build/lib/t_rex_typer/resources copying t_rex_typer/resources/trex_w_board_48.png -> build/lib/t_rex_typer/resources copying t_rex_typer/resources/trex_w_board_96.png -> build/lib/t_rex_typer/resources copying t_rex_typer/resources/trex_48.png -> build/lib/t_rex_typer/resources file t_rex_typer.py (for module t_rex_typer) not found warning: build_py: byte-compiling is disabled, skipping. phase `build' succeeded after 0.2 seconds starting phase `install' running "python setup.py" with command "install" and parameters ("--prefix=/gnu/store/xisd70jp26grrizq83jjdarwvnypb512-python-t-rex-typer-0.1.5" "--no-compile" "--single-version-externally-managed" "--root=/") running install running build running build_py file t_rex_typer.py (for module t_rex_typer) not found file t_rex_typer.py (for module t_rex_typer) not found warning: build_py: byte-compiling is disabled, skipping. running install_lib creating /gnu/store/xisd70jp26grrizq83jjdarwvnypb512-python-t-rex-typer-0.1.5 creating /gnu/store/xisd70jp26grrizq83jjdarwvnypb512-python-t-rex-typer-0.1.5/lib creating /gnu/store/xisd70jp26grrizq83jjdarwvnypb512-python-t-rex-typer-0.1.5/lib/python3.9 creating /gnu/store/xisd70jp26grrizq83jjdarwvnypb512-python-t-rex-typer-0.1.5/lib/python3.9/site-packages creating /gnu/store/xisd70jp26grrizq83jjdarwvnypb512-python-t-rex-typer-0.1.5/lib/python3.9/site-packages/t_rex_typer copying build/lib/t_rex_typer/translation_dict.py -> /gnu/store/xisd70jp26grrizq83jjdarwvnypb512-python-t-rex-typer-0.1.5/lib/python3.9/site-packages/t_rex_typer copying build/lib/t_rex_typer/__main__.py -> /gnu/store/xisd70jp26grrizq83jjdarwvnypb512-python-t-rex-typer-0.1.5/lib/python3.9/site-packages/t_rex_typer creating /gnu/store/xisd70jp26grrizq83jjdarwvnypb512-python-t-rex-typer-0.1.5/lib/python3.9/site-packages/t_rex_typer/resources copying build/lib/t_rex_typer/resources/trex_96.png -> /gnu/store/xisd70jp26grrizq83jjdarwvnypb512-python-t-rex-typer-0.1.5/lib/python3.9/site-packages/t_rex_typer/resources copying build/lib/t_rex_typer/resources/keyboard_48.png -> /gnu/store/xisd70jp26grrizq83jjdarwvnypb512-python-t-rex-typer-0.1.5/lib/python3.9/site-packages/t_rex_typer/resources copying build/lib/t_rex_typer/resources/trex_w_board_48.png -> /gnu/store/xisd70jp26grrizq83jjdarwvnypb512-python-t-rex-typer-0.1.5/lib/python3.9/site-packages/t_rex_typer/resources copying build/lib/t_rex_typer/resources/trex_w_board_96.png -> /gnu/store/xisd70jp26grrizq83jjdarwvnypb512-python-t-rex-typer-0.1.5/lib/python3.9/site-packages/t_rex_typer/resources copying build/lib/t_rex_typer/resources/trex_48.png -> /gnu/store/xisd70jp26grrizq83jjdarwvnypb512-python-t-rex-typer-0.1.5/lib/python3.9/site-packages/t_rex_typer/resources copying build/lib/t_rex_typer/widgets.py -> /gnu/store/xisd70jp26grrizq83jjdarwvnypb512-python-t-rex-typer-0.1.5/lib/python3.9/site-packages/t_rex_typer copying build/lib/t_rex_typer/__init__.py -> /gnu/store/xisd70jp26grrizq83jjdarwvnypb512-python-t-rex-typer-0.1.5/lib/python3.9/site-packages/t_rex_typer copying build/lib/t_rex_typer/t_rex_typer.py -> /gnu/store/xisd70jp26grrizq83jjdarwvnypb512-python-t-rex-typer-0.1.5/lib/python3.9/site-packages/t_rex_typer warning: install_lib: byte-compiling is disabled, skipping. running install_egg_info running egg_info writing t_rex_typer.egg-info/PKG-INFO writing dependency_links to t_rex_typer.egg-info/dependency_links.txt writing entry points to t_rex_typer.egg-info/entry_points.txt writing requirements to t_rex_typer.egg-info/requires.txt writing top-level names to t_rex_typer.egg-info/top_level.txt file t_rex_typer.py (for module t_rex_typer) not found reading manifest file 't_rex_typer.egg-info/SOURCES.txt' writing manifest file 't_rex_typer.egg-info/SOURCES.txt' Copying t_rex_typer.egg-info to /gnu/store/xisd70jp26grrizq83jjdarwvnypb512-python-t-rex-typer-0.1.5/lib/python3.9/site-packages/t_rex_typer-0.1.5-py3.9.egg-info running install_scripts Installing t_rex_typer script to /gnu/store/xisd70jp26grrizq83jjdarwvnypb512-python-t-rex-typer-0.1.5/bin Listing '/gnu/store/xisd70jp26grrizq83jjdarwvnypb512-python-t-rex-typer-0.1.5'... Listing '/gnu/store/xisd70jp26grrizq83jjdarwvnypb512-python-t-rex-typer-0.1.5/bin'... Listing '/gnu/store/xisd70jp26grrizq83jjdarwvnypb512-python-t-rex-typer-0.1.5/lib'... Listing '/gnu/store/xisd70jp26grrizq83jjdarwvnypb512-python-t-rex-typer-0.1.5/lib/python3.9'... Listing '/gnu/store/xisd70jp26grrizq83jjdarwvnypb512-python-t-rex-typer-0.1.5/lib/python3.9/site-packages'... Listing '/gnu/store/xisd70jp26grrizq83jjdarwvnypb512-python-t-rex-typer-0.1.5/lib/python3.9/site-packages/t_rex_typer'... Compiling '/gnu/store/xisd70jp26grrizq83jjdarwvnypb512-python-t-rex-typer-0.1.5/lib/python3.9/site-packages/t_rex_typer/__init__.py'... Compiling '/gnu/store/xisd70jp26grrizq83jjdarwvnypb512-python-t-rex-typer-0.1.5/lib/python3.9/site-packages/t_rex_typer/__main__.py'... Listing '/gnu/store/xisd70jp26grrizq83jjdarwvnypb512-python-t-rex-typer-0.1.5/lib/python3.9/site-packages/t_rex_typer/resources'... Compiling '/gnu/store/xisd70jp26grrizq83jjdarwvnypb512-python-t-rex-typer-0.1.5/lib/python3.9/site-packages/t_rex_typer/t_rex_typer.py'... Compiling '/gnu/store/xisd70jp26grrizq83jjdarwvnypb512-python-t-rex-typer-0.1.5/lib/python3.9/site-packages/t_rex_typer/translation_dict.py'... Compiling '/gnu/store/xisd70jp26grrizq83jjdarwvnypb512-python-t-rex-typer-0.1.5/lib/python3.9/site-packages/t_rex_typer/widgets.py'... Listing '/gnu/store/xisd70jp26grrizq83jjdarwvnypb512-python-t-rex-typer-0.1.5/lib/python3.9/site-packages/t_rex_typer-0.1.5-py3.9.egg-info'... phase `install' succeeded after 0.3 seconds starting phase `add-install-to-pythonpath' phase `add-install-to-pythonpath' succeeded after 0.0 seconds starting phase `add-install-to-path' phase `add-install-to-path' succeeded after 0.0 seconds starting phase `wrap' find-files: /gnu/store/xisd70jp26grrizq83jjdarwvnypb512-python-t-rex-typer-0.1.5/sbin: No such file or directory phase `wrap' succeeded after 0.0 seconds starting phase `check' running "python setup.py" with command "test" and parameters () running test WARNING: Testing via this command is deprecated and will be removed in a future version. Users looking for a generic test entry point independent of test runner are encouraged to use tox. WARNING: The wheel package is not available. 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 should use 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 0x7ffff5a731c0>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/pyside2/ 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 0x7ffff5a5e610>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/pyside2/ 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 0x7ffff5a5e460>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/pyside2/ 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 0x7ffff5a5e250>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/pyside2/ 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 0x7ffff5acdee0>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/pyside2/ ERROR: Could not find a version that satisfies the requirement PySide2>=5.15 (from versions: none) ERROR: No matching distribution found for PySide2>=5.15 error: Command '['/gnu/store/j3cx0yaqdpw0mxizp5bayx93pya44dhn-python-wrapper-3.9.9/bin/python', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', '/tmp/guix-build-python-t-rex-typer-0.1.5.drv-0/tmpao_zm7ts', '--quiet', 'PySide2>=5.15']' returned non-zero exit status 1. error: in phase 'check': uncaught exception: %exception #<&invoke-error program: "python" arguments: ("-c" "import setuptools, tokenize;__file__='setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\\r\\n', '\\n');f.close();exec(compile(code, __file__, 'exec'))" "test") exit-status: 1 term-signal: #f stop-signal: #f> phase `check' failed after 8.1 seconds command "python" "-c" "import setuptools, tokenize;__file__='setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\\r\\n', '\\n');f.close();exec(compile(code, __file__, 'exec'))" "test" failed with status 1 Looking at PyPI, wheels definitely exist. I'm also able to install and run it no problem from PyPI on Debian. When I try installing from PyPI on Guix through a venv, the package installs (but fails on ImportError: libgthread-2.0.so.0: cannot open shared object file: No such file or directory. That's beside the point, though, PySide2 installs.). I'm also confused because it says file t_rex_typer.py (for module t_rex_typer) not found The file is definitely in there and, as I said, it runs on Debian, so must be packaged correctly in terms of the Python imports etc. Any idea on the source of the errors and how I might go about fixing them?