Skip to content

Commit 99ae87e

Browse files
committed
Merge branch 'develop'
2 parents 9f37cad + 9ceae0a commit 99ae87e

12 files changed

+40
-36
lines changed

MANIFEST.in

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
include LICENSE requirements.txt example.py README.md
2-
recursive-include site *.*
1+
include LICENSE requirements.txt README.md
2+
recursive-include demo *
33
recursive-include test *.*

Makefile

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
PYTHON=`which python`
2+
3+
install:
4+
$(PYTHON) setup.py install
5+
6+
# 构建源码包
7+
build: wheel
8+
$(PYTHON) setup.py build sdist
9+
10+
build_ext:
11+
$(PYTHON) setup.py build_ext --inplace
12+
13+
# 构建 wheel 包
14+
wheel:
15+
$(PYTHON) setup.py bdist_wheel
16+
17+
upload-test:
18+
pip install twine; \
19+
twine upload --repository-url https://test.pypi.org/legacy/ dist/*
20+
21+
upload:
22+
pip install twine; \
23+
twine upload dist/*
24+
25+
clean:
26+
rm -rf build dist *.egg-info __pycache__ tests/__pycache__ tests/*.pyc
27+
28+
.PHONY: test upload upload-test build wheel install clean

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
<img src="https://img.shields.io/github/languages/top/leafcoder/litefs" data-origin="https://img.shields.io/github/languages/top/leafcoder/litefs" alt="GitHub top language">
2121
<img src="https://img.shields.io/github/languages/code-size/leafcoder/litefs" data-origin="https://img.shields.io/github/languages/code-size/leafcoder/litefs" alt="GitHub code size in bytes">
2222
<img src="https://img.shields.io/github/commit-activity/w/leafcoder/litefs" data-origin="https://img.shields.io/github/commit-activity/w/leafcoder/litefs" alt="GitHub commit activity">
23-
<img src="https://img.shields.io/github/downloads/leafcoder/litefs/total" data-origin="https://img.shields.io/github/downloads/leafcoder/litefs/total" alt="GitHub All Releases">
23+
<img src="https://img.shields.io/pypi/dm/litefs" data-origin="https://img.shields.io/pypi/dm/litefs" alt="PyPI - Downloads">
2424
</p>
2525

2626
</div>
@@ -31,4 +31,4 @@ Build a web server framework using Python. Litefs was developed to implement
3131
a server framework that can quickly, securely, and flexibly build Web
3232
projects. Litefs is a high-performance HTTP server. Litefs has the
3333
characteristics of high stability, rich functions, and low system
34-
consumption.
34+
consumption.
File renamed without changes.

demo/site/index.html.py

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
def handler(self):
2+
self.start_response(200)
3+
return ['Hello World']
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

requirements.txt

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
argh==0.26.2
2-
Cython==0.29.14
32
greenlet==0.4.13
43
Mako==1.0.6
54
MarkupSafe==1.1.1

setup.py

100644100755
+5-21
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,9 @@
99
import posixpath
1010

1111
try:
12-
from setuptools import setup
12+
from setuptools import setup, Extension
1313
except ImportError:
14-
from distutils.core import setup
15-
try:
16-
from Cython.Build import cythonize
17-
except ImportError:
18-
os.system('pip install cython')
19-
from Cython.Build import cythonize
20-
21-
language_level = 2
22-
if sys.version_info[0] > 2:
23-
language_level = 3
14+
from distutils.core import setup, Extension
2415

2516
def get_str(var_name):
2617
src_py = open('litefs.py').read()
@@ -41,24 +32,17 @@ def get_long_str(var_name):
4132
author_email='[email protected]',
4233
url='https://github.com/leafcoder/litefs',
4334
py_modules=['litefs'],
44-
ext_modules=cythonize(
45-
'litefs.py',
46-
compiler_directives={
47-
'language_level': language_level
48-
}
49-
),
5035
license=get_str('__license__'),
5136
platforms='any',
5237
package_data={
53-
'': ['*.txt', '*.md', 'LICENSE', 'example.py', 'MANIFEST.in'],
54-
'site': ['site/*', '*.py'],
38+
'': ['*.txt', '*.md', 'LICENSE', 'MANIFEST.in'],
39+
'demo': ['demo/*', '*.py'],
5540
'test': ['test/*', '*.py']
5641
},
5742
install_requires=open('requirements.txt').read().split('\n'),
58-
setup_requires=['cython', 'tox'],
5943
entry_points={
6044
'console_scripts': [
61-
'litefs=litefs.entry:test_server',
45+
'litefs=litefs:test_server',
6246
]
6347
},
6448
classifiers=[

site/index.html

-10
This file was deleted.

0 commit comments

Comments
 (0)