Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 21306bb

Browse filesBrowse files
committed
fix: 修改 cython 问题
1 parent 1e93e54 commit 21306bb
Copy full SHA for 21306bb

File tree

Expand file treeCollapse file tree

10 files changed

+38
-33
lines changed
Filter options
Expand file treeCollapse file tree

10 files changed

+38
-33
lines changed

‎MANIFEST.in

Copy file name to clipboard
+2-2Lines changed: 2 additions & 2 deletions
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

Copy file name to clipboard
+28Lines changed: 28 additions & 0 deletions
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
File renamed without changes.

‎demo/site/index.html.py

Copy file name to clipboard
+3Lines changed: 3 additions & 0 deletions
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.

‎setup.py

Copy file name to clipboard
100644100755
Expand all lines: setup.py
+5-21Lines changed: 5 additions & 21 deletions
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='leafcoder@gmail.com',
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

Copy file name to clipboardExpand all lines: site/index.html
-10Lines changed: 0 additions & 10 deletions
This file was deleted.

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.