Skip to content

Commit a19b965

Browse files
committed
use setuptools if available.
1 parent 95dd598 commit a19b965

1 file changed

Lines changed: 11 additions & 9 deletions

File tree

setup.py

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
1-
from distutils.core import setup
1+
try:
2+
from setuptools import setup
3+
except ImportError:
4+
from distutils.core import setup
5+
import sys
6+
# patch distutils if it can't cope with the "classifiers" keyword
7+
if sys.version < '2.2.3':
8+
from distutils.dist import DistributionMetadata
9+
DistributionMetadata.classifiers = None
10+
DistributionMetadata.download_url = None
211

312
import warnings
413
warnings.filterwarnings('ignore', 'Unknown distribution option')
514

6-
import sys
7-
# patch distutils if it can't cope with the "classifiers" keyword
8-
if sys.version < '2.2.3':
9-
from distutils.dist import DistributionMetadata
10-
DistributionMetadata.classifiers = None
11-
DistributionMetadata.download_url = None
12-
1315
__version__ = '0.9.2'
1416
__revision__ = "$Rev$"
1517
__date__ = "$Date$"
@@ -41,5 +43,5 @@
4143
license='Open Software License',
4244
packages=['DBUtils', 'DBUtils.Examples', 'DBUtils.Testing'],
4345
package_data={'DBUtils': ['Docs/*']},
44-
zip_safe=1
46+
zip_safe=0
4547
)

0 commit comments

Comments
 (0)