File: fix-setup.py

package info (click to toggle)
python-first 2.0.0-3
  • links: PTS
  • area: main
  • in suites: bookworm, bullseye
  • size: 128 kB
  • sloc: python: 82; makefile: 2
file content (28 lines) | stat: -rw-r--r-- 998 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
--- a/setup.py
+++ b/setup.py
@@ -1,15 +1,22 @@
 from setuptools import setup
 
 import first
+import sys
 
+if sys.version_info[0] >= 3:
+    long_description = (open('README.rst', encoding='utf-8').read() + '\n\n' +
+                        open('HISTORY.rst', encoding='utf-8').read() + '\n\n' +
+                        open('AUTHORS.rst', encoding='utf-8').read())
+else:
+    long_description = (open('README.rst').read() + '\n\n' +
+                        open('HISTORY.rst').read() + '\n\n' +
+                        open('AUTHORS.rst').read())
 
 setup(
     name='first',
     version=first.__version__,
     description='Return the first true value of an iterable.',
-    long_description=(open('README.rst').read() + '\n\n' +
-                      open('HISTORY.rst').read() + '\n\n' +
-                      open('AUTHORS.rst').read()),
+    long_description=long_description,
     url='http://github.com/hynek/first/',
     license=first.__license__,
     author=first.__author__,