Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100755 129 lines (113 sloc) 4.863 kB
930e61a Chrome and IE Python bindings. Thanks Miki Tebeka!
jrhuggins authored
1 #!/usr/bin/env python
2 # Copyright 2008-2009 WebDriver committers
3 # Copyright 2008-2009 Google Inc.
4 #
5 # Licensed under the Apache License, Version 2.0 (the "License");
6 # you may not use this file except in compliance with the License.
7 # You may obtain a copy of the License at
8 #
9 # http://www.apache.org/licenses/LICENSE-2.0
10 #
11 # Unless required by applicable law or agreed to in writing, software
12 # distributed under the License is distributed on an "AS IS" BASIS,
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 # See the License for the specific language governing permissions and
15 # limitations under the License.
16
17 from setuptools import setup
2b9e2fe General cleanup of test_firefox_py rake task.
jrhuggins authored
18 from setuptools.command.install import install
930e61a Chrome and IE Python bindings. Thanks Miki Tebeka!
jrhuggins authored
19
4218741 Native firefox works
miki.tebeka authored
20 from os.path import dirname, join, isfile
21 from shutil import copy
d525f37 Python 3 support
miki.tebeka authored
22 import sys
23
e280834 SimonStewart and DavidBurns: Landing the new python bindings. Thanks …
simon.m.stewart authored
24
d525f37 Python 3 support
miki.tebeka authored
25 def setup_python3():
26 # Taken from "distribute" setup.py
27 from distutils.filelist import FileList
28 from distutils import dir_util, file_util, util, log
29
30 tmp_src = join("build", "src")
31 log.set_verbosity(1)
32 fl = FileList()
33 for line in open("MANIFEST.in"):
34 if not line.strip():
35 continue
36 fl.process_template_line(line)
37 dir_util.create_tree(tmp_src, fl.files)
38 outfiles_2to3 = []
39 for f in fl.files:
40 outf, copied = file_util.copy_file(f, join(tmp_src, f), update=1)
41 if copied and outf.endswith(".py"):
42 outfiles_2to3.append(outf)
43
44 util.run_2to3(outfiles_2to3)
45
46 # arrange setup to use the copy
47 sys.path.insert(0, tmp_src)
48
49 return tmp_src
50
e280834 SimonStewart and DavidBurns: Landing the new python bindings. Thanks …
simon.m.stewart authored
51
93034f7 Long description
miki.tebeka authored
52 def find_longdesc():
53 for path in ("docs/api/py/index.rst", "docs/index.rst"):
54 try:
55 index = join(dirname(__file__), path)
56 return open(index).read()
57 except IOError:
58 pass
59
d525f37 Python 3 support
miki.tebeka authored
60 print("WARNING: Can't find index.rst")
93034f7 Long description
miki.tebeka authored
61 return ""
62
d525f37 Python 3 support
miki.tebeka authored
63 if sys.version_info >= (3,):
64 src_root = setup_python3()
65 else:
66 src_root = "."
67
4218741 Native firefox works
miki.tebeka authored
68
930e61a Chrome and IE Python bindings. Thanks Miki Tebeka!
jrhuggins authored
69 setup(
03c3510 Indentation and not zip safe
miki.tebeka authored
70 cmdclass={'install': install},
71 name='selenium',
323c780 DavidBurns bumping version number
david.burns@theautomatedtester.co.uk authored
72 version="2.0",
ff92914 WebDriver -> Selenium
miki.tebeka authored
73 description='Python bindings for Selenium',
93034f7 Long description
miki.tebeka authored
74 long_description=find_longdesc(),
03c3510 Indentation and not zip safe
miki.tebeka authored
75 url='http://code.google.com/p/selenium/',
d525f37 Python 3 support
miki.tebeka authored
76 src_root=src_root,
94f5f5e DavidBurns setting development status to stable
david.burns@theautomatedtester.co.uk authored
77 classifiers=['Development Status :: 5 - Production/Stable',
d82302f DavidBurns added classifiers to setup
theautomatedtester authored
78 'Intended Audience :: Developers',
1e169aa DavidBurns updating licence for Pypi
theautomatedtester authored
79 'License :: OSI Approved :: Apache Software License',
d82302f DavidBurns added classifiers to setup
theautomatedtester authored
80 'Operating System :: POSIX',
81 'Operating System :: Microsoft :: Windows',
82 'Operating System :: MacOS :: MacOS X',
83 'Topic :: Software Development :: Testing',
84 'Topic :: Software Development :: Libraries',
85 'Programming Language :: Python'],
03c3510 Indentation and not zip safe
miki.tebeka authored
86 package_dir={
e280834 SimonStewart and DavidBurns: Landing the new python bindings. Thanks …
simon.m.stewart authored
87 'selenium': 'py/selenium',
4f1c652 updating the location of the server for this test to connect to -- lo…
adam_goucher@hotmail.com authored
88 'selenium.common': 'py/selenium/common',
3ebd131 DavidBurns Reverting my last commit since I pressed return by accident
theautomatedtester authored
89 'selenium.test': 'py/test',
90 'selenium.test.selenium': 'py/test/selenium',
91 'selenium.test.selenium.webdriver': 'py/test/selenium/webdriver',
92 'selenium.test.selenium.webdriver.chrome': 'py/test/selenium/webdriver/chrome',
93 'selenium.test.selenium.webdriver.common': 'py/test/selenium/webdriver/common',
94 'selenium.test.selenium.webdriver.firefox': 'py/test/selenium/webdriver/firefox',
95 'selenium.test.selenium.webdriver.ie': 'py/test/selenium/webdriver/ie',
96 'selenium.test.selenium.webdriver.remote': 'py/test/selenium/webdriver/remote',
e280834 SimonStewart and DavidBurns: Landing the new python bindings. Thanks …
simon.m.stewart authored
97 'selenium.webdriver': 'py/selenium/webdriver',
98 'selenium.webdriver.chrome': 'py/selenium/webdriver/chrome',
99 'selenium.webdriver.common': 'py/selenium/webdriver/common',
100 'selenium.webdriver.firefox': 'py/selenium/webdriver/firefox',
101 'selenium.webdriver.ie': 'py/selenium/webdriver/ie',
102 'selenium.webdriver.remote': 'py/selenium/webdriver/remote',
03c3510 Indentation and not zip safe
miki.tebeka authored
103 },
104 packages=['selenium',
4f1c652 updating the location of the server for this test to connect to -- lo…
adam_goucher@hotmail.com authored
105 'selenium.common',
3ebd131 DavidBurns Reverting my last commit since I pressed return by accident
theautomatedtester authored
106 'selenium.test',
107 'selenium.test.selenium',
108 'selenium.test.selenium.webdriver',
109 'selenium.test.selenium.webdriver.chrome',
110 'selenium.test.selenium.webdriver.common',
111 'selenium.test.selenium.webdriver.firefox',
112 'selenium.test.selenium.webdriver.ie',
113 'selenium.test.selenium.webdriver.remote',
e280834 SimonStewart and DavidBurns: Landing the new python bindings. Thanks …
simon.m.stewart authored
114 'selenium.webdriver',
115 'selenium.webdriver.chrome',
116 'selenium.webdriver.common',
117 'selenium.webdriver.firefox',
118 'selenium.webdriver.ie',
119 'selenium.webdriver.remote', ],
120 package_data={
121 'selenium.webdriver.firefox': ['*.xpi'],
122 'selenium.webdriver.ie': ['*.dll'],
4218741 Native firefox works
miki.tebeka authored
123 },
03c3510 Indentation and not zip safe
miki.tebeka authored
124 include_package_data=True,
ade8e51 DavidBurns setting rdflib to a specfic version after feedback from users
david.burns@theautomatedtester.co.uk authored
125 install_requires=['rdflib==3.1.0'],
03c3510 Indentation and not zip safe
miki.tebeka authored
126 zip_safe=False,
127
930e61a Chrome and IE Python bindings. Thanks Miki Tebeka!
jrhuggins authored
128 )
Something went wrong with that request. Please try again.