BuildWithDLLs now inherits from CFFIBuild to *theoretically* fix windows.

This commit is contained in:
Ron Cohen
2014-08-21 18:42:27 +02:00
parent a459712fde
commit acca2726df

View File

@@ -102,8 +102,20 @@ class TestCommand(Command):
test_argv = test_argv0 + shlex.split(self.args)
unittest.main(None, defaultTest='test.test_suite', argv=test_argv)
class CFFIBuild(build):
"""Hack to combat the chicken and egg problem that we need cffi
to add cffi as an extension.
"""
def finalize_options(self):
# This ffi is pygit2.ffi due to the path trick used in the beginning
# of the file
from ffi import ffi
class BuildWithDLLs(build):
self.distribution.ext_modules.append(ffi.verifier.get_extension())
build.finalize_options(self)
class BuildWithDLLs(CFFIBuild):
# On Windows, we install the git2.dll too.
def _get_dlls(self):
@@ -166,19 +178,6 @@ with codecs.open('README.rst', 'r', 'utf-8') as readme:
long_description = readme.read()
class CFFIBuild(build):
"""Hack to combat the chicken and egg problem that we need cffi
to add cffi as an extension.
"""
def finalize_options(self):
# This ffi is pygit2.ffi due to the path trick used in the beginning
# of the file
from ffi import ffi
self.distribution.ext_modules.append(ffi.verifier.get_extension())
build.finalize_options(self)
cmdclass = {
'test': TestCommand,
'sdist': sdist_files_from_git}