Package Details: python2-pytest 4.6.11-2

Git Clone URL: https://aur.archlinux.org/python2-pytest.git (read-only, click to copy)
Package Base: python2-pytest
Description: Simple powerful testing with Python
Upstream URL: https://pytest.org/
Licenses: MIT
Submitter: MarsSeed
Maintainer: hexd
Last Packager: hexd
Votes: 5
Popularity: 0.016987
First Submitted: 2022-06-07 12:43 (UTC)
Last Updated: 2022-12-19 03:39 (UTC)

Latest Comments

Score_Under commented on 2022-11-15 16:57 (UTC)

Seems to require python2-packaging; when invoking it I get:


Traceback (most recent call last):
  File "/usr/lib/python2.7/runpy.py", line 174, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/usr/lib/python2.7/site-packages/pytest.py", line 8, in <module>
    from _pytest.assertion import register_assert_rewrite
  File "/usr/lib/python2.7/site-packages/_pytest/assertion/__init__.py", line 13, in <module>
    from _pytest.assertion import rewrite
  File "/usr/lib/python2.7/site-packages/_pytest/assertion/rewrite.py", line 24, in <module>
    from _pytest.assertion import util
  File "/usr/lib/python2.7/site-packages/_pytest/assertion/util.py", line 11, in <module>
    import _pytest._code
  File "/usr/lib/python2.7/site-packages/_pytest/_code/__init__.py", line 7, in <module>
    from .code import Code  # noqa
  File "/usr/lib/python2.7/site-packages/_pytest/_code/code.py", line 22, in <module>
    from _pytest.compat import _PY2
  File "/usr/lib/python2.7/site-packages/_pytest/compat.py", line 23, in <module>
    from _pytest.outcomes import fail
  File "/usr/lib/python2.7/site-packages/_pytest/outcomes.py", line 12, in <module>
    from packaging.version import Version
ImportError: No module named packaging.version

and

Traceback (most recent call last):
  File "/usr/bin/pytest2", line 6, in <module>
    from pkg_resources import load_entry_point
  File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 3251, in <module>
    @_call_aside
  File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 3235, in _call_aside
    f(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 3264, in _initialize_master_working_set
    working_set = WorkingSet._build_master()
  File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 583, in _build_master
    ws.require(__requires__)
  File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 900, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 786, in resolve
    raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'packaging' distribution was not found and is required by pytest

semeion commented on 2022-06-14 06:28 (UTC)

Okay guys! Thanks! :D

MarsSeed commented on 2022-06-13 18:50 (UTC) (edited on 2022-06-13 18:50 (UTC) by MarsSeed)

Hi @semeion,

My recommendation is also to use yay:

pacman -Syu base-devel
git clone https://aur.archlinux.org/yay.git
cd yay
makepkg --syncdeps --rmdeps --install

After that, you can just use it the same way you would use pacman, it will install packages from AUR with all necessary dependencies:

yay -Syu python2-pytest

hexd commented on 2022-06-13 18:36 (UTC)

@semeion, you can use an AUR helper like yay, that's also a way to keep these packages upgraded. There are the indirect dependencies as well, so these are not just 11. But you can also install all of them manually with makepkg, if you wish (of if something goes wrong and you need to tweak the PKGBUILD).

Due to a small change in python2-pathlib2, now the pytest2 and py.test2 entry points are working, as well.

semeion commented on 2022-06-13 14:47 (UTC)

How to install it? I need manually install each dependenc using AUR? Seriously? 11 depends? LOL

hexd commented on 2022-06-12 22:52 (UTC)

Restored! I've just published all dependencies of pytest (for Python 2) here in AUR. Use python2 -m pytest to run it.