-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
174 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
From 5f5ef2133bdc8faf866b81c408bba22eba908857 Mon Sep 17 00:00:00 2001 | ||
From: David <dgx.arnold@gmail.com> | ||
Date: Sun, 10 Mar 2024 23:13:30 +0100 | ||
Subject: [PATCH] chore: use flit-core build as other frappe apps | ||
|
||
--- | ||
MANIFEST.in | 18 ------------------ | ||
pyproject.toml | 26 ++++++++++++++++++++++++++ | ||
requirements.txt | 1 - | ||
setup.py | 19 ------------------- | ||
4 files changed, 26 insertions(+), 38 deletions(-) | ||
delete mode 100644 MANIFEST.in | ||
create mode 100644 pyproject.toml | ||
delete mode 100644 requirements.txt | ||
delete mode 100644 setup.py | ||
|
||
diff --git a/MANIFEST.in b/MANIFEST.in | ||
deleted file mode 100644 | ||
index 47fefeae2c..0000000000 | ||
--- a/MANIFEST.in | ||
+++ /dev/null | ||
@@ -1,18 +0,0 @@ | ||
-include MANIFEST.in | ||
-include requirements.txt | ||
-include *.json | ||
-include *.md | ||
-include *.py | ||
-include *.txt | ||
-recursive-include webshop *.css | ||
-recursive-include webshop *.csv | ||
-recursive-include webshop *.html | ||
-recursive-include webshop *.ico | ||
-recursive-include webshop *.js | ||
-recursive-include webshop *.json | ||
-recursive-include webshop *.md | ||
-recursive-include webshop *.png | ||
-recursive-include webshop *.py | ||
-recursive-include webshop *.svg | ||
-recursive-include webshop *.txt | ||
-recursive-exclude webshop *.pyc | ||
\ No newline at end of file | ||
diff --git a/pyproject.toml b/pyproject.toml | ||
new file mode 100644 | ||
index 0000000000..acc3fbe02d | ||
--- /dev/null | ||
+++ b/pyproject.toml | ||
@@ -0,0 +1,26 @@ | ||
+[project] | ||
+name = "webshop" | ||
+authors = [ | ||
+ { name = "Frappe Technologies Pvt. Ltd.", email = "contact@frappe.io"} | ||
+] | ||
+description = "Open Source eCommerce Platform" | ||
+requires-python = ">=3.10" | ||
+readme = "README.md" | ||
+dynamic = ["version"] | ||
+dependencies = [] | ||
+ | ||
+[build-system] | ||
+requires = ["flit_core >=3.4,<4"] | ||
+build-backend = "flit_core.buildapi" | ||
+ | ||
+[tool.black] | ||
+line-length = 99 | ||
+ | ||
+[tool.isort] | ||
+line_length = 99 | ||
+multi_line_output = 3 | ||
+include_trailing_comma = true | ||
+force_grid_wrap = 0 | ||
+use_parentheses = true | ||
+ensure_newline_before_comments = true | ||
+indent = "\t" | ||
diff --git a/requirements.txt b/requirements.txt | ||
deleted file mode 100644 | ||
index 7668191f9c..0000000000 | ||
--- a/requirements.txt | ||
+++ /dev/null | ||
@@ -1 +0,0 @@ | ||
-# frappe -- https://github.com/frappe/frappe is installed via 'bench init' | ||
\ No newline at end of file | ||
diff --git a/setup.py b/setup.py | ||
deleted file mode 100644 | ||
index 9f7bc1b13b..0000000000 | ||
--- a/setup.py | ||
+++ /dev/null | ||
@@ -1,19 +0,0 @@ | ||
-from setuptools import setup, find_packages | ||
- | ||
-with open("requirements.txt") as f: | ||
- install_requires = f.read().strip().split("\n") | ||
- | ||
-# get version from __version__ variable in webshop/__init__.py | ||
-from webshop import __version__ as version | ||
- | ||
-setup( | ||
- name="webshop", | ||
- version=version, | ||
- description="Open Source eCommerce Platform", | ||
- author="Frappe Technologies Pvt. Ltd.", | ||
- author_email="contact@frappe.io", | ||
- packages=find_packages(), | ||
- zip_safe=False, | ||
- include_package_data=True, | ||
- install_requires=install_requires | ||
-) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
pname = "webshop"; | ||
version = "20240125.060731"; | ||
meta = { | ||
url = "https://github.com/frappe/webshop/commit/bebfee123fb0a9dd2ce5f7c41d63fc01e1375990"; | ||
description = "Sources for webshop (20240125.060731)"; | ||
}; | ||
src = builtins.fetchTree { | ||
type = "github"; | ||
owner = "frappe"; | ||
repo = "webshop"; | ||
narHash = "sha256-y/zWxsR6as3nEI3jgCrz1BjWcVcqzxBm11kC596yg0E="; | ||
rev = "bebfee123fb0a9dd2ce5f7c41d63fc01e1375990"; | ||
}; | ||
passthru = builtins.fromJSON ''{}''; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
{ | ||
appSources, | ||
lib, | ||
buildPythonPackage, | ||
flit-core, | ||
pythonRelaxDepsHook, | ||
extractFrappeMeta, | ||
}: | ||
buildPythonPackage rec { | ||
inherit | ||
(extractFrappeMeta src) | ||
pname | ||
version | ||
format | ||
; | ||
|
||
inherit (appSources.webshop) src passthru; | ||
|
||
nativeBuildInputs = [ | ||
pythonRelaxDepsHook | ||
flit-core | ||
]; | ||
|
||
# would require frappe, but since frappe is almost certainly customized, | ||
# we don't include it here / TODO: decide if we may actually add it? | ||
# pythonImportsCheck = ["webshop"]; | ||
|
||
meta = with lib; { | ||
description = "Frappe webshop is an Open Source eCommerce Platform"; | ||
homepage = "https://github.com/frappe/webshop.git"; | ||
license = licenses.gpl3; | ||
}; | ||
} |