Skip to content

Commit 8cb99a5

Browse files
committed
Use README as project long description on PyPI.
setup.py can otherwise use README as-is, but relative INSTALL.rst link is changed to an absolute URL. Resolves robotframework#1789.
1 parent add5eee commit 8cb99a5

File tree

2 files changed

+25
-25
lines changed

2 files changed

+25
-25
lines changed

README.rst

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,6 @@
11
Robot Framework
22
===============
33

4-
.. note:: This repository is currently under migration from `Google Code`__.
5-
Code and issues have already been moved, but it will take some tim
6-
before `old wiki pages`__ are migrated.
7-
8-
__ http://code.google.com/p/robotframework/
9-
__ http://code.google.com/p/robotframework/wiki/DocumentationIndex?tm=6
10-
114
Introduction
125
------------
136

@@ -29,11 +22,12 @@ http://robotframework.org.
2922

3023
Robot Framework project is hosted on GitHub_ where you can find source code,
3124
an issue tracker, and some further documentation. Downloads are hosted at
32-
PyPI_, except for the standalone jar distribution that is in `Maven central`_.
25+
PyPI_, except for the standalone JAR distribution that is in `Maven central`_.
3326

3427
.. _GitHub: https://github.com/robotframework/robotframework
3528
.. _PyPI: https://pypi.python.org/pypi/robotframework
3629
.. _Maven central: http://search.maven.org/#search%7Cga%7C1%7Ca%3Arobotframework
30+
.. _pip: http://pip-installer.org
3731

3832
Installation
3933
------------
@@ -49,11 +43,9 @@ install the framework with::
4943
python setup.py install
5044

5145
For more detailed installation instructions, including installing
52-
Python, Jython and IronPython, see `INSTALL.rst`_.
46+
Python, Jython and IronPython, see `<INSTALL.rst>`__.
5347

54-
.. Using an absolute URL here to make this work also on PyPI.
55-
.. _INSTALL.rst: https://github.com/robotframework/robotframework/blob/master/INSTALL.rst
56-
.. _pip: http://pip-installer.org
48+
.. setup.py replaces the above `<INSTALL.rst>`__ with an absolute URL
5749
5850
Example
5951
-------

setup.py

Lines changed: 21 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,30 @@
22

33
import sys
44
import os
5-
from os.path import join, dirname
5+
from os.path import abspath, join, dirname
66
from distutils.core import setup
77

88
if 'develop' in sys.argv or 'bdist_wheel' in sys.argv:
99
import setuptools # support setuptools development mode and wheels
1010

11-
execfile(join(dirname(__file__), 'src', 'robot', 'version.py'))
11+
CURDIR = dirname(abspath(__file__))
1212

13+
execfile(join(CURDIR, 'src', 'robot', 'version.py'))
14+
VERSION = get_version(sep='')
15+
with open(join(CURDIR, 'README.rst')) as readme:
16+
install = 'https://github.com/robotframework/robotframework/blob/master/INSTALL.rst'
17+
LONG_DESCRIPTION = readme.read().replace(
18+
'`<INSTALL.rst>`__', '`INSTALL.rst <%s>`__' % install)
19+
CLASSIFIERS = """
20+
Development Status :: 5 - Production/Stable
21+
License :: OSI Approved :: Apache Software License
22+
Operating System :: OS Independent
23+
Programming Language :: Python
24+
Topic :: Software Development :: Testing
25+
""".strip().splitlines()
26+
KEYWORDS = 'robotframework testing testautomation acceptancetesting atdd bdd'
1327
# Maximum width in Windows installer seems to be 70 characters -------|
14-
DESCRIPTION = """
28+
WINDOWS_DESCRIPTION = """
1529
Robot Framework is a generic test automation framework for acceptance
1630
testing and acceptance test-driven development (ATDD). It has
1731
easy-to-use tabular test data syntax and utilizes the keyword-driven
@@ -20,13 +34,6 @@
2034
new keywords from existing ones using the same syntax that is used for
2135
creating test cases.
2236
""".strip()
23-
CLASSIFIERS = """
24-
Development Status :: 5 - Production/Stable
25-
License :: OSI Approved :: Apache Software License
26-
Operating System :: OS Independent
27-
Programming Language :: Python
28-
Topic :: Software Development :: Testing
29-
""".strip().splitlines()
3037
PACKAGES = ['robot', 'robot.api', 'robot.conf',
3138
'robot.htmldata', 'robot.libdocpkg', 'robot.libraries',
3239
'robot.model', 'robot.output', 'robot.parsing',
@@ -47,18 +54,19 @@
4754
SCRIPTS = [s+'.bat' for s in SCRIPTS]
4855
if 'bdist_wininst' in sys.argv:
4956
SCRIPTS.append('robot_postinstall.py')
57+
LONG_DESCRIPTION = WINDOWS_DESCRIPTION
5058

5159
setup(
5260
name = 'robotframework',
53-
version = get_version(sep=''),
61+
version = VERSION,
5462
author = 'Robot Framework Developers',
5563
author_email = 'robotframework@gmail.com',
5664
url = 'http://robotframework.org',
5765
download_url = 'https://pypi.python.org/pypi/robotframework',
5866
license = 'Apache License 2.0',
5967
description = 'A generic test automation framework',
60-
long_description = DESCRIPTION,
61-
keywords = 'robotframework testing testautomation atdd bdd',
68+
long_description = LONG_DESCRIPTION,
69+
keywords = KEYWORDS,
6270
platforms = 'any',
6371
classifiers = CLASSIFIERS,
6472
package_dir = {'': 'src'},

0 commit comments

Comments
 (0)