From d9530457fb5bdc28a8998ff314545f12539e7807 Mon Sep 17 00:00:00 2001
From: leafcoder
Date: Thu, 21 May 2020 22:14:39 +0800
Subject: [PATCH 1/8] Update README.md
---
README.md | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/README.md b/README.md
index 9539715..8c373c3 100644
--- a/README.md
+++ b/README.md
@@ -20,7 +20,7 @@
-
+
@@ -31,4 +31,4 @@ Build a web server framework using Python. Litefs was developed to implement
a server framework that can quickly, securely, and flexibly build Web
projects. Litefs is a high-performance HTTP server. Litefs has the
characteristics of high stability, rich functions, and low system
-consumption.
\ No newline at end of file
+consumption.
From dc4bd68133389fb66a2620a3de7a8aa77a6ac784 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Thu, 25 Mar 2021 21:44:43 +0000
Subject: [PATCH 2/8] Bump pyyaml from 5.1 to 5.4
Bumps [pyyaml](https://github.com/yaml/pyyaml) from 5.1 to 5.4.
- [Release notes](https://github.com/yaml/pyyaml/releases)
- [Changelog](https://github.com/yaml/pyyaml/blob/master/CHANGES)
- [Commits](https://github.com/yaml/pyyaml/compare/5.1...5.4)
Signed-off-by: dependabot[bot]
---
requirements.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/requirements.txt b/requirements.txt
index 8e17529..18dba80 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -4,5 +4,5 @@ greenlet==0.4.13
Mako==1.0.6
MarkupSafe==1.1.1
pathtools==0.1.2
-PyYAML==5.1
+PyYAML==5.4
watchdog==0.8.3
From e3ff5f2266e1e4b5eb1cf6b8915294b49f0ce2b9 Mon Sep 17 00:00:00 2001
From: leafcoder
Date: Thu, 22 Apr 2021 16:54:39 +0800
Subject: [PATCH 3/8] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9=20cython=20?=
=?UTF-8?q?=E9=97=AE=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
MANIFEST.in | 4 ++--
Makefile | 28 ++++++++++++++++++++++++++++
example.py => demo/example.py | 0
demo/site/index.html.py | 3 +++
{site => demo/site}/not_found | 0
{site => demo/site}/test.py | 0
{site => demo/site}/test_iter.py | 0
{site => demo/site}/test_mako.mako | 0
setup.py | 26 +++++---------------------
site/index.html | 10 ----------
10 files changed, 38 insertions(+), 33 deletions(-)
create mode 100644 Makefile
rename example.py => demo/example.py (100%)
create mode 100644 demo/site/index.html.py
rename {site => demo/site}/not_found (100%)
rename {site => demo/site}/test.py (100%)
rename {site => demo/site}/test_iter.py (100%)
rename {site => demo/site}/test_mako.mako (100%)
mode change 100644 => 100755 setup.py
delete mode 100644 site/index.html
diff --git a/MANIFEST.in b/MANIFEST.in
index 3fe8f2d..537f7f2 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -1,3 +1,3 @@
-include LICENSE requirements.txt example.py README.md
-recursive-include site *.*
+include LICENSE requirements.txt README.md
+recursive-include demo *
recursive-include test *.*
\ No newline at end of file
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..2ac34cd
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,28 @@
+PYTHON=`which python`
+
+install:
+ $(PYTHON) setup.py install
+
+# 构建源码包
+build: wheel
+ $(PYTHON) setup.py build sdist
+
+build_ext:
+ $(PYTHON) setup.py build_ext --inplace
+
+# 构建 wheel 包
+wheel:
+ $(PYTHON) setup.py bdist_wheel
+
+upload-test:
+ pip install twine; \
+ twine upload --repository-url https://test.pypi.org/legacy/ dist/*
+
+upload:
+ pip install twine; \
+ twine upload dist/*
+
+clean:
+ rm -rf build dist *.egg-info __pycache__ tests/__pycache__ tests/*.pyc
+
+.PHONY: test upload upload-test build wheel install clean
diff --git a/example.py b/demo/example.py
similarity index 100%
rename from example.py
rename to demo/example.py
diff --git a/demo/site/index.html.py b/demo/site/index.html.py
new file mode 100644
index 0000000..9a23965
--- /dev/null
+++ b/demo/site/index.html.py
@@ -0,0 +1,3 @@
+def handler(self):
+ self.start_response(200)
+ return ['Hello World']
\ No newline at end of file
diff --git a/site/not_found b/demo/site/not_found
similarity index 100%
rename from site/not_found
rename to demo/site/not_found
diff --git a/site/test.py b/demo/site/test.py
similarity index 100%
rename from site/test.py
rename to demo/site/test.py
diff --git a/site/test_iter.py b/demo/site/test_iter.py
similarity index 100%
rename from site/test_iter.py
rename to demo/site/test_iter.py
diff --git a/site/test_mako.mako b/demo/site/test_mako.mako
similarity index 100%
rename from site/test_mako.mako
rename to demo/site/test_mako.mako
diff --git a/setup.py b/setup.py
old mode 100644
new mode 100755
index aa6f51b..7e29354
--- a/setup.py
+++ b/setup.py
@@ -9,18 +9,9 @@
import posixpath
try:
- from setuptools import setup
+ from setuptools import setup, Extension
except ImportError:
- from distutils.core import setup
-try:
- from Cython.Build import cythonize
-except ImportError:
- os.system('pip install cython')
- from Cython.Build import cythonize
-
-language_level = 2
-if sys.version_info[0] > 2:
- language_level = 3
+ from distutils.core import setup, Extension
def get_str(var_name):
src_py = open('litefs.py').read()
@@ -41,24 +32,17 @@ def get_long_str(var_name):
author_email='leafcoder@gmail.com',
url='https://github.com/leafcoder/litefs',
py_modules=['litefs'],
- ext_modules=cythonize(
- 'litefs.py',
- compiler_directives={
- 'language_level': language_level
- }
- ),
license=get_str('__license__'),
platforms='any',
package_data={
- '': ['*.txt', '*.md', 'LICENSE', 'example.py', 'MANIFEST.in'],
- 'site': ['site/*', '*.py'],
+ '': ['*.txt', '*.md', 'LICENSE', 'MANIFEST.in'],
+ 'demo': ['demo/*', '*.py'],
'test': ['test/*', '*.py']
},
install_requires=open('requirements.txt').read().split('\n'),
- setup_requires=['cython', 'tox'],
entry_points={
'console_scripts': [
- 'litefs=litefs.entry:test_server',
+ 'litefs=litefs:test_server',
]
},
classifiers=[
diff --git a/site/index.html b/site/index.html
deleted file mode 100644
index 2d6c89b..0000000
--- a/site/index.html
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
-
-
- Untitle
-
-
- Hello world.
-
-
From ebb002214da85bf98964ae284ee16325c5f69d60 Mon Sep 17 00:00:00 2001
From: leafcoder
Date: Thu, 22 Apr 2021 17:01:16 +0800
Subject: [PATCH 4/8] =?UTF-8?q?build:=20=E5=88=A0=E9=99=A4=20Cython=20?=
=?UTF-8?q?=E4=BE=9D=E8=B5=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
requirements.txt | 1 -
1 file changed, 1 deletion(-)
diff --git a/requirements.txt b/requirements.txt
index 8e17529..880c0d1 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,5 +1,4 @@
argh==0.26.2
-Cython==0.29.14
greenlet==0.4.13
Mako==1.0.6
MarkupSafe==1.1.1
From 1e93e545f497339bd68a3233ca17233f11e3556a Mon Sep 17 00:00:00 2001
From: leafcoder
Date: Thu, 21 May 2020 22:14:39 +0800
Subject: [PATCH 5/8] Update README.md
---
README.md | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/README.md b/README.md
index 9539715..8c373c3 100644
--- a/README.md
+++ b/README.md
@@ -20,7 +20,7 @@
-
+
@@ -31,4 +31,4 @@ Build a web server framework using Python. Litefs was developed to implement
a server framework that can quickly, securely, and flexibly build Web
projects. Litefs is a high-performance HTTP server. Litefs has the
characteristics of high stability, rich functions, and low system
-consumption.
\ No newline at end of file
+consumption.
From 21306bbbdc284bd3fa8471537b91c447b5e610bf Mon Sep 17 00:00:00 2001
From: leafcoder
Date: Thu, 22 Apr 2021 16:54:39 +0800
Subject: [PATCH 6/8] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9=20cython=20?=
=?UTF-8?q?=E9=97=AE=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
MANIFEST.in | 4 ++--
Makefile | 28 ++++++++++++++++++++++++++++
example.py => demo/example.py | 0
demo/site/index.html.py | 3 +++
{site => demo/site}/not_found | 0
{site => demo/site}/test.py | 0
{site => demo/site}/test_iter.py | 0
{site => demo/site}/test_mako.mako | 0
setup.py | 26 +++++---------------------
site/index.html | 10 ----------
10 files changed, 38 insertions(+), 33 deletions(-)
create mode 100644 Makefile
rename example.py => demo/example.py (100%)
create mode 100644 demo/site/index.html.py
rename {site => demo/site}/not_found (100%)
rename {site => demo/site}/test.py (100%)
rename {site => demo/site}/test_iter.py (100%)
rename {site => demo/site}/test_mako.mako (100%)
mode change 100644 => 100755 setup.py
delete mode 100644 site/index.html
diff --git a/MANIFEST.in b/MANIFEST.in
index 3fe8f2d..537f7f2 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -1,3 +1,3 @@
-include LICENSE requirements.txt example.py README.md
-recursive-include site *.*
+include LICENSE requirements.txt README.md
+recursive-include demo *
recursive-include test *.*
\ No newline at end of file
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..2ac34cd
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,28 @@
+PYTHON=`which python`
+
+install:
+ $(PYTHON) setup.py install
+
+# 构建源码包
+build: wheel
+ $(PYTHON) setup.py build sdist
+
+build_ext:
+ $(PYTHON) setup.py build_ext --inplace
+
+# 构建 wheel 包
+wheel:
+ $(PYTHON) setup.py bdist_wheel
+
+upload-test:
+ pip install twine; \
+ twine upload --repository-url https://test.pypi.org/legacy/ dist/*
+
+upload:
+ pip install twine; \
+ twine upload dist/*
+
+clean:
+ rm -rf build dist *.egg-info __pycache__ tests/__pycache__ tests/*.pyc
+
+.PHONY: test upload upload-test build wheel install clean
diff --git a/example.py b/demo/example.py
similarity index 100%
rename from example.py
rename to demo/example.py
diff --git a/demo/site/index.html.py b/demo/site/index.html.py
new file mode 100644
index 0000000..9a23965
--- /dev/null
+++ b/demo/site/index.html.py
@@ -0,0 +1,3 @@
+def handler(self):
+ self.start_response(200)
+ return ['Hello World']
\ No newline at end of file
diff --git a/site/not_found b/demo/site/not_found
similarity index 100%
rename from site/not_found
rename to demo/site/not_found
diff --git a/site/test.py b/demo/site/test.py
similarity index 100%
rename from site/test.py
rename to demo/site/test.py
diff --git a/site/test_iter.py b/demo/site/test_iter.py
similarity index 100%
rename from site/test_iter.py
rename to demo/site/test_iter.py
diff --git a/site/test_mako.mako b/demo/site/test_mako.mako
similarity index 100%
rename from site/test_mako.mako
rename to demo/site/test_mako.mako
diff --git a/setup.py b/setup.py
old mode 100644
new mode 100755
index aa6f51b..7e29354
--- a/setup.py
+++ b/setup.py
@@ -9,18 +9,9 @@
import posixpath
try:
- from setuptools import setup
+ from setuptools import setup, Extension
except ImportError:
- from distutils.core import setup
-try:
- from Cython.Build import cythonize
-except ImportError:
- os.system('pip install cython')
- from Cython.Build import cythonize
-
-language_level = 2
-if sys.version_info[0] > 2:
- language_level = 3
+ from distutils.core import setup, Extension
def get_str(var_name):
src_py = open('litefs.py').read()
@@ -41,24 +32,17 @@ def get_long_str(var_name):
author_email='leafcoder@gmail.com',
url='https://github.com/leafcoder/litefs',
py_modules=['litefs'],
- ext_modules=cythonize(
- 'litefs.py',
- compiler_directives={
- 'language_level': language_level
- }
- ),
license=get_str('__license__'),
platforms='any',
package_data={
- '': ['*.txt', '*.md', 'LICENSE', 'example.py', 'MANIFEST.in'],
- 'site': ['site/*', '*.py'],
+ '': ['*.txt', '*.md', 'LICENSE', 'MANIFEST.in'],
+ 'demo': ['demo/*', '*.py'],
'test': ['test/*', '*.py']
},
install_requires=open('requirements.txt').read().split('\n'),
- setup_requires=['cython', 'tox'],
entry_points={
'console_scripts': [
- 'litefs=litefs.entry:test_server',
+ 'litefs=litefs:test_server',
]
},
classifiers=[
diff --git a/site/index.html b/site/index.html
deleted file mode 100644
index 2d6c89b..0000000
--- a/site/index.html
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
-
-
- Untitle
-
-
- Hello world.
-
-
From 79df7c83f7c9432c1fd08fc9b80eabbef07e43e6 Mon Sep 17 00:00:00 2001
From: leafcoder
Date: Thu, 22 Apr 2021 17:01:16 +0800
Subject: [PATCH 7/8] =?UTF-8?q?build:=20=E5=88=A0=E9=99=A4=20Cython=20?=
=?UTF-8?q?=E4=BE=9D=E8=B5=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
requirements.txt | 1 -
1 file changed, 1 deletion(-)
diff --git a/requirements.txt b/requirements.txt
index 8e17529..880c0d1 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,5 +1,4 @@
argh==0.26.2
-Cython==0.29.14
greenlet==0.4.13
Mako==1.0.6
MarkupSafe==1.1.1
From d5a727db01745a80e800c3726e834a3fdd7b4a8e Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Fri, 16 Sep 2022 17:46:53 +0000
Subject: [PATCH 8/8] Bump mako from 1.0.6 to 1.2.2
Bumps [mako](https://github.com/sqlalchemy/mako) from 1.0.6 to 1.2.2.
- [Release notes](https://github.com/sqlalchemy/mako/releases)
- [Changelog](https://github.com/sqlalchemy/mako/blob/main/CHANGES)
- [Commits](https://github.com/sqlalchemy/mako/commits)
---
updated-dependencies:
- dependency-name: mako
dependency-type: direct:production
...
Signed-off-by: dependabot[bot]
---
requirements.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/requirements.txt b/requirements.txt
index 21bc672..f40f34d 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,6 +1,6 @@
argh==0.26.2
greenlet==0.4.13
-Mako==1.0.6
+Mako==1.2.2
MarkupSafe==1.1.1
pathtools==0.1.2
PyYAML==5.4