Skip to content

Commit

Permalink
Fix dependencies in earlier versions of Python
Browse files Browse the repository at this point in the history
which is Python 2.7 and Python 3.5.

We highly recommend you not to use them.
  • Loading branch information
jerrymakesjelly committed Apr 15, 2022
1 parent b262c86 commit 2827697
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 2 deletions.
2 changes: 2 additions & 0 deletions README-cn.rst
Expand Up @@ -30,6 +30,8 @@

* Python 2.7 或 Python 3

推荐使用 Python 3.6 或更高版本的 Python。


快速开始
-------------
Expand Down
2 changes: 1 addition & 1 deletion README.rst
Expand Up @@ -33,7 +33,7 @@ Requirements
-------------
* Python 2.7 or Python 3

That's all. It's a simple but smart program.
We recommend you to use Python 3.6 or higher version of Python.


Quick Start
Expand Down
7 changes: 7 additions & 0 deletions autoremovetorrents/compatibility/pyyaml_version_.py
@@ -0,0 +1,7 @@
import sys

# The pyyaml offical dropped support for Python < 3.6 in its latest version.
# To make our program still available in earlier versions of Python,
# we select an older version of pyyaml manually. (Not Recommend)

PYYAML_VERSION = 'pyyaml' if sys.version_info >= (3, 6, 0) else 'pyyaml==5.4.1'
3 changes: 2 additions & 1 deletion setup.py
Expand Up @@ -4,6 +4,7 @@
from autoremovetorrents.version import __version__
from autoremovetorrents.compatibility.disk_usage_ import SUPPORT_SHUTIL
from autoremovetorrents.compatibility.open_ import open_
from autoremovetorrents.compatibility.pyyaml_version_ import PYYAML_VERSION

setup(name = 'autoremove-torrents',
version = __version__,
Expand All @@ -28,7 +29,7 @@
'enum34',
'ply',
'' if SUPPORT_SHUTIL else 'psutil',
'pyyaml',
PYYAML_VERSION,
'requests',
],
entry_points = {
Expand Down

0 comments on commit 2827697

Please sign in to comment.