diff --git a/pyproject.toml b/pyproject.toml index 8043dd9906..81be41c480 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,3 +1,97 @@ +[project] +name = "frappe" +authors = [ + { name = "Frappe Technologies Pvt Ltd", email = "developers@frappe.io"} +] +description = "Metadata driven, full-stack low code web framework" +requires-python = ">=3.8" +readme = "README.md" +dynamic = ["version"] +dependencies = [ + # core dependencies + "Babel~=2.9.0", + "Click~=7.1.2", + "GitPython~=3.1.14", + "Jinja2~=3.1.2", + "Pillow~=9.1.1", + "PyJWT~=2.0.1", + "PyMySQL~=1.0.2", + "PyPDF2~=2.1.0", + "PyPika~=0.48.9", + "PyQRCode~=1.2.1", + "PyYAML~=5.4.1", + "RestrictedPython~=5.1", + "WeasyPrint==52.5", + "Werkzeug~=2.1.2", + "Whoosh~=2.7.4", + "beautifulsoup4~=4.9.3", + "bleach-allowlist~=1.0.3", + "bleach~=3.3.0", + "cairocffi==1.2.0", + "chardet~=4.0.0", + "croniter~=1.3.5", + "cryptography~=37.0.2", + "email-reply-parser~=0.5.12", + "git-url-parse~=1.2.2", + "gitdb~=4.0.7", + "gunicorn~=20.1.0", + "html2text==2020.1.16", + "html5lib~=1.1", + "ipython~=8.4.0", + "ldap3~=2.9", + "markdown2~=2.4.0", + "maxminddb-geolite2==2018.703", + "num2words~=0.5.10", + "oauthlib~=3.1.0", + "openpyxl~=3.0.7", + "parse~=1.19.0", + "passlib~=1.7.4", + "pdfkit~=1.0.0", + "phonenumbers==8.12.40", + "premailer~=3.8.0", + "psutil~=5.9.1", + "psycopg2-binary~=2.9.1", + "pyOpenSSL~=20.0.1", + "pyasn1~=0.4.8", + "pycryptodome~=3.10.1", + "pyotp~=2.6.0", + "pypng~=0.0.20", + "python-dateutil~=2.8.1", + "pytz==2022.1", + "rauth~=0.7.3", + "redis~=3.5.3", + "requests-oauthlib~=1.3.0", + "requests~=2.27.1", + "rq~=1.10.1", + "rsa>=4.1", + "schedule~=1.1.0", + "semantic-version~=2.10.0", + "sqlparse~=0.4.1", + "tenacity~=8.0.1", + "terminaltables~=3.1.0", + "traceback-with-variables~=2.0.4", + "urllib3~=1.26.4", + "xlrd~=2.0.1", + "zxcvbn-python~=4.4.24", + + # integration dependencies + "boto3~=1.17.53", + "braintree~=4.8.0", + "dropbox~=11.7.0", + "google-api-python-client~=2.2.0", + "google-auth-httplib2~=0.1.0", + "google-auth-oauthlib~=0.4.4", + "google-auth~=1.29.0", + "googlemaps~=4.4.5", + "paytmchecksum~=1.7.0", + "razorpay~=1.2.0", + "stripe~=2.56.0", +] + +[build-system] +requires = ["flit_core >=3.4,<4"] +build-backend = "flit_core.buildapi" + [tool.black] line-length = 99 diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index 1a6b6120a3..0000000000 --- a/requirements.txt +++ /dev/null @@ -1,75 +0,0 @@ -Babel~=2.9.0 -beautifulsoup4~=4.9.3 -bleach-allowlist~=1.0.3 -bleach~=3.3.0 -boto3~=1.17.53 -braintree~=4.8.0 -chardet~=4.0.0 -Click~=7.1.2 -croniter~=1.3.5 -cryptography~=37.0.2 -dropbox~=11.7.0 -email-reply-parser~=0.5.12 -git-url-parse~=1.2.2 -gitdb~=4.0.7 -GitPython~=3.1.14 -google-api-python-client~=2.2.0 -google-auth-httplib2~=0.1.0 -google-auth-oauthlib~=0.4.4 -google-auth~=1.29.0 -googlemaps~=4.4.5 -gunicorn~=20.1.0 -html2text==2020.1.16 -html5lib~=1.1 -ipython~=8.4.0 -Jinja2~=3.1.2 -ldap3~=2.9 -markdown2~=2.4.0 -maxminddb-geolite2==2018.703 -num2words~=0.5.10 -oauthlib~=3.1.0 -openpyxl~=3.0.7 -parse~=1.19.0 -passlib~=1.7.4 -paytmchecksum~=1.7.0 -pdfkit~=1.0.0 -Pillow~=9.1.1 -premailer~=3.8.0 -psutil~=5.9.1 -psycopg2-binary~=2.9.1 -pyasn1~=0.4.8 -pycryptodome~=3.10.1 -PyJWT~=2.0.1 -PyMySQL~=1.0.2 -pyOpenSSL~=20.0.1 -pyotp~=2.6.0 -PyPDF2~=2.1.0 -PyPika~=0.48.9 -pypng~=0.0.20 -PyQRCode~=1.2.1 -python-dateutil~=2.8.1 -pytz==2022.1 -PyYAML~=5.4.1 -rauth~=0.7.3 -razorpay~=1.2.0 -redis~=3.5.3 -requests-oauthlib~=1.3.0 -requests~=2.27.1 -RestrictedPython~=5.1 -rq~=1.10.1 -rsa>=4.1 # not directly required, pinned by Snyk to avoid a vulnerability -schedule~=1.1.0 -semantic-version~=2.10.0 -sqlparse~=0.4.1 -stripe~=2.56.0 -terminaltables~=3.1.0 -traceback-with-variables~=2.0.4 -urllib3~=1.26.4 -Werkzeug~=2.1.2 -Whoosh~=2.7.4 -xlrd~=2.0.1 -zxcvbn-python~=4.4.24 -tenacity~=8.0.1 -cairocffi==1.2.0 -WeasyPrint==52.5 -phonenumbers==8.12.40 diff --git a/setup.py b/setup.py deleted file mode 100644 index ba4034a766..0000000000 --- a/setup.py +++ /dev/null @@ -1,58 +0,0 @@ -# imports - standard imports -import ast -import os -import re -import shutil -from distutils.command.clean import clean as Clean - -from setuptools import find_packages, setup - -# get version from __version__ variable in frappe/__init__.py -_version_re = re.compile(r"__version__\s+=\s+(.*)") - -with open("requirements.txt") as f: - install_requires = f.read().strip().split("\n") - -with open("frappe/__init__.py", "rb") as f: - version = str(ast.literal_eval(_version_re.search(f.read().decode("utf-8")).group(1))) - - -class CleanCommand(Clean): - def run(self): - Clean.run(self) - - basedir = os.path.abspath(os.path.dirname(__file__)) - - for relpath in ["build", ".cache", ".coverage", "dist", "frappe.egg-info"]: - abspath = os.path.join(basedir, relpath) - if os.path.exists(abspath): - if os.path.isfile(abspath): - os.remove(abspath) - else: - shutil.rmtree(abspath) - - for dirpath, dirnames, filenames in os.walk(basedir): - for filename in filenames: - _, extension = os.path.splitext(filename) - if extension in [".pyc"]: - abspath = os.path.join(dirpath, filename) - os.remove(abspath) - for dirname in dirnames: - if dirname in ["__pycache__"]: - abspath = os.path.join(dirpath, dirname) - shutil.rmtree(abspath) - - -setup( - name="frappe", - version=version, - description="Metadata driven, full-stack web framework", - author="Frappe Technologies", - author_email="info@frappe.io", - packages=find_packages(), - zip_safe=False, - include_package_data=True, - install_requires=install_requires, - cmdclass={"clean": CleanCommand}, - python_requires=">=3.8", -)