From a4f7af327e378a25451000dd7d07bf5bd93b7bdb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Sa=C5=82aban?= Date: Fri, 5 Feb 2021 10:26:33 +0100 Subject: [PATCH 1/3] Create separate reqs for Py2 --- setup.py | 5 ++++- test_requirements_py2.txt | 7 +++++++ test_requirements.txt => test_requirements_py3.txt | 0 3 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 test_requirements_py2.txt rename test_requirements.txt => test_requirements_py3.txt (100%) diff --git a/setup.py b/setup.py index 1f5765c..6a8ba3b 100644 --- a/setup.py +++ b/setup.py @@ -3,6 +3,7 @@ from __future__ import unicode_literals import codecs import os import re +import sys from distutils.core import setup from setuptools import find_packages @@ -33,7 +34,9 @@ setup( url = 'https://github.com/monero-ecosystem/monero-python/', long_description = open('README.rst', 'rb').read().decode('utf-8'), install_requires = open('requirements.txt', 'r').read().splitlines(), - tests_require=open('test_requirements.txt', 'r').read().splitlines(), + tests_require=open( + 'test_requirements_py{:d}.txt'.format(sys.version_info.major), + 'r').read().splitlines(), setup_requires=[ 'pytest-runner', ], diff --git a/test_requirements_py2.txt b/test_requirements_py2.txt new file mode 100644 index 0000000..b4e60a5 --- /dev/null +++ b/test_requirements_py2.txt @@ -0,0 +1,7 @@ +coverage~=5.3 +coveralls~=1.11 +pip>=9 +pytest-cov~=2.10 +pytest-runner~=5.2 +pytest~=4.6 +responses~=0.12 diff --git a/test_requirements.txt b/test_requirements_py3.txt similarity index 100% rename from test_requirements.txt rename to test_requirements_py3.txt From 9399aa485b60eefc0dcb0ec802a7fffae2ea4364 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Sa=C5=82aban?= Date: Fri, 5 Feb 2021 10:38:17 +0100 Subject: [PATCH 2/3] Update MANIFEST.in to include new test_requirements*.txt --- MANIFEST.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MANIFEST.in b/MANIFEST.in index e705e7e..25aa31c 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1 +1 @@ -include *requirements.txt +include *requirements*.txt From 9e689ac862d6e1e87fe0d9c60981cdeddb530738 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Sa=C5=82aban?= Date: Fri, 5 Feb 2021 12:32:42 +0100 Subject: [PATCH 3/3] Update Travis config to resolve Python version --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 67e2773..8723478 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,7 +14,7 @@ before_install: - rm -rf dist && python setup.py sdist # prep package distribution install: - pip install dist/*.tar.gz # install dependencies as specified in setup.py - - pip install -r test_requirements.txt + - pip install -r test_requirements_py`echo $TRAVIS_PYTHON_VERSION | cut -f 1 -d .`.txt script: - pytest after_success: