From f25205589c28068de0feaff9c5bde1abfdc31665 Mon Sep 17 00:00:00 2001 From: Christophe de Vienne Date: Fri, 28 Nov 2025 14:28:46 +0100 Subject: [PATCH 1/2] Dropping setup.py --- protoc.sh | 5 ++++ pyproject.toml | 52 ++++++++++++++++++++++++++++++++++ setup.py | 45 ----------------------------- {nrpc => src/nrpc}/__init__.py | 0 {nrpc => src/nrpc}/exc.py | 0 {nrpc => src/nrpc}/gen.py | 0 {nrpc => src/nrpc}/lib.py | 0 {nrpc => src/nrpc}/nrpc.proto | 0 {nrpc => src/nrpc}/nrpc_pb2.py | 0 {nrpc => src/nrpc}/tmpl.mako | 0 {nrpc => src/nrpc}/tmpl.py | 0 11 files changed, 57 insertions(+), 45 deletions(-) create mode 100644 protoc.sh create mode 100644 pyproject.toml delete mode 100644 setup.py rename {nrpc => src/nrpc}/__init__.py (100%) rename {nrpc => src/nrpc}/exc.py (100%) rename {nrpc => src/nrpc}/gen.py (100%) rename {nrpc => src/nrpc}/lib.py (100%) rename {nrpc => src/nrpc}/nrpc.proto (100%) rename {nrpc => src/nrpc}/nrpc_pb2.py (100%) rename {nrpc => src/nrpc}/tmpl.mako (100%) rename {nrpc => src/nrpc}/tmpl.py (100%) diff --git a/protoc.sh b/protoc.sh new file mode 100644 index 0000000..e2bb311 --- /dev/null +++ b/protoc.sh @@ -0,0 +1,5 @@ +protoc \ + --proto_path . \ + --proto_path nrpc \ + --python_out . \ + nrpc/nrpc.proto diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..1df2832 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,52 @@ +[project] +name = "python-nrpc" +version = "0.0.7" +authors = [ + { name="Example Author", email="author@example.com" }, +] +description = "A python code generator and lib for Nats RPC" +readme = "README.md" +requires-python = ">=3.9" +classifiers = [ + "Programming Language :: Python :: 3", + "Operating System :: OS Independent", +] +license = "MIT" +license-files = [ + "LICENSE", +] + +dependencies=["protobuf", "mako", "nats-py>=2.7"] + +[project.scripts] +proto-gen-pynrpc = "nrpc.gen:main" + +[project.urls] +Homepage = "https://github.com/nats-rpc/python-nrpc" +Issues = "https://github.com/nats-rpc/python-nrpc/issues" + +[build-system] +requires = ["setuptools >= 77.0.3"] +build-backend = "setuptools.build_meta" + +[tool.setuptools.package-data] +nrpc = ["*.mako"] + +[tool.black] +line-length = 79 +exclude = ''' +/( + \.git + | \.hg + | \.mypy_cache + | \.tox + | \.venv + | \.eggs + | venv + | _build + | buck-out + | build + | dist + | migrations +)/ +''' diff --git a/setup.py b/setup.py deleted file mode 100644 index fd57fb3..0000000 --- a/setup.py +++ /dev/null @@ -1,45 +0,0 @@ -import setuptools -import subprocess - -from setuptools import setup - -with open("README.md", "r") as fh: - long_description = fh.read() - - -class protoc(setuptools.Command): - user_options = [] - - def initialize_options(self): - pass - - def finalize_options(self): - pass - - def run(self): - subprocess.check_call( - [ - "protoc", - "--proto_path", - ".", - "--proto_path", - "nrpc", - "--python_out", - ".", - "nrpc/nrpc.proto", - ] - ) - - -setup( - name="python-nrpc", - version="0.0.7", - description="A python code generator and lib for Nats RPC", - long_description=long_description, - long_description_content_type="text/markdown", - packages=["nrpc"], - package_data={"nrpc": ["*.mako"]}, - cmdclass={"protoc": protoc}, - entry_points={"console_scripts": ["protoc-gen-pynrpc=nrpc.gen:main"]}, - install_requires=["protobuf", "mako", "nats-py>=2.7"], -) diff --git a/nrpc/__init__.py b/src/nrpc/__init__.py similarity index 100% rename from nrpc/__init__.py rename to src/nrpc/__init__.py diff --git a/nrpc/exc.py b/src/nrpc/exc.py similarity index 100% rename from nrpc/exc.py rename to src/nrpc/exc.py diff --git a/nrpc/gen.py b/src/nrpc/gen.py similarity index 100% rename from nrpc/gen.py rename to src/nrpc/gen.py diff --git a/nrpc/lib.py b/src/nrpc/lib.py similarity index 100% rename from nrpc/lib.py rename to src/nrpc/lib.py diff --git a/nrpc/nrpc.proto b/src/nrpc/nrpc.proto similarity index 100% rename from nrpc/nrpc.proto rename to src/nrpc/nrpc.proto diff --git a/nrpc/nrpc_pb2.py b/src/nrpc/nrpc_pb2.py similarity index 100% rename from nrpc/nrpc_pb2.py rename to src/nrpc/nrpc_pb2.py diff --git a/nrpc/tmpl.mako b/src/nrpc/tmpl.mako similarity index 100% rename from nrpc/tmpl.mako rename to src/nrpc/tmpl.mako diff --git a/nrpc/tmpl.py b/src/nrpc/tmpl.py similarity index 100% rename from nrpc/tmpl.py rename to src/nrpc/tmpl.py From bce8145507d9568fdd2ff6ce138914db69a1eed8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 28 Nov 2025 13:37:44 +0000 Subject: [PATCH 2/2] Bump pip from 23.3 to 25.3 Bumps [pip](https://github.com/pypa/pip) from 23.3 to 25.3. - [Changelog](https://github.com/pypa/pip/blob/main/NEWS.rst) - [Commits](https://github.com/pypa/pip/compare/23.3...25.3) --- updated-dependencies: - dependency-name: pip dependency-version: '25.3' dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- requirements-build.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements-build.txt b/requirements-build.txt index 6f798a7..1898833 100644 --- a/requirements-build.txt +++ b/requirements-build.txt @@ -1,3 +1,3 @@ -pip==23.3 +pip==25.3 setuptools==70.0.0 wheel==0.43.0