|
@@ -3,7 +3,7 @@
|
|
|
# Setup file for dulwich
|
|
|
# Copyright (C) 2008-2022 Jelmer Vernooij <jelmer@jelmer.uk>
|
|
|
|
|
|
-from setuptools import setup, Extension, Distribution
|
|
|
+from setuptools import setup, Extension
|
|
|
import os
|
|
|
import sys
|
|
|
|
|
@@ -14,25 +14,6 @@ if sys.version_info < (3, 6):
|
|
|
'For 2.7 support, please install a version prior to 0.20')
|
|
|
|
|
|
|
|
|
-dulwich_version_string = '0.20.46'
|
|
|
-
|
|
|
-
|
|
|
-class DulwichDistribution(Distribution):
|
|
|
-
|
|
|
- def is_pure(self):
|
|
|
- if self.pure:
|
|
|
- return True
|
|
|
-
|
|
|
- def has_ext_modules(self):
|
|
|
- return not self.pure
|
|
|
-
|
|
|
- global_options = Distribution.global_options + [
|
|
|
- ('pure', None, "use pure Python code instead of C "
|
|
|
- "extensions (slower on CPython)")]
|
|
|
-
|
|
|
- pure = False
|
|
|
-
|
|
|
-
|
|
|
if sys.platform == 'darwin' and os.path.exists('/usr/bin/xcodebuild'):
|
|
|
# XCode 4.0 dropped support for ppc architecture, which is hardcoded in
|
|
|
# distutils.sysconfig
|
|
@@ -56,15 +37,18 @@ if '__pypy__' not in sys.modules and sys.platform != 'win32':
|
|
|
'gevent', 'geventhttpclient', 'setuptools>=17.1'])
|
|
|
|
|
|
|
|
|
+optional = os.environ.get('CIBUILDWHEEL', '0') != '1'
|
|
|
+
|
|
|
+
|
|
|
ext_modules = [
|
|
|
- Extension('dulwich._objects', ['dulwich/_objects.c']),
|
|
|
- Extension('dulwich._pack', ['dulwich/_pack.c']),
|
|
|
- Extension('dulwich._diff_tree', ['dulwich/_diff_tree.c']),
|
|
|
+ Extension('dulwich._objects', ['dulwich/_objects.c'],
|
|
|
+ optional=optional),
|
|
|
+ Extension('dulwich._pack', ['dulwich/_pack.c'],
|
|
|
+ optional=optional),
|
|
|
+ Extension('dulwich._diff_tree', ['dulwich/_diff_tree.c'],
|
|
|
+ optional=optional),
|
|
|
]
|
|
|
|
|
|
-
|
|
|
-setup(keywords="git vcs",
|
|
|
- package_data={'': ['../docs/tutorial/*.txt', 'py.typed']},
|
|
|
+setup(package_data={'': ['../docs/tutorial/*.txt', 'py.typed']},
|
|
|
ext_modules=ext_modules,
|
|
|
- distclass=DulwichDistribution, # type: ignore
|
|
|
tests_require=tests_require)
|