Browse Source

add win_inet_pton for py27

pull/293/head
Rossen Georgiev 5 years ago
parent
commit
9cf0468c0b
  1. 3
      requirements.txt
  2. 6
      setup.py
  3. 7
      steam/utils/__init__.py

3
requirements.txt

@ -5,6 +5,7 @@ vdf>=3.3
gevent>=1.3.0 gevent>=1.3.0
protobuf>=3.0.0 protobuf>=3.0.0
gevent-eventemitter~=2.1 gevent-eventemitter~=2.1
enum34==1.1.2; python_version < '3.4'
PyYAML==5.1 PyYAML==5.1
cachetools>=3.0.0 cachetools>=3.0.0
enum34==1.1.2; python_version < '3.4'
win-inet-pton; python_version == '2.7' and platform_system == 'Windows'

6
setup.py

@ -3,7 +3,6 @@
from setuptools import setup, find_packages from setuptools import setup, find_packages
from codecs import open from codecs import open
from os import path from os import path
import sys
here = path.abspath(path.dirname(__file__)) here = path.abspath(path.dirname(__file__))
with open(path.join(here, 'README.rst'), encoding='utf-8') as f: with open(path.join(here, 'README.rst'), encoding='utf-8') as f:
@ -20,6 +19,8 @@ install_requires = [
'requests>=2.9.1', 'requests>=2.9.1',
'vdf>=3.3', 'vdf>=3.3',
'cachetools>=3.0.0', 'cachetools>=3.0.0',
"win-inet-pton; python_version == '2.7' and platform_system == 'Windows'",
"enum34==1.1.2; python_version < '3.4'",
] ]
install_extras = { install_extras = {
@ -30,9 +31,6 @@ install_extras = {
], ],
} }
if sys.version_info < (3, 4):
install_requires.append('enum34>=1.0.4')
setup( setup(
name='steam', name='steam',
version=__version__, version=__version__,

7
steam/utils/__init__.py

@ -1,10 +1,15 @@
"""Utility package with various useful functions """Utility package with various useful functions
""" """
import six
from six.moves import xrange as _range
if sys.PY2:
import win_inet_pton
import weakref import weakref
import struct import struct
import socket import socket
import sys import sys
from six.moves import xrange as _range
def ip4_from_int(ip): def ip4_from_int(ip):

Loading…
Cancel
Save