Skip to content

Commit

Permalink
Improve requirements handling (rq#1287)
Browse files Browse the repository at this point in the history
* setup: read requirements.txt for dependencies

This makes it easier to keep required packages in sync.

Signed-off-by: Paul Spooren <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>
  • Loading branch information
aparcar authored Jun 29, 2020
1 parent b334a00 commit 0b55981
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ services:
- redis
matrix:
include:
- python: "3.4"
- python: "3.5"
- python: "3.6"
- python: "3.7"
Expand Down
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
redis>=3.0
click>=3.0.0
redis>=3.5.0
click>=5.0.0
14 changes: 10 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand All @@ -31,10 +40,7 @@ def get_version():
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': [
Expand Down

0 comments on commit 0b55981

Please sign in to comment.