Skip to content

Commit 71a61fb

Browse files
committed
Include version-specific module with async support
1 parent e46f82e commit 71a61fb

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

setup.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import os
22
import io
33
import re
4+
import sys
45
from setuptools import setup
56

67

@@ -21,6 +22,14 @@ def find_version(*file_paths):
2122
return version_match.group(1)
2223

2324

25+
async_modules = []
26+
if sys.version_info > (3, 3):
27+
if sys.version_info < (3, 5):
28+
async_modules = ['_aio_34']
29+
else:
30+
async_modules = ['_aio_35']
31+
32+
2433
CLASSIFIERS = """\
2534
Development Status :: 5 - Production/Stable
2635
Intended Audience :: Science/Research
@@ -39,6 +48,7 @@ def find_version(*file_paths):
3948
4049
"""
4150

51+
4252
setup(
4353
name='memory_profiler',
4454
description='A module for monitoring memory usage of a python program',
@@ -47,7 +57,7 @@ def find_version(*file_paths):
4757
author='Fabian Pedregosa',
4858
author_email='f@bianp.net',
4959
url='https://github.com/pythonprofilers/memory_profiler',
50-
py_modules=['memory_profiler', 'mprof'],
60+
py_modules=['memory_profiler', 'mprof'] + async_modules,
5161
entry_points={
5262
'console_scripts' : ['mprof = mprof:main'],
5363
},

0 commit comments

Comments
 (0)