From 5707933f995d1f315b077f109010daa77753e127 Mon Sep 17 00:00:00 2001 From: Roger Binns Date: Wed, 13 Sep 2023 10:01:55 -0700 Subject: [PATCH] Remove name == main block Should fix https://github.com/pypa/cibuildwheel/issues/1611 --- setup.py | 79 ++++++++++++++++++++++++++++---------------------------- 1 file changed, 39 insertions(+), 40 deletions(-) diff --git a/setup.py b/setup.py index 1ce2729e..f31f3390 100644 --- a/setup.py +++ b/setup.py @@ -805,43 +805,42 @@ def get_icu_config() -> IcuConfig | None: # We depend on every .[ch] file in src depends = [f for f in glob.glob("src/*.[ch]") if f != "src/apsw.c"] -if __name__ == '__main__': - setup(name="apsw", - version=version, - python_requires=">=3.8", - description="Another Python SQLite Wrapper", - long_description=pathlib.Path("README.rst").read_text(encoding="utf8"), - long_description_content_type="text/x-rst", - author="Roger Binns", - author_email="rogerb@rogerbinns.com", - url="https://github.com/rogerbinns/apsw/", - project_urls=project_urls, - classifiers=[ - "Development Status :: 5 - Production/Stable", - "Intended Audience :: Developers", - "License :: OSI Approved", - "Programming Language :: C", - "Programming Language :: Python :: 3", - "Topic :: Database :: Front-Ends", - ], - keywords=["database", "sqlite"], - license="OSI Approved", - platforms="any", - ext_modules=[ - Extension("apsw.__init__", ["src/apsw.c"], - include_dirs=include_dirs, - library_dirs=library_dirs, - libraries=libraries, - define_macros=define_macros, - depends=depends) - ], - packages=["apsw"], - package_data={"apsw": ["__init__.pyi", "py.typed"]}, - cmdclass={ - 'test': run_tests, - 'build_test_extension': build_test_extension, - 'fetch': fetch, - 'build_ext': apsw_build_ext, - 'build': apsw_build, - 'sdist': apsw_sdist, - }) +setup(name="apsw", + version=version, + python_requires=">=3.8", + description="Another Python SQLite Wrapper", + long_description=pathlib.Path("README.rst").read_text(encoding="utf8"), + long_description_content_type="text/x-rst", + author="Roger Binns", + author_email="rogerb@rogerbinns.com", + url="https://github.com/rogerbinns/apsw/", + project_urls=project_urls, + classifiers=[ + "Development Status :: 5 - Production/Stable", + "Intended Audience :: Developers", + "License :: OSI Approved", + "Programming Language :: C", + "Programming Language :: Python :: 3", + "Topic :: Database :: Front-Ends", + ], + keywords=["database", "sqlite"], + license="OSI Approved", + platforms="any", + ext_modules=[ + Extension("apsw.__init__", ["src/apsw.c"], + include_dirs=include_dirs, + library_dirs=library_dirs, + libraries=libraries, + define_macros=define_macros, + depends=depends) + ], + packages=["apsw"], + package_data={"apsw": ["__init__.pyi", "py.typed"]}, + cmdclass={ + 'test': run_tests, + 'build_test_extension': build_test_extension, + 'fetch': fetch, + 'build_ext': apsw_build_ext, + 'build': apsw_build, + 'sdist': apsw_sdist, + })