From fe17328000e9cb1cdf25343832d6671b9b7bc128 Mon Sep 17 00:00:00 2001 From: Ondrej Nosek Date: Jul 13 2020 15:46:05 +0000 Subject: Add Signed-off-by: Ondrej Nosek --- diff --git a/Makefile b/Makefile index bcde6d0..e8b8e3d 100644 --- a/Makefile +++ b/Makefile @@ -2,12 +2,8 @@ default_targets=tox test: $(default_targets) .PHONY: test -detox: - @detox -e py27,py36,py37,flake8 -- $(TOX_POSARGS) -.PHONY: detox - tox: @python3 -m venv .env @.env/bin/pip install tox - @.env/bin/tox -e py27,py36,py37,flake8 --parallel=auto -- $(TOX_POSARGS) + @.env/bin/tox -e py27,py36,py37,flake8,flake8python2 --parallel=auto ${TOX_POSARGS} .PHONY: tox diff --git a/README.rst b/README.rst index 88f1f73..62595bd 100644 --- a/README.rst +++ b/README.rst @@ -5,7 +5,7 @@ This is the rpkg project, which mostly is a python library for dealing with rpm packaging in a git source control. pyrpkg is the base library that sites can subclass to create useful tools. -rpkg works with Python 2.6, 2.7, 3.6 and 3.7. +rpkg works with Python 2.6, 2.7, 3.6, 3.7 and 3.8. License ======= @@ -19,19 +19,21 @@ Install from distribution packages ---------------------------------- rpkg is available in Fedora and EPEL repositories. It can be installed with -package manager command. There are Python 2 and 3 package for Fedora and only -Python 2 package in EPEL. +package manager command. There is Python 3 package for Fedora and Python 2 +package in EPEL6/7 and Python 3 package for EPEL8. Install in a Fedora system:: - sudo dnf install python2-rpkg + sudo dnf install python3-rpkg -If Python 3 package is needed, install ``python3-rpkg``. - -Install in EL6 or EL7:: +Install in EPEL6 or EPEL7:: sudo yum install python2-rpkg +Install in EPEL8:: + + sudo dnf install python3-rpkg + Install in a Python virtual environment --------------------------------------- @@ -78,7 +80,8 @@ Before make a pull request, ensure local changes pass all test cases. Before run tests, install these packages:: - sudo dnf install python37 + sudo dnf install python37 git make gcc rpm-build rpm-devel libcurl-devel \ + krb5-devel openssl-devel python3-devel To run tests simply, ``make test``. diff --git a/requirements/README.rst b/requirements/README.rst index 7dfe220..1c2ed3a 100644 --- a/requirements/README.rst +++ b/requirements/README.rst @@ -12,4 +12,4 @@ Requirements this README file. They has to be installed from package manager too. * fedora-cli-tools.txt: contains command line tools that rpkg executes them in - various commands, e.g. rpmlint, rpmbuild and mock. \ No newline at end of file + various commands, e.g. rpmlint, rpmbuild and mock. diff --git a/requirements/pypi.txt b/requirements/pypi.txt index 5d35f3b..6aeaee2 100644 --- a/requirements/pypi.txt +++ b/requirements/pypi.txt @@ -6,8 +6,9 @@ cccolutils >= 1.4 GitPython koji >= 1.15 pycurl >= 7.19 -requests six >= 1.9.0 +requests +PyYAML # rpm-py-installer # diff --git a/requirements/test-pypi.txt b/requirements/test-pypi.txt index b85c9a5..00a1904 100644 --- a/requirements/test-pypi.txt +++ b/requirements/test-pypi.txt @@ -1,5 +1,6 @@ coverage mock == 1.0.1 +flake8 # used in MBS tests openidc-client diff --git a/tox.ini b/tox.ini index 76d6bf1..d6b0cef 100644 --- a/tox.ini +++ b/tox.ini @@ -3,8 +3,18 @@ envlist = py27,py36,py37,flake8,doc [testenv] skip_install = True +parallel_show_output = True +basepython= + py26: {env:TOXPYTHON:python2.6} + py27: {env:TOXPYTHON:python2.7} + py36: {env:TOXPYTHON:python3.6} + py37: {env:TOXPYTHON:python3.7} + flake8: {env:TOXPYTHON:python3.7} + flake8python2: {env:TOXPYTHON:python2.7} + deps = rpm-py-installer + -r{toxinidir}/requirements/pypi.txt -r{toxinidir}/requirements/test-pypi.txt ; Tests run by `tox`, which require pytest is @@ -13,23 +23,17 @@ deps = pytest-cov commands = - ; Respect the install_requires in setup.py and install dependent packages - ; from there. An alternative is to use tox option usedevelop, however it - ; does not work for rpkg now due to the PyGObject, which can only be - ; installed via pip. Refer to upstream issue - ; https://gitlab.gnome.org/GNOME/pygobject/issues/264 - pip install -e . - python -m pytest {posargs} setenv= PYCURL_SSL_LIBRARY=openssl [testenv:flake8] -basepython = python3 -skip_install = True -deps = flake8 == 3.5.0 -commands = flake8 pyrpkg/ tests/ +commands = python -m flake8 pyrpkg/ tests/ + +[testenv:flake8python2] +commands = python -m flake8 pyrpkg/ tests/ + [testenv:doc] basepython = python3