Skip to content

Commit 794ccf3

Browse files
author
Jose Diaz-Gonzalez
committed
fix: use distutils.core on error
1 parent 977424c commit 794ccf3

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

setup.py

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,24 @@
11
#!/usr/bin/env python
22
# -*- coding: utf-8 -*-
33
import os
4-
from setuptools import setup
5-
64
from github_backup import __version__
75

6+
try:
7+
from setuptools import setup
8+
setup # workaround for pyflakes issue #13
9+
except ImportError:
10+
from distutils.core import setup
11+
12+
# Hack to prevent stupid TypeError: 'NoneType' object is not callable error on
13+
# exit of python setup.py test # in multiprocessing/util.py _exit_function when
14+
# running python setup.py test (see
15+
# http://www.eby-sarna.com/pipermail/peak/2010-May/003357.html)
16+
try:
17+
import multiprocessing
18+
multiprocessing
19+
except ImportError:
20+
pass
21+
822

923
def open_file(fname):
1024
return open(os.path.join(os.path.dirname(__file__), fname))

0 commit comments

Comments
 (0)