python-dns/SOURCES/1000-use-setuptools-to-build-dnspython.patch

62 lines
2.2 KiB
Diff

diff -Naur dnspython-2.6.1/pyproject.toml dnspython-2.6.1-mod/pyproject.toml
--- dnspython-2.6.1/pyproject.toml 2024-02-18 15:35:12.000000000 -0300
+++ dnspython-2.6.1-mod/pyproject.toml 2024-04-30 16:01:08.055650907 -0300
@@ -6,7 +6,7 @@
name = "dnspython"
description = "DNS toolkit"
authors = [{ name = "Bob Halley", email = "halley@dnspython.org" }]
-license = "ISC"
+license = {text = "ISC"}
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
diff -Naur dnspython-2.6.1/setup.py dnspython-2.6.1-mod/setup.py
--- dnspython-2.6.1/setup.py 1969-12-31 21:00:00.000000000 -0300
+++ dnspython-2.6.1-mod/setup.py 2024-04-30 15:58:24.489890400 -0300
@@ -0,0 +1,45 @@
+#!/usr/bin/env python3
+#
+# Copyright (C) Dnspython Contributors, see LICENSE for text of ISC license
+#
+# Copyright (C) 2003-2007, 2009-2011 Nominum, Inc.
+#
+# Permission to use, copy, modify, and distribute this software and its
+# documentation for any purpose with or without fee is hereby granted,
+# provided that the above copyright notice and this permission notice
+# appear in all copies.
+#
+# THE SOFTWARE IS PROVIDED "AS IS" AND NOMINUM DISCLAIMS ALL WARRANTIES
+# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL NOMINUM BE LIABLE FOR
+# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+# OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+import sys
+from setuptools import setup, find_packages
+
+
+try:
+ sys.argv.remove("--cython-compile")
+except ValueError:
+ compile_cython = False
+else:
+ compile_cython = True
+ from Cython.Build import cythonize
+
+ ext_modules = cythonize(
+ ["dns/*.py", "dns/quic/*.py", "dns/rdtypes/*.py", "dns/rdtypes/*/*.py"],
+ language_level="3",
+ )
+
+kwargs = {
+ "name": "dnspython",
+ "version": "@VERSION@",
+ "packages": find_packages(exclude=["tests"]),
+ "ext_modules": ext_modules if compile_cython else None,
+ "zip_safe": False if compile_cython else None,
+}
+
+setup(**kwargs)