From c48dd32498caf662a22b3956a46575a8c69516a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pekka=20Kl=C3=A4rck?= Date: Tue, 6 Sep 2016 22:51:40 +0300 Subject: [PATCH] Add requirements.txt. Eases installing project requirements e.g. when doing development. To avoid listing requirements twice, changed setup.py to read install_requires content from requirements.txt directly. --- requirements.txt | 3 +++ setup.py | 16 +++++++++------- 2 files changed, 12 insertions(+), 7 deletions(-) create mode 100644 requirements.txt diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 000000000..b266dec99 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,3 @@ +decorator >= 3.3.2 +selenium >= 2.32.0 +robotframework >= 2.6.0 diff --git a/setup.py b/setup.py index f4728811c..1897429ed 100755 --- a/setup.py +++ b/setup.py @@ -1,16 +1,22 @@ #!/usr/bin/env python -from os.path import join, dirname +from os.path import abspath, dirname, join from setuptools import setup -execfile(join(dirname(__file__), 'src', 'Selenium2Library', 'version.py')) + +CURDIR = dirname(abspath(__file__)) + +execfile(join(CURDIR, 'src', 'Selenium2Library', 'version.py')) DESCRIPTION = """ Selenium2Library is a web testing library for Robot Framework that leverages the Selenium 2 (WebDriver) libraries. """[1:-1] +with open(join(CURDIR, 'requirements.txt')) as f: + REQUIREMENTS = f.read().splitlines() + setup(name = 'robotframework-selenium2library', version = VERSION, description = 'Web testing library for Robot Framework', @@ -28,11 +34,7 @@ "Programming Language :: Python", "Topic :: Software Development :: Testing" ], - install_requires = [ - 'decorator >= 3.3.2', - 'selenium >= 2.32.0', - 'robotframework >= 2.6.0' - ], + install_requires = REQUIREMENTS, package_dir = {'' : 'src'}, packages = ['Selenium2Library','Selenium2Library.keywords','Selenium2Library.locators', 'Selenium2Library.utils'],