Permalink
Browse files

fix setup.py to work with plain distutils (makes it work in Py3.3)

  • Loading branch information...
1 parent 7b39032 commit b0cacc2a497b86da80b9533826d9ec809f3d682a @scoder scoder committed Apr 21, 2012
Showing with 7 additions and 2 deletions.
  1. +7 −2 setup.py
View
@@ -2,7 +2,12 @@
import re
import os.path
-from setuptools import setup
+try:
+ from setuptools import setup
+ extra_kwargs = {'test_suite': 'cssselect.tests'}
+except ImportError:
+ from distutils.core import setup
+ extra_kwargs = {}
ROOT = os.path.dirname(__file__)
@@ -24,7 +29,6 @@
url='http://packages.python.org/cssselect/',
license='BSD',
packages=['cssselect'],
- test_suite='cssselect.tests',
classifiers=[
'Development Status :: 4 - Beta',
'Intended Audience :: Developers',
@@ -38,4 +42,5 @@
'Programming Language :: Python :: 3.1',
'Programming Language :: Python :: 3.2',
],
+ **extra_kwargs
)

0 comments on commit b0cacc2

Please sign in to comment.