summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Spooren <mail@aparcar.org>2020-06-28 20:29:28 -1000
committerGitHub <noreply@github.com>2020-06-29 13:29:28 +0700
commit0b55981631658d337bf48b5919a2569dbb4175fd (patch)
treeb95e0e209d64df1836702404d51678323a1f8457
parentb334a00f07e88c394752f2dd70dfbd781fefe8cd (diff)
downloadrq-0b55981631658d337bf48b5919a2569dbb4175fd.tar.gz
Improve requirements handling (#1287)
* setup: read requirements.txt for dependencies This makes it easier to keep required packages in sync. Signed-off-by: Paul Spooren <mail@aparcar.org> * requirements: Update to click 5.0 and redis 3.5.0 Click 5.0 was already required by the `setup.py` and is not brought in sync. Redis Python library 3.5.0 introduces the `HSET` command with mapping support which replaces the previous `hmset`. By lifting the minimal required version to 3.5.0 we can remove the combat function if Redis server 4.0 is guaranteed. Signed-off-by: Paul Spooren <mail@aparcar.org> * ci: remove Python3.4 testing `redis-py` 3.5.0 does no longer support Python 3.4, so drop it in CI. Signed-off-by: Paul Spooren <mail@aparcar.org>
-rw-r--r--.travis.yml1
-rw-r--r--requirements.txt4
-rw-r--r--setup.py14
3 files changed, 12 insertions, 7 deletions
diff --git a/.travis.yml b/.travis.yml
index 1c4fe39..f51ee9a 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -3,7 +3,6 @@ services:
- redis
matrix:
include:
- - python: "3.4"
- python: "3.5"
- python: "3.6"
- python: "3.7"
diff --git a/requirements.txt b/requirements.txt
index 7c061a7..f499594 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,2 +1,2 @@
-redis>=3.0
-click>=3.0.0
+redis>=3.5.0
+click>=5.0.0
diff --git a/setup.py b/setup.py
index c35e40d..7069774 100644
--- a/setup.py
+++ b/setup.py
@@ -17,6 +17,15 @@ def get_version():
raise RuntimeError('No version info found.')
+def get_requirements():
+ basedir = os.path.dirname(__file__)
+ try:
+ with open(os.path.join(basedir, 'requirements.txt')) as f:
+ return f.readlines()
+ except FileNotFoundError:
+ raise RuntimeError('No requirements info found.')
+
+
setup(
name='rq',
version=get_version(),
@@ -31,10 +40,7 @@ setup(
include_package_data=True,
zip_safe=False,
platforms='any',
- install_requires=[
- 'redis >= 3.0.0',
- 'click >= 5.0'
- ],
+ install_requires=get_requirements(),
python_requires='>=3.4',
entry_points={
'console_scripts': [