diff --git a/MANIFEST.in b/MANIFEST.in new file mode 100644 index 0000000..aea1b1b --- /dev/null +++ b/MANIFEST.in @@ -0,0 +1,4 @@ +include enjoy-5.2.2.jar +recursive-include templates * +include README.md +include LICENSE \ No newline at end of file diff --git a/README.md b/README.md index 86e5456..b4a5bb9 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,10 @@ jfinal-enjoy 5.2.2 的python 3.9.0 实现,基于jpype1实现。 python port by mrzhou@miw.cn ### 使用样例 -``` +```python +from enjoy import Enjoy + +if __name__ == "__main__": # 1. 配置参数(必须修改为你的实际路径) JAR_PATH = "enjoy-5.2.2.jar" # enjoy-5.2.2.jar的绝对/相对路径 TEMPLATE_BASE_PATH = "./templates" # 模板文件所在目录(如index.html放在这个目录下) diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..595661c --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,24 @@ +[build-system] +requires = ["setuptools>=42", "wheel"] +build-backend = "setuptools.build_meta" + +[project] +name = "py-enjoy" +version = "0.1.0" +authors = [ + { name = "mrzhou", email = "mrzhou@miw.cn" } +] +description = "jfinal-enjoy 5.2.2 的python 3.9.0 实现,基于jpype1实现" +readme = "README.md" +requires-python = ">=3.9" +classifiers = [ + "Programming Language :: Python :: 3", + "License :: OSI Approved :: MIT License", + "Operating System :: OS Independent", +] +dependencies = [ + "jpype1>=1.4.0" +] + +[project.urls] +"Homepage" = "https://git.miw.cn/mrzhou/py-enjoy" \ No newline at end of file diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..967d5f3 --- /dev/null +++ b/setup.py @@ -0,0 +1,26 @@ +from setuptools import setup, find_packages + +setup( + name="py-enjoy", + version="0.1.0", + packages=find_packages(), + include_package_data=True, + package_data={ + "": ["*.jar", "templates/*"] + }, + install_requires=[ + "jpype1>=1.4.0" + ], + author="mrzhou", + author_email="mrzhou@miw.cn", + description="jfinal-enjoy 5.2.2 的python 3.9.0 实现,基于jpype1实现", + long_description=open("README.md").read(), + long_description_content_type="text/markdown", + python_requires=">=3.9", + classifiers=[ + "Programming Language :: Python :: 3", + "License :: OSI Approved :: MIT License", + "Operating System :: OS Independent", + ], + url="https://git.miw.cn/mrzhou/py-enjoy" +) \ No newline at end of file