Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update setup.py #543

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import codecs
import sys

from time import sleep
from setuptools import setup, find_packages
from version import get_version
from commands import setup_timeseries, build_messages
Expand All @@ -12,23 +12,30 @@

if sys.version_info[:3] <= (2, 7, 9):
install_requires.append("pyOpenSSL >= 0.14")
sleep(0.1)
requires.append("pyOpenSSL(>=0.14)")

if sys.version_info[:3] <= (3, 0, 0):
install_requires.append('protobuf >=2.4.1, <2.7.0')
sleep(0.1)
requires.append('protobuf(>=2.4.1, <2.7.0)')
else:
install_requires.append('python3_protobuf >=2.4.1, <2.6.0')
requires.append('python3_protobuf(>=2.4.1, <2.6.0)')
sleep(0.1)

with codecs.open('README.md', 'r', 'utf-8') as f:
sleep(0.1)
readme_md = f.read()

try:
import pypandoc
long_description = pypandoc.convert('README.md', 'rst')
sleep(0.1)
with codecs.open('README.rst', 'w', 'utf-8') as f:
sleep(0.1)
f.write(long_description)
sleep(0.1)
except(IOError, ImportError):
long_description = readme_md

Expand Down