Mercurial > nagslang
changeset 287:67387621c61b
Added requirements.txt and use it from setup.py
author | David Fraser <davidf@sjsoft.com> |
---|---|
date | Thu, 05 Sep 2013 16:40:04 +0200 |
parents | 26682f1b8c59 |
children | e2cf46a4eeaf |
files | README.txt requirements.txt setup.py |
diffstat | 3 files changed, 15 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/README.txt Thu Sep 05 16:16:49 2013 +0200 +++ b/README.txt Thu Sep 05 16:40:04 2013 +0200 @@ -10,7 +10,10 @@ Requirements ============ -The game requires pygame and pymunk. +The game requires pygame and pymunk. Requirements can be installed by + pip install -e . +Or + pip install -r requirements.txt It was developed using python 2.7, pymunk 4.0 and pygame 1.9.2. Older versions may or may not work.
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/requirements.txt Thu Sep 05 16:40:04 2013 +0200 @@ -0,0 +1,2 @@ +pygame +pymunk
--- a/setup.py Thu Sep 05 16:16:49 2013 +0200 +++ b/setup.py Thu Sep 05 16:40:04 2013 +0200 @@ -12,6 +12,14 @@ except ImportError: pass +try: + from pip.req import parse_requirements + import os + install_reqs = parse_requirements(os.path.join(os.path.dirname(__file__), 'requirements.txt')) + reqs = [str(ir.req) for ir in install_reqs] +except ImportError: + reqs = [] + # This should probably be pulled from constants.py VERSION_STR = "0.1a" @@ -64,7 +72,7 @@ ], # Dependencies - install_requires=[], + install_requires=reqs, # Files packages=find_packages(),