Merge pull request #12756 from jefferyto/python3-maxminddb-fix-build-openwrt-19.07

[openwrt-19.07] python3-maxminddb: Fix build when using newer setuptools
This commit is contained in:
Rosen Penev 2020-07-08 11:04:23 -07:00 committed by GitHub
commit 5c4ead1f12
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 34 additions and 1 deletions

View file

@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=maxminddb PKG_NAME:=maxminddb
PKG_VERSION:=1.4.1 PKG_VERSION:=1.4.1
PKG_RELEASE:=1 PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/m/maxminddb/ PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/m/maxminddb/

View file

@ -0,0 +1,33 @@
Adapted from 3aac426[1] to account for a difference in formatting.
[1]: https://github.com/maxmind/MaxMind-DB-Reader-python/commit/3aac426e354f91814f6fd0829baee137b0bb093f
--- a/setup.py
+++ b/setup.py
@@ -9,7 +9,7 @@ from distutils.command.build_ext import
from distutils.errors import (CCompilerError, DistutilsExecError,
DistutilsPlatformError)
-from setuptools import setup, Extension, Feature
+from setuptools import setup, Extension
cmdclass = {}
PYPY = hasattr(sys, 'pypy_version_info')
@@ -107,16 +107,7 @@ def find_packages(location):
def run_setup(with_cext):
kwargs = {}
if with_cext:
- if Feature:
- kwargs['features'] = {
- 'extension':
- Feature(
- "optional C implementation",
- standard=True,
- ext_modules=ext_module)
- }
- else:
- kwargs['ext_modules'] = ext_module
+ kwargs['ext_modules'] = ext_module
setup(
name='maxminddb',