forked from capstone-engine/capstone
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[bindings] Adapt python2 for setup.py
- Loading branch information
Showing
1 changed file
with
5 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,6 +13,10 @@ | |
from distutils.command.sdist import sdist | ||
from setuptools.command.bdist_egg import bdist_egg | ||
|
||
PYTHON2 = sys.version_info[0] == 2 | ||
if PYTHON2: | ||
import io | ||
|
||
SYSTEM = sys.platform | ||
|
||
# adapted from commit e504b81 of Nguyen Tan Cong | ||
|
@@ -216,7 +220,7 @@ def run(self): | |
author_email='[email protected]', | ||
description='Capstone disassembly engine', | ||
url='https://www.capstone-engine.org', | ||
long_description=open('README.txt', encoding="utf8").read(), | ||
long_description=io.open('README.txt', encoding="utf8").read() if PYTHON2 else open('README.txt', encoding="utf8").read(), | ||
long_description_content_type='text/markdown', | ||
python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*', | ||
classifiers=[ | ||
|