PyPInclude 0.0.1__py3-none-any.whl
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.
PyPInclude.py
ADDED
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
assert 0, "ver 0.0.1 isn't supported"
|
|
2
|
+
|
|
3
|
+
from setuptools import setup as __setup__
|
|
4
|
+
from setuptools.command.install import install as __install__
|
|
5
|
+
from setuptools.command.develop import develop as __develop__
|
|
6
|
+
from setuptools import find_packages
|
|
7
|
+
from os import listdir as __ls__
|
|
8
|
+
from os.path import join as __join_path__
|
|
9
|
+
from os.path import isdir as __is_dir__
|
|
10
|
+
from os.path import isfile as __is_file__
|
|
11
|
+
from os.path import sep as __path_sep__
|
|
12
|
+
from os.path import basename as __base_name__
|
|
13
|
+
from subprocess import run as __shell__
|
|
14
|
+
|
|
15
|
+
@lambda f : f()
|
|
16
|
+
def lib():
|
|
17
|
+
data = {}
|
|
18
|
+
class PyPInstallLibType:
|
|
19
|
+
'''
|
|
20
|
+
this class's data is not in this object. this class's data is in function which return this class's object.
|
|
21
|
+
'''
|
|
22
|
+
def __call__(self, libname, pw):
|
|
23
|
+
if libname in data: assert data[libname][0] == hash(pw), "permission denied"
|
|
24
|
+
else: data[libname] = (hash(pw), {})
|
|
25
|
+
def addvar(var, value):
|
|
26
|
+
data[libname][1][var] = value
|
|
27
|
+
return value
|
|
28
|
+
|
|
29
|
+
class PyPInstallLibExporter:
|
|
30
|
+
'''
|
|
31
|
+
this class's data is not in this object. this class's data is in function which return this class's object.
|
|
32
|
+
'''
|
|
33
|
+
def __getitem__(self, name):
|
|
34
|
+
def deco(value):
|
|
35
|
+
return addvar(name, value)
|
|
36
|
+
return deco
|
|
37
|
+
def __neg__(self):
|
|
38
|
+
def deco(func):
|
|
39
|
+
return addvar(func.__name__, func)
|
|
40
|
+
return deco
|
|
41
|
+
return PyPInstallLibExporter()
|
|
42
|
+
|
|
43
|
+
def __getitem__(self, libname):
|
|
44
|
+
class PyPInstallModuleType:
|
|
45
|
+
'''
|
|
46
|
+
this class's data is not in this object. this class's data is in function which return this class's object.
|
|
47
|
+
'''
|
|
48
|
+
def __getitems__(self, member):
|
|
49
|
+
return data[libname][1][member]
|
|
50
|
+
return PyPInstallModuleType()
|
|
51
|
+
return PyPInstallLibType()
|
|
52
|
+
|
|
53
|
+
def __return_name_if_is_exist_in__(f, target, where):
|
|
54
|
+
ret = __join_path__(where, target)
|
|
55
|
+
return (ret if f(ret) else None) if target in where else None
|
|
56
|
+
|
|
57
|
+
def __core__(package_paths, **kargv):
|
|
58
|
+
ret = {}
|
|
59
|
+
for package_path in package_paths:
|
|
60
|
+
PyPInclude = __return_name_if_is_exist_in__(__is_dir__, "__PyPInclude__", package_path)
|
|
61
|
+
if PyPInclude:
|
|
62
|
+
if "package_data" in ret: ret["package_data"][package_path] = ["__PyPInclude__/*"]
|
|
63
|
+
else: ret["package_data"] = { package_path : ["__PyPInclude__/*"] }
|
|
64
|
+
if __return_name_if_is_exist_in__(__is_file__, "__main__.py", PyPInclude):
|
|
65
|
+
if "cmdclass" in ret: ret["cmclass"].append(__base_name__(package_path))
|
|
66
|
+
else: ret["cmclass"] = [__base_name__(package_path)]
|
|
67
|
+
if "cmclass" in ret:
|
|
68
|
+
cmclass = ret["cmclass"]
|
|
69
|
+
class install(__install__):
|
|
70
|
+
def run(self):
|
|
71
|
+
__install__.run(self)
|
|
72
|
+
installed_dir = self.install_lib
|
|
73
|
+
for init_script in map(lambda x : __join_path__(installed_dir, x, "__PyPInclude__", "main.py"), filter(cmclass.__contains__, self.distribution.packages)): __shell__(["python", "-m", init_script])
|
|
74
|
+
class develop(__develop__):
|
|
75
|
+
def run(self):
|
|
76
|
+
__develop__.run(self)
|
|
77
|
+
installed_dir = self.egg_path
|
|
78
|
+
for init_script in map(lambda x : __join_path__(installed_dir, x, "__PyPInclude__", "main.py"), filter(cmclass.__contains__, self.distribution.packages)): __shell__(["python", "-m", init_script])
|
|
79
|
+
ret["cmclass"] = {"install" : install, "develop" : develop}
|
|
80
|
+
return ret
|
|
81
|
+
|
|
82
|
+
def setup(*, package_paths, **kargv):
|
|
83
|
+
return __setup__(**kargv, **__core__(package_paths, **kargv))
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: PyPInclude
|
|
3
|
+
Version: 0.0.1
|
|
4
|
+
Summary: PyPInclude (PyPI includer)
|
|
5
|
+
Home-page: https://github.com/FarAway6834/PyPInclude
|
|
6
|
+
Author: du7ec
|
|
7
|
+
Author-email: dutec6834@gmail.com
|
|
8
|
+
Keywords: PyPI,include,PyPInclude,PyPIncluder,includer,PyPIinclude,PyPIInclude,PyPIincluder,PyPIIncluder,setuptools,include_files,files,pypi,pypi_includer,pypi_include
|
|
9
|
+
License-File: LICENSE
|
|
10
|
+
Requires-Dist: setuptools
|
|
11
|
+
Dynamic: author
|
|
12
|
+
Dynamic: author-email
|
|
13
|
+
Dynamic: home-page
|
|
14
|
+
Dynamic: keywords
|
|
15
|
+
Dynamic: license-file
|
|
16
|
+
Dynamic: requires-dist
|
|
17
|
+
Dynamic: summary
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
PyPInclude.py,sha256=X_qL0D2HDmI0df7u47ZYAEFh2rFqrVLQjUD3dTtTKvw,3801
|
|
2
|
+
pypinclude-0.0.1.dist-info/licenses/LICENSE,sha256=V3Kqklsa89FmOApeCHTd2WVQx9SBbC4b41O0Ig_WGfo,1068
|
|
3
|
+
pypinclude-0.0.1.dist-info/METADATA,sha256=vxZoaSalHtN37lgGUDmy3xm0Km2DRYh0qvbuKuO825c,544
|
|
4
|
+
pypinclude-0.0.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
5
|
+
pypinclude-0.0.1.dist-info/top_level.txt,sha256=i9TGT2uJ2C_Qqu_fLZduO4mIzR9Usznzl0gGDmCIOS0,11
|
|
6
|
+
pypinclude-0.0.1.dist-info/RECORD,,
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 FarAwayJams
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
PyPInclude
|