Skip to content

Commit 2a6659a

Browse files
committed
Update setup.py.
- Read long description fromt README.rst. - Better mechanism to read version from source. - Etc.
1 parent d381404 commit 2a6659a

File tree

1 file changed

+21
-24
lines changed

1 file changed

+21
-24
lines changed

setup.py

Lines changed: 21 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -2,38 +2,35 @@
22

33
from distutils.core import setup
44
from os.path import abspath, dirname, join
5+
import re
56

6-
# Get __version__ dynamically
7-
execfile(join(dirname(abspath(__file__)), 'src', 'robotremoteserver.py'))
8-
9-
DESCRIPTION = """
10-
Robot Framework remote servers allow hosting test libraries on different
11-
machines and/or interpreters than Robot Framework itself is running on.
12-
This version is implemented with Python and supports also Jython (JVM) and
13-
IronPython (.NET). Separate implementations exist for other languages.
14-
For more information about the remote library interface in general see
15-
http://code.google.com/p/robotframework/wiki/RemoteLibrary
16-
""".strip()
7+
NAME = 'robotremoteserver'
178
CLASSIFIERS = """
189
Development Status :: 5 - Production/Stable
1910
License :: OSI Approved :: Apache Software License
2011
Operating System :: OS Independent
2112
Programming Language :: Python
2213
Topic :: Software Development :: Testing
2314
""".strip().splitlines()
15+
CURDIR = dirname(abspath(__file__))
16+
with open(join(CURDIR, 'src', NAME+'.py')) as source:
17+
VERSION = re.search("\n__version__ = '(.*)'\n", source.read()).group(1)
18+
with open(join(CURDIR, 'README.rst')) as readme:
19+
README = readme.read()
2420

2521
setup(
26-
name = 'robotremoteserver',
27-
version = __version__,
28-
author = 'Robot Framework Developers',
29-
author_email = '[email protected]',
30-
url = 'https://github.com/robotframework/PythonRemoteServer',
31-
license = 'Apache License 2.0',
32-
description = 'Robot Framework remote server',
33-
long_description = DESCRIPTION,
34-
keywords = 'robotframework testing testautomation',
35-
platforms = 'any',
36-
classifiers = CLASSIFIERS,
37-
package_dir = {'': 'src'},
38-
py_modules = ['robotremoteserver']
22+
name = NAME,
23+
version = VERSION,
24+
author = 'Robot Framework Developers',
25+
author_email = '[email protected]',
26+
url = 'https://github.com/robotframework/PythonRemoteServer',
27+
download_url = 'https://pypi.python.org/pypi/robotremoteserver',
28+
license = 'Apache License 2.0',
29+
description = 'Python Remote Server for Robot Framework',
30+
long_description = README,
31+
keywords = 'robotframework testing testautomation remote',
32+
platforms = 'any',
33+
classifiers = CLASSIFIERS,
34+
package_dir = {'': 'src'},
35+
py_modules = [NAME],
3936
)

0 commit comments

Comments
 (0)