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/
This commit is contained in:
parent
0eef4bee6f
commit
0c5628759f
3 changed files with 6 additions and 24 deletions
|
|
@ -1,4 +1,4 @@
|
||||||
# Evennia dependencies, for Linux/Mac platforms
|
# Evennia dependencies
|
||||||
|
|
||||||
# general
|
# general
|
||||||
django >= 2.2.4, < 2.3
|
django >= 2.2.4, < 2.3
|
||||||
|
|
@ -14,3 +14,6 @@ model_mommy
|
||||||
# testing
|
# testing
|
||||||
mock >= 1.0.1
|
mock >= 1.0.1
|
||||||
anything
|
anything
|
||||||
|
|
||||||
|
# windows-specific
|
||||||
|
pypiwin32;platform_system=="Windows"
|
||||||
|
|
|
||||||
6
setup.py
6
setup.py
|
|
@ -10,11 +10,9 @@ OS_WINDOWS = os.name == "nt"
|
||||||
|
|
||||||
def get_requirements():
|
def get_requirements():
|
||||||
"""
|
"""
|
||||||
To update the requirements for Evennia, edit the requirements.txt
|
To update the requirements for Evennia, edit the requirements.txt file.
|
||||||
file, or win_requirements.txt for Windows platforms.
|
|
||||||
"""
|
"""
|
||||||
filename = 'win_requirements.txt' if OS_WINDOWS else 'requirements.txt'
|
with open('requirements.txt', 'r') as f:
|
||||||
with open(filename, 'r') as f:
|
|
||||||
req_lines = f.readlines()
|
req_lines = f.readlines()
|
||||||
reqs = []
|
reqs = []
|
||||||
for line in req_lines:
|
for line in req_lines:
|
||||||
|
|
|
||||||
|
|
@ -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
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue