From 0c5628759f1b08e4cd22aba3ff5ff0a96e70631b Mon Sep 17 00:00:00 2001 From: Greg Taylor Date: Sun, 15 Sep 2019 00:37:30 -0700 Subject: [PATCH] Condense requirements files down to one PEP 508 defines a way to specify platform-specific requirements. Rather than having to manage two different requirements files, let's crunch them down to one and use that facility. For more details on how this works, see: https://www.python.org/dev/peps/pep-0508/ --- requirements.txt | 5 ++++- setup.py | 6 ++---- win_requirements.txt | 19 ------------------- 3 files changed, 6 insertions(+), 24 deletions(-) delete mode 100644 win_requirements.txt diff --git a/requirements.txt b/requirements.txt index 4e3e79ab8a..c265a34639 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ -# Evennia dependencies, for Linux/Mac platforms +# Evennia dependencies # general django >= 2.2.4, < 2.3 @@ -14,3 +14,6 @@ model_mommy # testing mock >= 1.0.1 anything + +# windows-specific +pypiwin32;platform_system=="Windows" diff --git a/setup.py b/setup.py index 68d8bdbeb8..8b077a9775 100644 --- a/setup.py +++ b/setup.py @@ -10,11 +10,9 @@ OS_WINDOWS = os.name == "nt" def get_requirements(): """ - To update the requirements for Evennia, edit the requirements.txt - file, or win_requirements.txt for Windows platforms. + To update the requirements for Evennia, edit the requirements.txt file. """ - filename = 'win_requirements.txt' if OS_WINDOWS else 'requirements.txt' - with open(filename, 'r') as f: + with open('requirements.txt', 'r') as f: req_lines = f.readlines() reqs = [] for line in req_lines: diff --git a/win_requirements.txt b/win_requirements.txt deleted file mode 100644 index ea3bb46fb7..0000000000 --- a/win_requirements.txt +++ /dev/null @@ -1,19 +0,0 @@ -# Evennia dependencies, for Windows platform - -# windows specific -pypiwin32 - -# general -django >= 2.2.4, < 2.3 -twisted >= 19.2.1, < 20.0.0 -pillow == 5.2.0 -pytz -future >= 0.15.2 -django-sekizai -autobahn >= 17.9.3 -inflect -model_mommy - -# testing -mock >= 1.0.1 -anything