From e63edfc9d4a1fd9703c9c3ec02ee460d24109b60 Mon Sep 17 00:00:00 2001 From: Roman Lacko Date: Wed, 14 May 2014 00:30:43 +0200 Subject: Refactoring docs/index.rst into separate rst files --- setup.py | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'setup.py') diff --git a/setup.py b/setup.py index 19f65675c..d6e9bbe2e 100644 --- a/setup.py +++ b/setup.py @@ -927,15 +927,22 @@ class pyside_build(_build): vars=vars) -def read(fname): - return open(os.path.join(os.path.dirname(__file__), fname)).read() +try: + with open(os.path.join(script_dir, 'README.rst')) as f: + README = f.read() + with open(os.path.join(script_dir, 'CHANGES.rst')) as f: + CHANGES = "Changes" + "\n" + \ + "=======" + "\n\n" + \ + f.read() +except IOError: + README = CHANGES = '' + setup( name = "PySide", version = __version__, description = ("Python bindings for the Qt cross-platform application and UI framework"), - long_description = open("README.rst").read() + "\n" + - open("CHANGES.rst").read(), + long_description = README + "\n\n" + CHANGES, options = { "bdist_wininst": { "install_script": "pyside_postinstall.py", -- cgit v1.2.3