summaryrefslogtreecommitdiff
path: root/setuptools
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2016-08-20 18:22:50 -0400
committerGitHub <noreply@github.com>2016-08-20 18:22:50 -0400
commit9ac3dbb940c4eb77fcb2a7d6f7119d228fdaaeee (patch)
tree815da82f00ecc1546e95e4b50672b3eef2a4a962 /setuptools
parentac325f34b73c534fd19204400afa598bf63ea301 (diff)
parentd687531884ee25d5a517d529b2fd535831b70115 (diff)
downloadpython-setuptools-git-9ac3dbb940c4eb77fcb2a7d6f7119d228fdaaeee.tar.gz
Merge pull request #753 from tlandschoff-scale/master
Make Extension accept positional arguments again (fixes #752).
Diffstat (limited to 'setuptools')
-rw-r--r--setuptools/extension.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/setuptools/extension.py b/setuptools/extension.py
index da94c3fa..f8058b72 100644
--- a/setuptools/extension.py
+++ b/setuptools/extension.py
@@ -36,9 +36,11 @@ have_pyrex = _have_cython
class Extension(_Extension):
"""Extension that uses '.c' files in place of '.pyx' files"""
- def __init__(self, name, sources, py_limited_api=False, **kw):
- self.py_limited_api = py_limited_api
- _Extension.__init__(self, name, sources, **kw)
+ def __init__(self, name, sources, *args, **kw):
+ # The *args is needed for compatibility as calls may use positional
+ # arguments. py_limited_api may be set only via keyword.
+ self.py_limited_api = kw.pop("py_limited_api", False)
+ _Extension.__init__(self, name, sources, *args, **kw)
def _convert_pyx_sources_to_lang(self):
"""