From f6757c32eb7cf8a5a637028ac28d546f1a9bb91e Mon Sep 17 00:00:00 2001 From: iphenelist Date: Tue, 30 Dec 2025 10:11:15 +0300 Subject: [PATCH] chore: Migrate project configuration to pyproject.toml and remove legacy setup.py and requirements.txt --- pyproject.toml | 50 ++++++++++++++++++++++++++++++++++++++++++++++++ requirements.txt | 1 - setup.py | 29 ---------------------------- 3 files changed, 50 insertions(+), 30 deletions(-) create mode 100644 pyproject.toml delete mode 100755 requirements.txt delete mode 100755 setup.py diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..1f36c3e --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,50 @@ +[project] +name = "propms" +authors = [ + { name = "Aakvatech", email = "info@aakvatech.com"} +] +description = "Property Management Solution" +requires-python = ">=3.10" +readme = "README.md" +dynamic = ["version"] +dependencies = [ + # "frappe~=15.0.0" # Installed and managed by bench. +] + +[build-system] +requires = ["flit_core >=3.4,<4"] +build-backend = "flit_core.buildapi" + +[tool.bench.frappe-dependencies] +frappe = ">=15.0.0,<16.0.0" +erpnext = ">=15.0.0,<16.0.0" + +[tool.ruff] +line-length = 110 +target-version = "py310" + +[tool.ruff.lint] +select = [ + "F", + "E", + "W", + "I", + "UP", + "B", + "RUF", +] +ignore = [ + "B017", # assertRaises(Exception) - should be more specific + "B018", # useless expression, not assigned to anything + "B023", # function doesn't bind loop variable - will have last iteration's value + "B904", # raise inside except without from + "E101", # indentation contains mixed spaces and tabs + "E402", # module level import not at top of file + "E501", # line too long + "E741", # ambiguous variable name + "F401", # "unused" imports + "F403", # can't detect undefined names from * import + "F405", # can't detect undefined names from * import + "F722", # syntax error in forward type annotation + "W191", # indentation contains tabs +] \ No newline at end of file diff --git a/requirements.txt b/requirements.txt deleted file mode 100755 index 5b21fde..0000000 --- a/requirements.txt +++ /dev/null @@ -1 +0,0 @@ -erpnext diff --git a/setup.py b/setup.py deleted file mode 100755 index 917e323..0000000 --- a/setup.py +++ /dev/null @@ -1,29 +0,0 @@ -# -*- coding: utf-8 -*- -from setuptools import setup, find_packages - -# from pip.req import parse_requirements -import re, ast - -# get version from __version__ variable in propms/__init__.py -_version_re = re.compile(r"__version__\s+=\s+(.*)") - -with open("propms/__init__.py", "rb") as f: - version = str( - ast.literal_eval(_version_re.search(f.read().decode("utf-8")).group(1)) - ) - -with open("requirements.txt") as f: - install_requires = f.read().strip().split("\n") - - -setup( - name="propms", - version=version, - description="Property Management Solution", - author="Aakvatech", - author_email="info@aakvatech.com", - packages=find_packages(), - zip_safe=False, - include_package_data=True, - install_requires=install_requires, -)