Skip to content

Commit 8dce55a

Browse files
authored
Merge pull request #325 from MarketSquare/pypy-description
Fixes python2 compatibility problem to read pypy description from readme.md
2 parents 59190a3 + 5d74870 commit 8dce55a

File tree

2 files changed

+20
-13
lines changed

2 files changed

+20
-13
lines changed

setup.py

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#!/usr/bin/env python
22

3+
import io
34
import sys
45
from os.path import abspath, dirname, join
56

@@ -8,34 +9,40 @@
89
except ImportError:
910
from distutils.core import setup
1011

11-
1212
PY3 = sys.version_info > (3,)
1313

14-
VERSION = None
15-
version_file = join(dirname(abspath(__file__)), 'src', 'RequestsLibrary', 'version.py')
16-
with open(version_file) as file:
17-
code = compile(file.read(), version_file, 'exec')
18-
exec(code)
19-
20-
DESCRIPTION = """
21-
Robot Framework keyword library wrapper around the HTTP client library requests.
22-
"""[1:-1]
23-
2414
CLASSIFIERS = """
2515
Development Status :: 5 - Production/Stable
2616
License :: OSI Approved :: MIT License
2717
Operating System :: OS Independent
2818
Programming Language :: Python
19+
Programming Language :: Python :: 2
20+
Programming Language :: Python :: 2.7
21+
Programming Language :: Python :: 3
22+
Programming Language :: Python :: 3.6
23+
Programming Language :: Python :: 3.7
24+
Programming Language :: Python :: 3.8
25+
Programming Language :: Python :: 3.9
2926
Topic :: Software Development :: Testing
3027
"""[1:-1]
3128

3229
TEST_REQUIRE = ['robotframework>=3.2.1', 'pytest', 'flask', 'six', 'coverage', 'flake8'] if PY3 \
3330
else ['robotframework>=3.2.1', 'pytest', 'flask', 'coverage', 'flake8', 'mock']
3431

32+
VERSION = None
33+
version_file = join(dirname(abspath(__file__)), 'src', 'RequestsLibrary', 'version.py')
34+
with open(version_file) as file:
35+
code = compile(file.read(), version_file, 'exec')
36+
exec(code)
37+
38+
with io.open('README.md', mode='rt', encoding='utf-8') as file:
39+
readme = file.read()
40+
3541
setup(name='robotframework-requests',
3642
version=VERSION,
3743
description='Robot Framework keyword library wrapper around requests',
38-
long_description=DESCRIPTION,
44+
long_description=readme,
45+
long_description_content_type='text/markdown',
3946
author='Bulkan Savun Evcimen',
4047
author_email='bulkan@gmail.com',
4148
maintainer='Luca Giovenzana',

src/RequestsLibrary/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
VERSION = '0.8.1'
1+
VERSION = '0.8.2'

0 commit comments

Comments
 (0)