]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
manager: poetry project moved to the repository root
authorAleš Mrázek <ales.mrazek@nic.cz>
Fri, 12 Jul 2024 08:12:36 +0000 (10:12 +0200)
committerAleš Mrázek <ales.mrazek@nic.cz>
Mon, 26 Aug 2024 12:28:10 +0000 (14:28 +0200)
.python-version [moved from manager/.python-version with 100% similarity]
build_c_extensions.py [moved from manager/build_c_extensions.py with 75% similarity]
manager/setup.py [deleted file]
poe [moved from manager/poe with 100% similarity]
pyproject.toml [moved from manager/pyproject.toml with 86% similarity]
setup.py [new file with mode: 0644]

similarity index 100%
rename from manager/.python-version
rename to .python-version
similarity index 75%
rename from manager/build_c_extensions.py
rename to build_c_extensions.py
index 5406433b37933d6a77e9237636a109f690b18ece..40d281f5aeb07b1149a8cc0587d298793590a34d 100644 (file)
@@ -9,7 +9,7 @@ def build(setup_kwargs: Dict[Any, Any]) -> None:
             "ext_modules": [
                 Extension(
                     name="knot_resolver_manager.kresd_controller.supervisord.plugin.notify",
-                    sources=["knot_resolver_manager/kresd_controller/supervisord/plugin/notifymodule.c"],
+                    sources=["manager/knot_resolver_manager/kresd_controller/supervisord/plugin/notifymodule.c"],
                 ),
             ]
         }
diff --git a/manager/setup.py b/manager/setup.py
deleted file mode 100644 (file)
index e3abf0f..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-# -*- coding: utf-8 -*-
-from setuptools import setup
-
-packages = \
-['knot_resolver_manager',
- 'knot_resolver_manager.cli',
- 'knot_resolver_manager.cli.cmd',
- 'knot_resolver_manager.compat',
- 'knot_resolver_manager.datamodel',
- 'knot_resolver_manager.datamodel.templates',
- 'knot_resolver_manager.datamodel.types',
- 'knot_resolver_manager.kresd_controller',
- 'knot_resolver_manager.kresd_controller.supervisord',
- 'knot_resolver_manager.kresd_controller.supervisord.plugin',
- 'knot_resolver_manager.utils',
- 'knot_resolver_manager.utils.modeling']
-
-package_data = \
-{'': ['*'], 'knot_resolver_manager.datamodel.templates': ['macros/*']}
-
-install_requires = \
-['aiohttp', 'jinja2', 'pyyaml', 'supervisor', 'typing-extensions']
-
-extras_require = \
-{'prometheus': ['prometheus-client']}
-
-entry_points = \
-{'console_scripts': ['knot-resolver = knot_resolver_manager.__main__:run',
-                     'kresctl = knot_resolver_manager.cli.main:main']}
-
-setup_kwargs = {
-    'name': 'knot-resolver-manager',
-    'version': '6.0.8',
-    'description': 'A central tool for managing individual parts of Knot Resolver',
-    'long_description': 'None',
-    'author': 'Aleš Mrázek',
-    'author_email': 'ales.mrazek@nic.cz',
-    'maintainer': 'None',
-    'maintainer_email': 'None',
-    'url': 'None',
-    'packages': packages,
-    'package_data': package_data,
-    'install_requires': install_requires,
-    'extras_require': extras_require,
-    'entry_points': entry_points,
-    'python_requires': '>=3.8,<4.0',
-}
-from build_c_extensions import *
-build(setup_kwargs)
-
-setup(**setup_kwargs)
-
-
-# This setup.py was autogenerated using Poetry for backward compatibility with setuptools.
diff --git a/manager/poe b/poe
similarity index 100%
rename from manager/poe
rename to poe
similarity index 86%
rename from manager/pyproject.toml
rename to pyproject.toml
index 3f1cb4542f6db1e9dc34b1f5b382650ca3fe1b74..ec3f779481e522c51c75053e321983413d7a6613 100644 (file)
@@ -1,12 +1,23 @@
 [tool.poetry]
 name = "knot-resolver-manager"
 version = "6.0.8"
-description = "A central tool for managing individual parts of Knot Resolver"
-
+description = "Knot Resolver Manager - a Python program that automatically manages the other components of the resolver"
+license = "GPL-3.0-or-later"
 authors = [
     "Aleš Mrázek <ales.mrazek@nic.cz>",
     "Václav Šraier <vaclav.sraier@nic.cz>"
 ]
+maintainers = [
+    "Aleš Mrázek <ales.mrazek@nic.cz>"
+]
+readme = "README.md"
+homepage = "https://www.knot-resolver.cz"
+repository = "https://gitlab.nic.cz/knot/knot-resolver"
+documentation = "https://www.knot-resolver.cz/documentation"
+
+packages = [
+    {include = "knot_resolver_manager", from = "manager"}
+]
 
 # See currently open issue about building C extensions here:
 # https://github.com/python-poetry/poetry/issues/2740
@@ -62,9 +73,9 @@ configure = { cmd = "scripts/meson-configure", help = "Configure Knot Resolver d
 run = { cmd = "scripts/run", help = "Run the manager" }
 run-debug = { cmd = "scripts/run-debug", help = "Run the manager under debugger" }
 docs = { cmd = "scripts/docs", help = "Create HTML documentation" }
-test = { shell = "env PYTHONPATH=. pytest --junitxml=unit.junit.xml --cov=knot_resolver_manager --show-capture=all ../tests/manager", help = "Run tests" }
+test = { shell = "env PYTHONPATH=. pytest --junitxml=unit.junit.xml --cov=manager/knot_resolver_manager --show-capture=all tests/manager", help = "Run tests" }
 check = { cmd = "scripts/codecheck", help = "Run static code analysis" }
-format = { shell = "black knot_resolver_manager/ tests/ scripts/ build_c_extensions.py; isort .", help = "Run code formatter" }
+format = { shell = "black manager/knot_resolver_manager/ tests/manager scripts/create_setup.py manager/build_c_extensions.py; isort .", help = "Run code formatter" }
 fixdeps = { shell = "poetry install; npm install; npm update", help = "Install/update dependencies according to configuration files"}
 examples = { cmd = "scripts/examples", help = "Validate all configuration examples" }
 kresctl = { script = "knot_resolver_manager.cli.main:main", cwd="${POE_PWD}", help="run kresctl" }
@@ -74,6 +85,7 @@ clean = """
          .mypy_cache
          .pytest_cache
          ./**/__pycache__
+         build
          dist
 """
 gen-setuppy = { shell = "python scripts/create_setup.py > setup.py", help = "Generate setup.py file for backwards compatibility" }
diff --git a/setup.py b/setup.py
new file mode 100644 (file)
index 0000000..16b3c3a
--- /dev/null
+++ b/setup.py
@@ -0,0 +1,58 @@
+# -*- coding: utf-8 -*-
+from setuptools import setup
+
+package_dir = \
+{'': 'manager'}
+
+packages = \
+['knot_resolver_manager',
+ 'knot_resolver_manager.cli',
+ 'knot_resolver_manager.cli.cmd',
+ 'knot_resolver_manager.compat',
+ 'knot_resolver_manager.datamodel',
+ 'knot_resolver_manager.datamodel.templates',
+ 'knot_resolver_manager.datamodel.types',
+ 'knot_resolver_manager.kresd_controller',
+ 'knot_resolver_manager.kresd_controller.supervisord',
+ 'knot_resolver_manager.kresd_controller.supervisord.plugin',
+ 'knot_resolver_manager.utils',
+ 'knot_resolver_manager.utils.modeling']
+
+package_data = \
+{'': ['*'], 'knot_resolver_manager.datamodel.templates': ['macros/*']}
+
+install_requires = \
+['aiohttp', 'jinja2', 'pyyaml', 'supervisor', 'typing-extensions']
+
+extras_require = \
+{'prometheus': ['prometheus-client']}
+
+entry_points = \
+{'console_scripts': ['knot-resolver = knot_resolver_manager.__main__:run',
+                     'kresctl = knot_resolver_manager.cli.main:main']}
+
+setup_kwargs = {
+    'name': 'knot-resolver-manager',
+    'version': '6.0.8',
+    'description': 'Knot Resolver Manager - a Python program that automatically manages the other components of the resolver',
+    'long_description': "# Knot Resolver\n\n[![Build Status](https://gitlab.nic.cz/knot/knot-resolver/badges/nightly/pipeline.svg?x)](https://gitlab.nic.cz/knot/knot-resolver/commits/nightly)\n[![Coverage Status](https://gitlab.nic.cz/knot/knot-resolver/badges/nightly/coverage.svg?x)](https://www.knot-resolver.cz/documentation/latest)\n[![Packaging status](https://repology.org/badge/tiny-repos/knot-resolver.svg)](https://repology.org/project/knot-resolver/versions)\n\nKnot Resolver is a full caching DNS resolver implementation. The core architecture is tiny and efficient, written in C and [LuaJIT][luajit], providing a foundation and a state-machine-like API for extension modules. There are three built-in modules - *iterator*, *validator* and *cache* - which provide the main functionality of the resolver. A few other modules are automatically loaded by default to extend the resolver's functionality.\n\nSince Knot Resolver version 6, it also includes a so-called [manager][manager]. It is a new component written in [Python][python] that hides the complexity of older versions and makes it more user friendly. For example, new features include declarative configuration in YAML format and HTTP API for dynamic changes in the resolver and more.\n\nKnot Resolver uses a [different scaling strategy][scaling] than the rest of the DNS resolvers - no threading, shared-nothing architecture (except MVCC cache which can be shared), which allows you to pin workers to available CPU cores and grow by self-replication. You can start and stop additional workers based on the contention without downtime, which is automated by the [manager][manager] by default.\n\nThe LuaJIT modules, support for DNS privacy and DNSSEC, and persistent cache with low memory footprint make it a great personal DNS resolver or a research tool to tap into DNS data. Strong filtering rules, and auto-configuration with etcd make it a great large-scale resolver solution. It also has strong support for DNS over TCP, in particular TCP Fast-Open, query pipelining and deduplication, and response reordering.\n\nFor more on using the resolver, see the [User Documentation][doc]. See the [Developer Documentation][doc-dev] for detailed architecture and development.\n\n## Packages\n\nThe latest stable packages for various distributions are available in our\n[upstream repository](https://pkg.labs.nic.cz/doc/?project=knot-resolver).\nFollow the installation instructions to add this repository to your system.\n\nKnot Resolver is also available from the following distributions' repositories:\n\n* [Fedora and Fedora EPEL](https://src.fedoraproject.org/rpms/knot-resolver)\n* [Debian stable](https://packages.debian.org/stable/knot-resolver),\n  [Debian testing](https://packages.debian.org/testing/knot-resolver),\n  [Debian unstable](https://packages.debian.org/sid/knot-resolver)\n* [Ubuntu](https://packages.ubuntu.com/jammy/knot-resolver)\n* [Arch Linux](https://archlinux.org/packages/extra/x86_64/knot-resolver/)\n* [Alpine Linux](https://pkgs.alpinelinux.org/packages?name=knot-resolver)\n\n### Packaging\n\nThe project uses [`apkg`](https://gitlab.nic.cz/packaging/apkg) for packaging.\nSee [`distro/README.md`](distro/README.md) for packaging specific instructions.\n\n## Building from sources\n\nKnot Resolver mainly depends on [KnotDNS][knot-dns] libraries, [LuaJIT][luajit], [libuv][libuv] and [Python][python].\n\nSee the [Building project][build] documentation page for more information.\n\n## Running\n\nBy default, Knot Resolver comes with [systemd][systemd] integration and you just need to start its service. It requires no configuration changes to run a server on localhost.\n\n```\n# systemctl start knot-resolver\n```\n\nSee the documentation at [knot-resolver.cz/documentation/latest][doc] for more information.\n\n## Running the Docker image\n\nRunning the Docker image is simple and doesn't require any dependencies or system modifications, just run:\n\n```\n$ docker run -Pit cznic/knot-resolver\n```\n\nThe images are meant as an easy way to try the resolver, and they're not designed for production use.\n\n## Contacting us\n\n- [GitLab issues](https://gitlab.nic.cz/knot/knot-resolver/issues) (you may authenticate via GitHub)\n- [mailing list](https://lists.nic.cz/postorius/lists/knot-resolver-announce.lists.nic.cz/)\n- [![Join the chat at https://gitter.im/CZ-NIC/knot-resolver](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/CZ-NIC/knot-resolver?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)\n\n[build]: https://www.knot-resolver.cz/documentation/latest/dev/build.html\n[doc]: https://www.knot-resolver.cz/documentation/latest/\n[doc-dev]: https://www.knot-resolver.cz/documentation/latest/dev\n[knot-dns]: https://www.knot-dns.cz/\n[luajit]: https://luajit.org/\n[libuv]: http://libuv.org\n[python]: https://www.python.org/\n[systemd]: https://systemd.io/\n[scaling]: https://www.knot-resolver.cz/documentation/latest/config-multiple-workers.html\n[manager]: https://www.knot-resolver.cz/documentation/latest/dev/architecture.html\n",
+    'author': 'Aleš Mrázek',
+    'author_email': 'ales.mrazek@nic.cz',
+    'maintainer': 'Aleš Mrázek',
+    'maintainer_email': 'ales.mrazek@nic.cz',
+    'url': 'https://www.knot-resolver.cz',
+    'package_dir': package_dir,
+    'packages': packages,
+    'package_data': package_data,
+    'install_requires': install_requires,
+    'extras_require': extras_require,
+    'entry_points': entry_points,
+    'python_requires': '>=3.8,<4.0',
+}
+from build_c_extensions import *
+build(setup_kwargs)
+
+setup(**setup_kwargs)
+
+
+# This setup.py was autogenerated using Poetry for backward compatibility with setuptools.