From f1922315bb4f13c7727aff338e7c2d33ceb883cb Mon Sep 17 00:00:00 2001 From: Chenxiong Qi Date: Feb 02 2018 13:51:41 +0000 Subject: [PATCH 1/5] Install koji from PyPI Since version 1.15, koji has been published in PyPI. So, install it from PyPI instead of installing from a VCS URL. Signed-off-by: Chenxiong Qi --- diff --git a/requirements/pypi.txt b/requirements/pypi.txt index 8a4d04e..3118c5d 100644 --- a/requirements/pypi.txt +++ b/requirements/pypi.txt @@ -17,7 +17,7 @@ six >= 1.9.0 # Requires koji>=1.15.0 # Install koji from source code and tag koji-1.15.0 without waiting for Koji # developers to publish it to PyPI. -git+https://pagure.io/koji.git@koji-1.15.0#egg=koji +koji >= 1.15 # Several package that are not available in PyPI are also listed here. # If rpkg runs from a Python virtualenv, you may need --site-packages to create From 6b06e1035836fe0cb074aa715b410277dfe71624 Mon Sep 17 00:00:00 2001 From: Chenxiong Qi Date: Feb 02 2018 14:49:56 +0000 Subject: [PATCH 2/5] Add py26 to testenv Signed-off-by: Chenxiong Qi --- diff --git a/requirements/pypi.txt b/requirements/pypi.txt index 3118c5d..3a256ff 100644 --- a/requirements/pypi.txt +++ b/requirements/pypi.txt @@ -25,3 +25,6 @@ koji >= 1.15 # # Please see also fedora-py2.txt or fedora-py3.txt to install them in your # system. + + +argparse == 1.4.0 ; python_version < '2.7' \ No newline at end of file diff --git a/requirements/test-pypi.txt b/requirements/test-pypi.txt index 99fd93f..910c89c 100644 --- a/requirements/test-pypi.txt +++ b/requirements/test-pypi.txt @@ -9,3 +9,5 @@ nose == 1.3.7 openidc-client git+https://pagure.io/rpmfluff.git@0.5.1#egg=rpmfluff + +unittest2 ; python_version < '2.7' \ No newline at end of file diff --git a/setup.py b/setup.py index a9d01fa..0cf6159 100755 --- a/setup.py +++ b/setup.py @@ -1,7 +1,6 @@ #!/usr/bin/python import os -import sys from setuptools import setup, find_packages @@ -35,11 +34,6 @@ install_requires, dep_links = read_requirements(pypi_txt) tests_require, test_dep_links = read_requirements(test_pypi_txt) dep_links += test_dep_links -ver = sys.version_info -if ver.major <= 2 and ver.minor < 7: - install_requires.append('argparse==1.4.0') - tests_require.append('unittest2') - setup( name="rpkg", diff --git a/tox.ini b/tox.ini index ba22712..2af5a75 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py27,py35,py36,flake8 +envlist = py26,py27,py35,py36,flake8 [testenv] skip_install = True From f1c609e88ad77789e77d69e1644c0a11a571ccd6 Mon Sep 17 00:00:00 2001 From: Chenxiong Qi Date: Feb 02 2018 14:53:09 +0000 Subject: [PATCH 3/5] Ignore .egg/ from git Signed-off-by: Chenxiong Qi --- diff --git a/.gitignore b/.gitignore index b83d86d..8d583f6 100644 --- a/.gitignore +++ b/.gitignore @@ -15,3 +15,4 @@ rpkg.egg-info/ .tox/ /build/ htmlcov/ +/.eggs/ From 47962947c941d0a3b32abd9aeccde2dab3741289 Mon Sep 17 00:00:00 2001 From: Chenxiong Qi Date: Feb 02 2018 15:20:29 +0000 Subject: [PATCH 4/5] Compile pycurl with openssl after F27 Not only to compile pycurl with openssl in Fedora 27, but also the versions after 27. Signed-off-by: Chenxiong Qi --- diff --git a/pip-pycurl b/pip-pycurl index 1614619..b63ea3c 100755 --- a/pip-pycurl +++ b/pip-pycurl @@ -8,7 +8,10 @@ fi # used. # See also: https://fedoraproject.org/wiki/Changes/libcurlBackToOpenSSL -if [ "$(rpm --eval '%{dist}')" == ".fc27" ]; then +dist=$(rpm --eval "%{dist}") +dist=${dist:3} + +if [ $dist -ge 27 ]; then install_option="--with-openssl" else install_option="--with-nss" From ef7fee7c8c638ae5419a76797a8e4d4f63b67630 Mon Sep 17 00:00:00 2001 From: Chenxiong Qi Date: Feb 03 2018 04:19:12 +0000 Subject: [PATCH 5/5] Run tests with old GitPython in py26 testenv Signed-off-by: Chenxiong Qi --- diff --git a/requirements/pypi.txt b/requirements/pypi.txt index 3a256ff..1d1b148 100644 --- a/requirements/pypi.txt +++ b/requirements/pypi.txt @@ -1,12 +1,13 @@ # List of Python packages that can be installed from PyPI. cccolutils >= 1.4 -GitPython >= 0.3.2 pycurl >= 7.19 requests rpm-py-installer six >= 1.9.0 +GitPython >= 1.0 ; python_version > "2.6" + # openidc-client # used for MBS OIDC authentication # requests-kerberos # used for MBS Kerberos authentication @@ -26,5 +27,5 @@ koji >= 1.15 # Please see also fedora-py2.txt or fedora-py3.txt to install them in your # system. - -argparse == 1.4.0 ; python_version < '2.7' \ No newline at end of file +GitPython < 1.0 ; python_version < "2.7" +argparse == 1.4.0 ; python_version < "2.7" \ No newline at end of file diff --git a/requirements/test-pypi.txt b/requirements/test-pypi.txt index 910c89c..a648c30 100644 --- a/requirements/test-pypi.txt +++ b/requirements/test-pypi.txt @@ -10,4 +10,4 @@ openidc-client git+https://pagure.io/rpmfluff.git@0.5.1#egg=rpmfluff -unittest2 ; python_version < '2.7' \ No newline at end of file +unittest2 ; python_version < "2.7" \ No newline at end of file