iizysl 0.0.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- iizysl-0.0.1/MANIFEST.in +1 -0
- iizysl-0.0.1/PKG-INFO +44 -0
- iizysl-0.0.1/README.md +18 -0
- iizysl-0.0.1/iizysl.egg-info/PKG-INFO +44 -0
- iizysl-0.0.1/iizysl.egg-info/SOURCES.txt +11 -0
- iizysl-0.0.1/iizysl.egg-info/dependency_links.txt +1 -0
- iizysl-0.0.1/iizysl.egg-info/entry_points.txt +2 -0
- iizysl-0.0.1/iizysl.egg-info/requires.txt +21 -0
- iizysl-0.0.1/iizysl.egg-info/top_level.txt +1 -0
- iizysl-0.0.1/requirements.txt +5 -0
- iizysl-0.0.1/setup.cfg +4 -0
- iizysl-0.0.1/setup.py +185 -0
- iizysl-0.0.1/src/__init__.py +42 -0
iizysl-0.0.1/MANIFEST.in
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
include requirements.txt
|
iizysl-0.0.1/PKG-INFO
ADDED
@@ -0,0 +1,44 @@
|
|
1
|
+
Metadata-Version: 2.1
|
2
|
+
Name: iizysl
|
3
|
+
Version: 0.0.1
|
4
|
+
Summary: A Python package for intelligent information bagging system
|
5
|
+
Home-page: https://github.com/lqxnjk/iizysl
|
6
|
+
Author: lqxnjk
|
7
|
+
Author-email: lqxnjk@qq.com
|
8
|
+
License: MIT
|
9
|
+
Project-URL: Bug Reports, https://github.com/lqxnjk/iizysl/issues
|
10
|
+
Project-URL: Source, https://github.com/lqxnjk/iizysl
|
11
|
+
Keywords: ii,etls,lqxnjk,data
|
12
|
+
Classifier: Development Status :: 3 - Alpha
|
13
|
+
Classifier: Intended Audience :: Developers
|
14
|
+
Classifier: Intended Audience :: Science/Research
|
15
|
+
Classifier: Programming Language :: Python :: 3.7
|
16
|
+
Classifier: License :: OSI Approved :: MIT License
|
17
|
+
Classifier: Operating System :: OS Independent
|
18
|
+
Classifier: Topic :: Software Development :: Libraries
|
19
|
+
Classifier: Topic :: Scientific/Engineering
|
20
|
+
Requires-Python: >=3.7
|
21
|
+
Description-Content-Type: text/markdown
|
22
|
+
Provides-Extra: dev
|
23
|
+
Provides-Extra: plot
|
24
|
+
Provides-Extra: gpu
|
25
|
+
Provides-Extra: all
|
26
|
+
|
27
|
+
## 构建依赖包
|
28
|
+
|
29
|
+
### 基础命令
|
30
|
+
|
31
|
+
```shell
|
32
|
+
python setup.py sdist bdist_wheel
|
33
|
+
python -m build
|
34
|
+
pip install -e .[dev]
|
35
|
+
```
|
36
|
+
|
37
|
+
### 构建命令
|
38
|
+
|
39
|
+
```shell
|
40
|
+
rm -rf './dist'
|
41
|
+
python -m build
|
42
|
+
twine upload dist/*
|
43
|
+
```
|
44
|
+
|
iizysl-0.0.1/README.md
ADDED
@@ -0,0 +1,44 @@
|
|
1
|
+
Metadata-Version: 2.1
|
2
|
+
Name: iizysl
|
3
|
+
Version: 0.0.1
|
4
|
+
Summary: A Python package for intelligent information bagging system
|
5
|
+
Home-page: https://github.com/lqxnjk/iizysl
|
6
|
+
Author: lqxnjk
|
7
|
+
Author-email: lqxnjk@qq.com
|
8
|
+
License: MIT
|
9
|
+
Project-URL: Bug Reports, https://github.com/lqxnjk/iizysl/issues
|
10
|
+
Project-URL: Source, https://github.com/lqxnjk/iizysl
|
11
|
+
Keywords: ii,etls,lqxnjk,data
|
12
|
+
Classifier: Development Status :: 3 - Alpha
|
13
|
+
Classifier: Intended Audience :: Developers
|
14
|
+
Classifier: Intended Audience :: Science/Research
|
15
|
+
Classifier: Programming Language :: Python :: 3.7
|
16
|
+
Classifier: License :: OSI Approved :: MIT License
|
17
|
+
Classifier: Operating System :: OS Independent
|
18
|
+
Classifier: Topic :: Software Development :: Libraries
|
19
|
+
Classifier: Topic :: Scientific/Engineering
|
20
|
+
Requires-Python: >=3.7
|
21
|
+
Description-Content-Type: text/markdown
|
22
|
+
Provides-Extra: dev
|
23
|
+
Provides-Extra: plot
|
24
|
+
Provides-Extra: gpu
|
25
|
+
Provides-Extra: all
|
26
|
+
|
27
|
+
## 构建依赖包
|
28
|
+
|
29
|
+
### 基础命令
|
30
|
+
|
31
|
+
```shell
|
32
|
+
python setup.py sdist bdist_wheel
|
33
|
+
python -m build
|
34
|
+
pip install -e .[dev]
|
35
|
+
```
|
36
|
+
|
37
|
+
### 构建命令
|
38
|
+
|
39
|
+
```shell
|
40
|
+
rm -rf './dist'
|
41
|
+
python -m build
|
42
|
+
twine upload dist/*
|
43
|
+
```
|
44
|
+
|
@@ -0,0 +1,11 @@
|
|
1
|
+
MANIFEST.in
|
2
|
+
README.md
|
3
|
+
requirements.txt
|
4
|
+
setup.py
|
5
|
+
iizysl.egg-info/PKG-INFO
|
6
|
+
iizysl.egg-info/SOURCES.txt
|
7
|
+
iizysl.egg-info/dependency_links.txt
|
8
|
+
iizysl.egg-info/entry_points.txt
|
9
|
+
iizysl.egg-info/requires.txt
|
10
|
+
iizysl.egg-info/top_level.txt
|
11
|
+
src/__init__.py
|
@@ -0,0 +1 @@
|
|
1
|
+
|
@@ -0,0 +1,21 @@
|
|
1
|
+
|
2
|
+
[:python_version < "3.8"]
|
3
|
+
typing-extensions
|
4
|
+
|
5
|
+
[all]
|
6
|
+
iizysl[dev]
|
7
|
+
iizysl[plot]
|
8
|
+
|
9
|
+
[dev]
|
10
|
+
pytest>=6.0
|
11
|
+
pytest-cov>=2.0
|
12
|
+
flake8>=3.9
|
13
|
+
mypy>=0.910
|
14
|
+
sphinx>=4.0
|
15
|
+
|
16
|
+
[gpu]
|
17
|
+
cupy>=10.0
|
18
|
+
|
19
|
+
[plot]
|
20
|
+
matplotlib>=3.0
|
21
|
+
seaborn>=0.11
|
@@ -0,0 +1 @@
|
|
1
|
+
src
|
@@ -0,0 +1,5 @@
|
|
1
|
+
--extra-index-url https://mirrors.tencent.com/pypi/simple
|
2
|
+
# python 3.7.9
|
3
|
+
# pip install -r ./requirements.txt -i https://mirrors.tencent.com/pypi/simple
|
4
|
+
# --default-timeout=100
|
5
|
+
#------------------------------------------------------------------------------------------------------------
|
iizysl-0.0.1/setup.cfg
ADDED
iizysl-0.0.1/setup.py
ADDED
@@ -0,0 +1,185 @@
|
|
1
|
+
from setuptools import setup, find_packages
|
2
|
+
from pathlib import Path
|
3
|
+
import re
|
4
|
+
|
5
|
+
# ========== Configuration Variables ==========
|
6
|
+
# Basic package info
|
7
|
+
ROOT_DIR = Path(__file__).absolute().parent
|
8
|
+
PACKAGE_NAME = Path(__file__).absolute().parent.name
|
9
|
+
|
10
|
+
AUTHOR = "lqxnjk"
|
11
|
+
AUTHOR_EMAIL = "lqxnjk@qq.com"
|
12
|
+
DESCRIPTION = "A Python package for intelligent information bagging system"
|
13
|
+
LICENSE = "MIT"
|
14
|
+
PYTHON_REQUIRES = ">=3.7"
|
15
|
+
URL = f"https://github.com/lqxnjk/{PACKAGE_NAME}"
|
16
|
+
PROJECT_URLS = {
|
17
|
+
'Bug Reports': f'{URL}/issues',
|
18
|
+
'Source': URL,
|
19
|
+
}
|
20
|
+
|
21
|
+
# Package discovery
|
22
|
+
PACKAGE_EXCLUDES = ['tests*', 'docs*', 'examples*']
|
23
|
+
|
24
|
+
# Classifiers
|
25
|
+
CLASSIFIERS = [
|
26
|
+
"Development Status :: 3 - Alpha",
|
27
|
+
"Intended Audience :: Developers",
|
28
|
+
"Intended Audience :: Science/Research",
|
29
|
+
"Programming Language :: Python :: 3.7",
|
30
|
+
"License :: OSI Approved :: MIT License",
|
31
|
+
"Operating System :: OS Independent",
|
32
|
+
"Topic :: Software Development :: Libraries",
|
33
|
+
"Topic :: Scientific/Engineering",
|
34
|
+
]
|
35
|
+
|
36
|
+
# Keywords
|
37
|
+
KEYWORDS = ["ii", "etls", "lqxnjk", "data"]
|
38
|
+
|
39
|
+
# Package data
|
40
|
+
PACKAGE_DATA = {
|
41
|
+
PACKAGE_NAME: ['data/*.json', 'data/*.csv'],
|
42
|
+
}
|
43
|
+
# Entry points
|
44
|
+
ENTRY_POINTS = {
|
45
|
+
'hello': [
|
46
|
+
f'{PACKAGE_NAME.split("-")[0]}_version = {PACKAGE_NAME.split("-")[0]}.__init__:version',
|
47
|
+
],
|
48
|
+
}
|
49
|
+
|
50
|
+
|
51
|
+
# ========== Dynamic Value Functions ==========
|
52
|
+
def get_long_description():
|
53
|
+
"""Read README.md content as long description."""
|
54
|
+
with open('README.md', 'r', encoding='utf-8') as f:
|
55
|
+
return f.read()
|
56
|
+
|
57
|
+
|
58
|
+
def get_version():
|
59
|
+
"""Read version from package __init__.py file."""
|
60
|
+
init_file = "./src/__init__.py"
|
61
|
+
with open(init_file, 'r', encoding='utf-8') as f:
|
62
|
+
version_match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]", f.read(), re.M)
|
63
|
+
if version_match:
|
64
|
+
return version_match.group(1)
|
65
|
+
raise RuntimeError("Unable to find version string.")
|
66
|
+
|
67
|
+
|
68
|
+
def get_requirements():
|
69
|
+
"""Read requirements from requirements.txt."""
|
70
|
+
with open(ROOT_DIR / 'requirements.txt', 'r', encoding='utf-8') as f:
|
71
|
+
return [
|
72
|
+
line.strip() for line in f
|
73
|
+
if line.strip()
|
74
|
+
and not line.startswith('#')
|
75
|
+
and not line.startswith('--')
|
76
|
+
]
|
77
|
+
|
78
|
+
|
79
|
+
REQUIREMENTS = get_requirements()
|
80
|
+
|
81
|
+
# Optional dependencies
|
82
|
+
EXTRAS_REQUIRE = {
|
83
|
+
':python_version < "3.8"': ['typing-extensions'],
|
84
|
+
'dev': [
|
85
|
+
'pytest>=6.0',
|
86
|
+
'pytest-cov>=2.0',
|
87
|
+
'flake8>=3.9',
|
88
|
+
'mypy>=0.910',
|
89
|
+
'sphinx>=4.0',
|
90
|
+
],
|
91
|
+
'plot': [
|
92
|
+
'matplotlib>=3.0',
|
93
|
+
'seaborn>=0.11',
|
94
|
+
],
|
95
|
+
'gpu': ['cupy>=10.0'],
|
96
|
+
'all': [f'{PACKAGE_NAME}[dev]', f'{PACKAGE_NAME}[plot]']
|
97
|
+
}
|
98
|
+
|
99
|
+
# ========== Setup Configuration ==========
|
100
|
+
setup(
|
101
|
+
name=PACKAGE_NAME,
|
102
|
+
version=get_version(),
|
103
|
+
packages=find_packages(exclude=PACKAGE_EXCLUDES),
|
104
|
+
install_requires=REQUIREMENTS,
|
105
|
+
extras_require=EXTRAS_REQUIRE,
|
106
|
+
include_package_data=True,
|
107
|
+
package_data=PACKAGE_DATA,
|
108
|
+
author=AUTHOR,
|
109
|
+
author_email=AUTHOR_EMAIL,
|
110
|
+
description=DESCRIPTION,
|
111
|
+
long_description=get_long_description(),
|
112
|
+
long_description_content_type='text/markdown',
|
113
|
+
url=URL,
|
114
|
+
project_urls=PROJECT_URLS,
|
115
|
+
classifiers=CLASSIFIERS,
|
116
|
+
python_requires=PYTHON_REQUIRES,
|
117
|
+
entry_points=ENTRY_POINTS,
|
118
|
+
license=LICENSE,
|
119
|
+
keywords=KEYWORDS,
|
120
|
+
)
|
121
|
+
|
122
|
+
|
123
|
+
# ========== Pyproject.toml Generation ==========
|
124
|
+
def generate_pyproject_toml():
|
125
|
+
"""Generate pyproject.toml from extracted variables."""
|
126
|
+
# Format project URLs for TOML
|
127
|
+
urls_toml = "\n".join(
|
128
|
+
f'{key.replace(" ", "-").lower()} = "{value}"'
|
129
|
+
for key, value in PROJECT_URLS.items()
|
130
|
+
)
|
131
|
+
|
132
|
+
# Format extras_require for TOML
|
133
|
+
extras_toml = []
|
134
|
+
for key, deps in EXTRAS_REQUIRE.items():
|
135
|
+
if key.startswith(':python_version'):
|
136
|
+
# Handle conditional dependencies
|
137
|
+
condition = key.split('"')[1]
|
138
|
+
extras_toml.append(
|
139
|
+
f'python_version_lt_{condition.replace(".", "_")} = {deps}'
|
140
|
+
)
|
141
|
+
else:
|
142
|
+
extras_toml.append(f'{key} = {deps}')
|
143
|
+
extras_toml_str = "\n".join(extras_toml)
|
144
|
+
PACKAGE_DATA_STR = "{" + ",\n".join([f'"{k}" = {v}' for k, v in PACKAGE_DATA.items()]) + "}"
|
145
|
+
pyproject_content = f"""[build-system]
|
146
|
+
requires = ["setuptools>=42", "wheel"]
|
147
|
+
build-backend = "setuptools.build_meta"
|
148
|
+
|
149
|
+
[project]
|
150
|
+
name = "{PACKAGE_NAME}"
|
151
|
+
version = "{get_version()}"
|
152
|
+
description = "{DESCRIPTION}"
|
153
|
+
readme = "README.md"
|
154
|
+
requires-python = "{PYTHON_REQUIRES}"
|
155
|
+
authors = [
|
156
|
+
{{ name = "{AUTHOR}", email = "{AUTHOR_EMAIL}" }},
|
157
|
+
]
|
158
|
+
license = {{ text = "{LICENSE}" }}
|
159
|
+
keywords = {KEYWORDS}
|
160
|
+
classifiers = {CLASSIFIERS}
|
161
|
+
dependencies = {REQUIREMENTS}
|
162
|
+
|
163
|
+
[project.urls]
|
164
|
+
homepage = "{URL}"
|
165
|
+
{urls_toml}
|
166
|
+
|
167
|
+
[project.optional-dependencies]
|
168
|
+
{extras_toml_str}
|
169
|
+
|
170
|
+
[tool.setuptools]
|
171
|
+
packages = {find_packages(exclude=PACKAGE_EXCLUDES)}
|
172
|
+
package-data = {PACKAGE_DATA_STR}
|
173
|
+
include-package-data = true
|
174
|
+
|
175
|
+
[tool.setuptools.dynamic]
|
176
|
+
version = {{ attr = "{PACKAGE_NAME}.__version__" }}
|
177
|
+
readme = {{ file = ["README.md"] }}
|
178
|
+
"""
|
179
|
+
|
180
|
+
with open("pyproject.toml", "w", encoding="utf-8") as f:
|
181
|
+
f.write(pyproject_content)
|
182
|
+
print("pyproject.toml generated successfully!")
|
183
|
+
|
184
|
+
|
185
|
+
# generate_pyproject_toml()
|
@@ -0,0 +1,42 @@
|
|
1
|
+
"""
|
2
|
+
lqxnjk lqxnjk@qq.com
|
3
|
+
"""
|
4
|
+
__name__ = "demo"
|
5
|
+
__version__ = "0.0.1"
|
6
|
+
|
7
|
+
# 明确公开的API
|
8
|
+
__all__ = []
|
9
|
+
|
10
|
+
# 自动添加包内数据文件路径
|
11
|
+
import os, sys
|
12
|
+
|
13
|
+
_DATA_PATH = os.path.join(os.path.dirname(__file__), "data")
|
14
|
+
|
15
|
+
# 处理不同Python版本的兼容性
|
16
|
+
if sys.version_info < (3, 8):
|
17
|
+
pass
|
18
|
+
# from typing_extensions import Final
|
19
|
+
else:
|
20
|
+
pass
|
21
|
+
# from typing import Final
|
22
|
+
|
23
|
+
|
24
|
+
# 为包提供版本信息
|
25
|
+
def version():
|
26
|
+
return __version__
|
27
|
+
|
28
|
+
|
29
|
+
# 延迟加载重型依赖(如 TensorFlow/PyTorch)
|
30
|
+
def __getattr__(name):
|
31
|
+
if name == "HeavyClass":
|
32
|
+
# from .heavy_module import HeavyClass
|
33
|
+
# return HeavyClass
|
34
|
+
pass
|
35
|
+
raise AttributeError(f"No attribute {name}")
|
36
|
+
|
37
|
+
|
38
|
+
# 为包提供类型提示(PEP 561)
|
39
|
+
from typing import TYPE_CHECKING
|
40
|
+
|
41
|
+
if TYPE_CHECKING:
|
42
|
+
pass
|