X Tutup
Skip to content

Commit fd9edf9

Browse files
pekkaklarckaaltat
authored andcommitted
Add requirements.txt. (robotframework#659)
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.
1 parent 7930bb1 commit fd9edf9

File tree

2 files changed

+12
-7
lines changed

2 files changed

+12
-7
lines changed

requirements.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
decorator >= 3.3.2
2+
selenium >= 2.32.0
3+
robotframework >= 2.6.0

setup.py

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,22 @@
11
#!/usr/bin/env python
22

3-
from os.path import join, dirname
3+
from os.path import abspath, dirname, join
44

55
from setuptools import setup
66

7-
execfile(join(dirname(__file__), 'src', 'Selenium2Library', 'version.py'))
7+
8+
CURDIR = dirname(abspath(__file__))
9+
10+
execfile(join(CURDIR, 'src', 'Selenium2Library', 'version.py'))
811

912
DESCRIPTION = """
1013
Selenium2Library is a web testing library for Robot Framework
1114
that leverages the Selenium 2 (WebDriver) libraries.
1215
"""[1:-1]
1316

17+
with open(join(CURDIR, 'requirements.txt')) as f:
18+
REQUIREMENTS = f.read().splitlines()
19+
1420
setup(name = 'robotframework-selenium2library',
1521
version = VERSION,
1622
description = 'Web testing library for Robot Framework',
@@ -28,11 +34,7 @@
2834
"Programming Language :: Python",
2935
"Topic :: Software Development :: Testing"
3036
],
31-
install_requires = [
32-
'decorator >= 3.3.2',
33-
'selenium >= 2.32.0',
34-
'robotframework >= 2.6.0'
35-
],
37+
install_requires = REQUIREMENTS,
3638
package_dir = {'' : 'src'},
3739
packages = ['Selenium2Library','Selenium2Library.keywords','Selenium2Library.locators',
3840
'Selenium2Library.utils'],

0 commit comments

Comments
 (0)
X Tutup