comparison setup.py @ 567:059260191371

Tweak setup.py to build packages with pure-Python tags if the extension is not expected to be built (Python 3.4-)
author Franz Glasner <fzglas.hg@dom66.de>
date Fri, 07 Jan 2022 17:49:33 +0100
parents adf65c31f8fc
children ed1f0fdcda65
comparison
equal deleted inserted replaced
566:dc2e2384c8c7 567:059260191371
45 all_requirements.extend(toml_requirements) 45 all_requirements.extend(toml_requirements)
46 46
47 47
48 cmdclass = {} 48 cmdclass = {}
49 ext_modules = [] 49 ext_modules = []
50 setup_extra_kwds = {}
50 51
51 # 52 #
52 # Handle the optinal C-extension for Python3.7+ and CPython only. 53 # Handle the optinal C-extension for Python3.7+ and CPython only.
53 # PyPy does not need this. 54 # PyPy does not need this.
54 # 55 #
99 self.py_limited_api = 'cp37' 100 self.py_limited_api = 'cp37'
100 super().finalize_options() 101 super().finalize_options()
101 102
102 cmdclass = {'bdist_wheel': BDistWheel} 103 cmdclass = {'bdist_wheel': BDistWheel}
103 104
105 if ext_modules:
106 setup_extra_kwds["ext_modules"] = ext_modules
107 if cmdclass:
108 setup_extra_kwds["cmdclass"] = cmdclass
109
104 setup( 110 setup(
105 name="ConfigMix", 111 name="ConfigMix",
106 version=version, 112 version=version,
107 author="Franz Glasner", 113 author="Franz Glasner",
108 license='BSD 3-Clause "New" or "Revised" License', 114 license='BSD 3-Clause "New" or "Revised" License',
125 "Programming Language :: Python :: 2.7", 131 "Programming Language :: Python :: 2.7",
126 "Programming Language :: Python :: 3", 132 "Programming Language :: Python :: 3",
127 "Topic :: Software Development :: Libraries :: Python Modules" 133 "Topic :: Software Development :: Libraries :: Python Modules"
128 ], 134 ],
129 python_requires=">=2.6", 135 python_requires=">=2.6",
130 ext_modules=ext_modules,
131 cmdclass=cmdclass,
132 extras_require={ 136 extras_require={
133 "aws" : aws_requirements, 137 "aws" : aws_requirements,
134 "toml": toml_requirements, 138 "toml": toml_requirements,
135 "yaml": yaml_requirements, 139 "yaml": yaml_requirements,
136 "all" : all_requirements, 140 "all" : all_requirements,
137 }, 141 },
138 tests_require=all_requirements, 142 tests_require=all_requirements,
143 **setup_extra_kwds
139 ) 144 )